Changeset 30f002a for npl/overig/file/file.SlackBuild.orig
- Timestamp:
- 11/19/20 22:59:34 (4 years ago)
- Branches:
- master
- Children:
- 6e9c61f
- Parents:
- 3c9eb90
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
npl/overig/file/file.SlackBuild.orig
r3c9eb90 r30f002a 1 #!/bin/ sh1 #!/bin/bash 2 2 3 # Copyright 2005-2008, 2009, 2010, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA3 # Copyright 2005-2008, 2009, 2010, 2013, 2015, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA 4 4 # All rights reserved. 5 5 # … … 21 21 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 22 23 cd $(dirname $0) ; CWD=$(pwd) 24 25 PKGNAM=file 23 26 VERSION=${VERSION:-$(echo file-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)} 24 27 BUILD=${BUILD:-1} 25 28 26 NUMJOBS=${NUMJOBS:- -j7}29 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} 27 30 28 31 # Automatically determine the architecture we're building on: … … 34 37 *) export ARCH=$( uname -m ) ;; 35 38 esac 39 fi 40 41 # If the variable PRINT_PACKAGE_NAME is set, then this script will report what 42 # the name of the created package would be, and then exit. This information 43 # could be useful to other scripts. 44 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then 45 echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" 46 exit 0 36 47 fi 37 48 … … 50 61 fi 51 62 52 CWD=$(pwd)53 63 TMP=${TMP:-/tmp} 54 64 PKG=$TMP/package-file … … 63 73 find . \ 64 74 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ 65 -exec chmod 755 {} \ ;-o \75 -exec chmod 755 {} \+ -o \ 66 76 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ 67 -exec chmod 644 {} \ ;77 -exec chmod 644 {} \+ 68 78 69 79 # Make the default data directory /etc/file like it has always been: 70 80 zcat $CWD/file.etc.file.diff.gz | patch -p1 --verbose || exit 1 71 81 # This is needed after the patch above: 72 autoreconf || exit 182 autoreconf -vif || exit 1 73 83 74 84 # Since we're going to include the compiled magic database now (otherwise … … 82 92 # versions of file to avoid breaking existing scripts: 83 93 zcat $CWD/file.short.diff.gz | patch -p1 -E --verbose || exit 1 94 95 # Output on ELF objects should be "dynamically linked" for PT_DYNAMIC too, not 96 # just for PT_INTERP: 97 zcat $CWD/file.PT_DYNAMIC.is.dynamically.linked.diff.gz | patch -p1 -E --verbose || exit 1 84 98 85 99 # Add zisofs and crda regulatory bin detection … … 107 121 make install DESTDIR=$PKG || exit 1 108 122 123 # Don't ship .la files: 124 rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la 125 109 126 # Ignore for now - still labeled as experimental 110 127 # Actually, let's ignore it until something needs it :) <volkerdi> … … 122 139 mkdir -p $PKG/etc/file/magic 123 140 cp -a magic/Magdir/* $PKG/etc/file/magic 141 chmod 644 $PKG/etc/file/magic/* 124 142 125 143 # Add a script to recompile the flat files in the obvious location. … … 137 155 138 156 # Strip everything for good measure: 139 find $PKG | xargs file | grep -e "executable" -e "shared object" \140 | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null157 #find $PKG | xargs file | grep -e "executable" -e "shared object" \ 158 # | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null 141 159 142 160 ( cd $PKG/usr/man || exit 1 143 find . -type f -exec gzip -9 {} \ ;161 find . -type f -exec gzip -9 {} \+ 144 162 for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done 145 163 )
Note: See TracChangeset
for help on using the changeset viewer.