summaryrefslogtreecommitdiff
path: root/scripts/makepkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/makepkg.in')
-rwxr-xr-xscripts/makepkg.in52
1 files changed, 24 insertions, 28 deletions
diff --git a/scripts/makepkg.in b/scripts/makepkg.in
index a93c5660..f928d07b 100755
--- a/scripts/makepkg.in
+++ b/scripts/makepkg.in
@@ -394,44 +394,43 @@ removedeps() {
}
tidy_install() {
+ cd "$startdir"/pkg
+ msg2 "$(gettext "Tidying install...")"
+
if [ "$(check_option docs)" = "n" ]; then
- # remove info/doc files
- msg "$(gettext "Removing info/doc files...")"
- cd "$startdir/pkg"
+ msg2 "$(gettext "Removing info/doc files...")"
#fix flyspray bug #5021
rm -rf ${DOC_DIRS[@]}
fi
- # move /usr/share/man files to /usr/man
- if [ -d $startdir/pkg/usr/share/man ]; then
- cd "$startdir"
- mkdir -p pkg/usr/man
- cp -a pkg/usr/share/man/* pkg/usr/man/
- rm -rf pkg/usr/share/man
+ if [ -d usr/share/man ]; then
+ msg2 "$(gettext "Moving usr/share/man files to usr/man")"
+ mkdir -p usr/man
+ cp -a usr/share/man/* usr/man/
+ rm -rf usr/share/man
fi
- # compress man pages
- msg "$(gettext "Compressing man pages...")"
- find "$startdir"/pkg/{usr{,/local},opt/*}/man -type f 2>/dev/null | while read i ; do
- ext="${i##*.}"
- fn="${i##*/}"
+
+ msg2 "$(gettext "Compressing man pages...")"
+ local manpage ext file link
+ find {usr{,/local},opt/*}/man -type f 2>/dev/null | while read manpage ; do
+ ext="${manpage##*.}"
+ file="${manpage##*/}"
if [ "$ext" != "gz" -a "$ext" != "bz2" ]; then
# update symlinks to this manpage
- find "$startdir"/pkg/{usr{,/local},opt/*}/man -lname "$fn" 2> /dev/null | while read ln ; do
- rm -f "$ln"
- ln -sf "${fn}.gz" "${ln}.gz"
+ find {usr{,/local},opt/*}/man -lname "$file" 2>/dev/null | while read link ; do
+ rm -f "$link"
+ ln -sf "${file}.gz" "${link}.gz"
done
# compress the original
- gzip -9 "$i"
+ gzip -9 "$manpage"
fi
done
- cd "$startdir"
- # strip binaries
if [ "$(check_option strip)" = "y" ]; then
msg "$(gettext "Stripping debugging symbols from binaries and libraries...")"
- for file in $(find pkg/*/{bin,lib,sbin} -type f 2>/dev/null || true); do
+ for file in $(find {,*/}{bin,lib,sbin} -type f 2>/dev/null || true); do
case "$(file -biz "$file")" in
*application/x-sharedlib*) # Libraries
/usr/bin/strip --strip-debug "$file";;
@@ -441,17 +440,14 @@ tidy_install() {
done
fi
- # remove libtool (.la) files
if [ "$(check_option libtool)" = "n" ]; then
- msg "$(gettext "Removing libtool .la files...")"
- find pkg -type f -name "*.la" -exec rm -f -- '{}' \;
+ msg2 "$(gettext "Removing libtool .la files...")"
+ find -type f -name "*.la" -exec rm -f -- '{}' \;
fi
- # remove empty directories
if [ "$(check_option emptydirs)" = "n" ]; then
- msg "$(gettext "Removing empty directories...")"
- cd "$startdir/pkg"
- find -depth -type d -empty -delete;
+ msg2 "$(gettext "Removing empty directories...")"
+ find -depth -type d -empty -delete
fi
}