From 2883ec85bb9f321c26a7e64e38a9e02aadfe468b Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 27 May 2009 17:33:19 +0000 Subject: UPdated to 4.65 --- p7zip/build/p7zip.SlackBuild | 56 ++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 38 deletions(-) (limited to 'p7zip/build') diff --git a/p7zip/build/p7zip.SlackBuild b/p7zip/build/p7zip.SlackBuild index f0db6655..6f6b1bfd 100755 --- a/p7zip/build/p7zip.SlackBuild +++ b/p7zip/build/p7zip.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2006-2008 Eric Hameleers +# Copyright 2006-2009 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -37,8 +37,10 @@ # 4.57-1: 19/mar/2008 by Eric Hameleers # * Update. Check for gcc version. Use 'make install' instead of # manually copying files. +# 4.65-1: 27/may/2009 by Eric Hameleers +# * Update. # -# Run 'sh p7zip.SlackBuild --cleanup' to build a Slackware package. +# Run 'sh p7zip.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # @@ -47,7 +49,7 @@ # Set initial variables: PRGNAM=p7zip -VERSION=${VERSION:-4.57} +VERSION=${VERSION:-4.65} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-alien} @@ -76,30 +78,18 @@ trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR set -u P1=${1:-1} -# Slackware 11 and up need other option (gcc > 3.3.x) -if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 40 ]; then - ARCHEXTRA="_gcc_4.X" -else - ARCHEXTRA="" -fi -if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then - MOPT=tune -else - MOPT=cpu -fi - case "$ARCH" in - i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" + i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" - ARCHSUFFIX="x86_ppc_alpha${ARCHEXTRA}" + ARCHSUFFIX="x86_ppc_alpha_gcc_4.X" ;; s390) SLKCFLAGS="-O2" SLKLDFLAGS=""; LIBDIRSUFFIX="" - ARCHSUFFIX="x86_ppc_alpha${ARCHEXTRA}" + ARCHSUFFIX="x86_ppc_alpha_gcc_4.X" ;; powerpc) SLKCFLAGS="-O2" SLKLDFLAGS=""; LIBDIRSUFFIX="" - ARCHSUFFIX="x86_ppc_alpha${ARCHEXTRA}" + ARCHSUFFIX="x86_ppc_alpha_gcc_4.X" ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" @@ -107,7 +97,7 @@ case "$ARCH" in ;; athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" SLKLDFLAGS=""; LIBDIRSUFFIX="" - ARCHSUFFIX="x86_ppc_alpha${ARCHEXTRA}" + ARCHSUFFIX="x86_ppc_alpha_gcc_4.X" ;; esac @@ -150,11 +140,7 @@ echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." -if $(file ${SOURCE} | grep -q ": bzip2"); then - tar -xjvf ${SOURCE} -elif $(file ${SOURCE} | grep -q ": gzip"); then - tar -xzvf ${SOURCE} -fi +tar -xvf ${SOURCE} mv ${PRGNAM}_${VERSION} ${PRGNAM}-${VERSION} cd ${PRGNAM}-${VERSION} chown -R root:root . @@ -179,7 +165,11 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/doc/$PRGNAM-$VERSION/DOCS/* $PKG/usr/doc/$PRGNAM-$VERSION/ && \ rmdir $PKG/usr/doc/$PRGNAM-$VERSION/DOCS cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $SRCDIR/$(basename $0) | sed \ + -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \ + -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \ + -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \ + > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc -type f -exec chmod 644 {} \; # Compress the man page(s): @@ -189,17 +179,12 @@ if [ -d $PKG/usr/man ]; then fi # Strip binaries: -cd $PKG -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -cd - +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc -if [ -f $SRCDIR/doinst.sh ]; then - cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh -fi # Build the package: cd $PKG @@ -209,8 +194,3 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt -# Clean up the extra stuff: -if [ "$P1" = "--cleanup" ]; then - rm -rf $TMP/tmp-$PRGNAM - rm -rf $PKG -fi -- cgit v1.2.3-65-gdbad