summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-04-11 21:06:01 +0200
committerDan McGee <dan@archlinux.org>2007-05-14 17:05:58 +0200
commit9b85864e3703e94fd9a4343b8a7cf63b1e890985 (patch)
tree704667b4e6a23c3c3d2e935601c0e94a6953763d /scripts
parente2f42947e3eb172bb28340afa7df50a93a409a3a (diff)
downloadpacman-9b85864e3703e94fd9a4343b8a7cf63b1e890985.tar.gz
pacman-9b85864e3703e94fd9a4343b8a7cf63b1e890985.tar.xz
Cleaned up and simplified tidy_install().
Added 'LC_ALL= LANG=' to find commands for stripping symbols from binaries/libraries. This stops the greps failing if LC_ALL or LANG != en_US|C|POSIX. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Diffstat (limited to 'scripts')
-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
}