summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/makepkg.conf.5.txt9
-rw-r--r--etc/makepkg.conf.in4
-rw-r--r--scripts/makepkg.sh.in9
3 files changed, 15 insertions, 7 deletions
diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
index ca9df025..18dbf350 100644
--- a/doc/makepkg.conf.5.txt
+++ b/doc/makepkg.conf.5.txt
@@ -123,13 +123,20 @@ Options
Leave empty directories in packages.
*zipman*;;
- Compress man and info pages with gzip.
+ Compress manual (man and info) pages with gzip.
**INTEGRITY_CHECK=(**check1 ...**)**::
File integrity checks to use. Multiple checks may be specified; this
affects both generation and checking. The current valid options are:
`md5`, `sha1`, `sha256`, `sha384`, and `sha512`.
+**MAN_DIRS=(**{usr{,/local}{,/share},opt/*}/{man,info} ...**)**::
+ If "zipman" is specified in the OPTIONS array, this variable will
+ instruct makepkg where to look to compress manual (man and info)
+ pages. If you build packages that are located in opt/, you may need
+ to add the directory to this array. *NOTE:* Do not add the leading
+ slash to the directory name.
+
**DOC_DIRS=(**usr/{,share/}{doc,gtk-doc} ...**)**::
If "!docs" is specified in the OPTIONS array, this variable will
instruct makepkg where to look to remove docs. If you build packages
diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index 7eb647b2..82722bef 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -65,12 +65,14 @@ BUILDENV=(fakeroot !distcc color !ccache !xdelta)
#-- docs: Save doc and info directories
#-- libtool: Leave libtool (.la) files in packages
#-- emptydirs: Leave empty directories in packages
-#-- zipman: Compress manpages with gzip
+#-- zipman: Compress manual (man and info) pages with gzip
#
OPTIONS=(strip !docs libtool emptydirs zipman)
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
+#-- Manual (man and info) directories to compress (if option set correctly above)
+MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if option set correctly above)
DOC_DIRS=(usr/{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Directories to be searched for the strip option (if option set correctly above)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 38081721..b3a0200a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -718,9 +718,8 @@ tidy_install() {
if [ "$(check_option zipman)" = "y" ]; then
msg2 "$(gettext "Compressing man and info pages...")"
- local manpage mandirs ext file link hardlinks hl
- mandirs=({usr{,/local}{,/share},opt/*}/{man,info})
- find ${mandirs[@]} -type f 2>/dev/null |
+ local manpage ext file link hardlinks hl
+ find ${MAN_DIRS[@]} -type f 2>/dev/null |
while read manpage ; do
# check file still exists (potentially compressed with hard link)
if [ -f ${manpage} ]; then
@@ -728,7 +727,7 @@ tidy_install() {
file="${manpage##*/}"
if [ "$ext" != "gz" -a "$ext" != "bz2" ]; then
# update symlinks to this manpage
- find ${mandirs[@]} -lname "$file" 2>/dev/null |
+ find ${MAN_DIRS[@]} -lname "$file" 2>/dev/null |
while read link ; do
rm -f "$link"
ln -sf "${file}.gz" "${link}.gz"
@@ -736,7 +735,7 @@ tidy_install() {
# find hard links and remove them
# the '|| true' part keeps the script from bailing if find returned an
# error, such as when one of the man directories doesn't exist
- hardlinks="$(find ${mandirs[@]} \! -name "$file" -samefile "$manpage" 2>/dev/null)" || true
+ hardlinks="$(find ${MAN_DIRS[@]} \! -name "$file" -samefile "$manpage" 2>/dev/null)" || true
for hl in ${hardlinks}; do
rm -f "${hl}";
done