diff options
author | B. Watson <yalhcru@gmail.com> | 2022-02-12 03:02:50 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-13 09:17:47 +0700 |
commit | 86a72bd3948bbef6623ffc24ad131069fc8d81c8 (patch) | |
tree | eb6b5a0c9a964d872009cda6de7cb620ed83745a /system/localepurge/localepurge.SlackBuild | |
parent | 9535e2f244a10c26c52b3f3b68544855d156896b (diff) |
system/localepurge: Stop writing to $CWD, make noarch.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/localepurge/localepurge.SlackBuild')
-rw-r--r-- | system/localepurge/localepurge.SlackBuild | 52 |
1 files changed, 15 insertions, 37 deletions
diff --git a/system/localepurge/localepurge.SlackBuild b/system/localepurge/localepurge.SlackBuild index e629ee74112b0..1dac37dfc4c49 100644 --- a/system/localepurge/localepurge.SlackBuild +++ b/system/localepurge/localepurge.SlackBuild @@ -22,6 +22,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220212 bkw: Modified by SlackBuilds.org: +# - stop writing to $CWD. *nothing* should *ever* do this. +# - make this a noarch package since there's no compiled code. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=localepurge @@ -30,17 +34,8 @@ BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi +ARCH=noarch -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -50,20 +45,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG @@ -75,28 +56,25 @@ cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ install -D -m755 usr/sbin/localepurge $PKG/usr/bin/localepurge install -D -m644 debian/localepurge.8 $PKG/usr/man/man8/localepurge.8 install -D -m755 debian/localepurge.config $PKG/usr/bin/localepurge-config install -D -m644 $CWD/locale.nopurge $PKG/etc/locale.nopurge.new -if [ ! -e /var/cache/localepurge/localelist ]; then - find /usr/share/locale -maxdepth 1 -type d -name "*" -printf "%f\n" | grep "^[a-z]" | cut -d" " -f1 | sort -u > $CWD/localelist -else - install -D -m644 $CWD/localelist /var/cache/localepurge/localelist -fi +gzip $PKG/usr/man/man*/* -install -D -m644 $CWD/localelist $PKG/var/cache/localepurge/localelist +CACHEDIR=$PKG/var/cache/localepurge/localelist +mkdir -p $CACHEDIR -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +find /usr/share/locale -maxdepth 1 -type d -name "*" -printf "%f\n" | \ + grep "^[a-z]" | \ + cut -d" " -f1 | \ + sort -u \ + > $CACHEDIR/localelist DOCS="debian/README.Debian debian/changelog debian/copyright" |