1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00

makepkg: several small fixes

1) Do not attempt to strip compressed binaries
Original-work-by: Marc - A. Dahlhaus <mad@wol.de>

2) Add "\" in "GPL\'ed" so quote mark does not break source code highlighting

3) Add local to docdir paths in makepkg.conf for consistency

4) Use full path to sed in MacOSX in case users have GNU sed earlier in
path

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2009-05-03 17:21:02 +10:00 committed by Dan McGee
parent ed848b1c54
commit f569c4a042
3 changed files with 5 additions and 3 deletions

View File

@ -193,7 +193,7 @@ case "${host_os}" in
darwin*) darwin*)
host_os_darwin=yes host_os_darwin=yes
SIZECMD="/usr/bin/stat -f %z" SIZECMD="/usr/bin/stat -f %z"
SEDINPLACE="sed -i ''" SEDINPLACE="/usr/bin/sed -i ''"
;; ;;
esac esac

View File

@ -75,7 +75,7 @@ INTEGRITY_CHECK=(md5)
#-- Manual (man and info) directories to compress (if zipman is specified) #-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified) #-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Directories to be searched for the strip option (if strip is specified) #-- Directories to be searched for the strip option (if strip is specified)
STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin}) STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
#-- Files to be removed from all packages (if purge is specified) #-- Files to be removed from all packages (if purge is specified)

View File

@ -846,6 +846,8 @@ tidy_install() {
local binary local binary
find ${STRIP_DIRS[@]} -type f 2>/dev/null | while read binary ; do find ${STRIP_DIRS[@]} -type f 2>/dev/null | while read binary ; do
case "$(file -biz "$binary")" in case "$(file -biz "$binary")" in
*compressed-encoding*) # Skip compressed binarys
;;
*application/x-sharedlib*) # Libraries (.so) *application/x-sharedlib*) # Libraries (.so)
/usr/bin/strip -S "$binary";; /usr/bin/strip -S "$binary";;
*application/x-archive*) # Libraries (.a) *application/x-archive*) # Libraries (.a)
@ -952,7 +954,7 @@ create_package() {
# warn if license array is not present or empty # warn if license array is not present or empty
if [ -z "$license" ]; then if [ -z "$license" ]; then
warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT" warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
plain "$(gettext "Example for GPL'ed software: license=('GPL').")" plain "$(gettext "Example for GPL\'ed software: license=('GPL').")"
fi fi
local comp_files=".PKGINFO" local comp_files=".PKGINFO"