summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2008-11-23 21:17:15 +1000
committerDan McGee <dan@archlinux.org>2009-01-03 00:06:51 -0600
commitbb9b19a6c45e39bd617faa5eb47c074f9c12f94e (patch)
tree7859e4b8df398b178e8632508badfeea515aeb65 /scripts
parentb55f478042053dfb749da7ce0a48fc0e49112093 (diff)
downloadpacman-bb9b19a6c45e39bd617faa5eb47c074f9c12f94e.tar.xz
makepkg: provide MAN_DIRS configuration variable
Provides a MAN_DIRS variable in makepkg.conf which can be used to specify folders to look for manual (man and info) pages to be compressed. Useful for packages that install to /opt. Also clarifies that "zipman" means "zip manuals" and covers both man and info pages. Original work by: Tiago Pierezan Camargo <tcamargo at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in9
1 files changed, 4 insertions, 5 deletions
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