summaryrefslogtreecommitdiffstats
path: root/doc/build_pdfs.sh
blob: 595909ff6fc413fdde6d012f7e2abb1d4a9c5341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
for i in *.adoc nft.txt; do a2x --doctype manpage --format pdf $i; done
exit

# (This script needs dblatex in addition to the man page build requirements).
# This script builds PDF versions of the man pages.
# Distributors may like to place these in e.g. $DOCDIR/pdf.
# As an example, these are the changes for the Slackware build script:

8<--------------------8<--------------------8<--------------------

*** nftables.SlackBuild 2018/06/05 00:30:03     1.7
--- nftables.SlackBuild 2018/08/17 01:14:20
***************
*** 22,28 ****
  
  PKGNAM=nftables
  VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
! BUILD=${BUILD:-2}
  DEBUG=${DEBUG:-false}
  
  NUMJOBS=${NUMJOBS:-" -j7 "}
--- 22,28 ----
  
  PKGNAM=nftables
  VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
! BUILD=${BUILD:-3}
  DEBUG=${DEBUG:-false}
  
  NUMJOBS=${NUMJOBS:-" -j7 "}
***************
*** 114,121 ****
    )
  fi
  
! mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
  cp -a COPYING* INSTALL* $PKG/usr/doc/$PKGNAM-$VERSION
  
  mkdir -p $PKG/install
  cat $CWD/slack-desc > $PKG/install/slack-desc
--- 114,123 ----
    )
  fi
  
! mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/pdf
  cp -a COPYING* INSTALL* $PKG/usr/doc/$PKGNAM-$VERSION
+ (cd doc; ./build_pdfs.sh)
+ cp -a doc/*.pdf $PKG/usr/doc/$PKGNAM-$VERSION/pdf
  
  mkdir -p $PKG/install
  cat $CWD/slack-desc > $PKG/install/slack-desc