diff options
Diffstat (limited to 'network/felinks/felinks.SlackBuild')
-rw-r--r-- | network/felinks/felinks.SlackBuild | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/network/felinks/felinks.SlackBuild b/network/felinks/felinks.SlackBuild index b503d6ed01..2331689b7c 100644 --- a/network/felinks/felinks.SlackBuild +++ b/network/felinks/felinks.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for felinks # Copyright 2014 David Woodfall <dave@dawoodfall.net> @@ -21,10 +21,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=felinks -VERSION=${VERSION:-0.13.5} +SRCNAM=elinks +VERSION=${VERSION:-0.15.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -34,16 +38,20 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # Added -fno-strict-aliasing -Wno-pointer-sign for a much more peaceful build -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686 -fno-strict-aliasing -Wno-pointer-sign" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i586" ]; then +if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fno-strict-aliasing -Wno-pointer-sign" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then @@ -64,9 +72,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.?z -cd $PRGNAM-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.?z +cd $SRCNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -74,11 +82,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -for patch in $CWD/patches/*; do - printf "\n%s\n" "Applying Patch $( basename $patch )" - patch --verbose -p1 < $patch -done - ## System [ "${FASTMEM:-no}" = "yes" ] && fastmem="--enable-fastmem" [ "${DEBUG:-no}" = "yes" ] && debug="--enable-debug --disable-fastmem" @@ -174,9 +177,8 @@ LDFLAGS="$SLKLDFLAGS" \ # Don't clobber the one supplied by glibc-i18n. rm -f $PKG/usr/share/locale/locale.alias -if [ "$DEBUG" = "no" ]; then - 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 +if [ "${DEBUG:-no}" = "no" ]; then + strip --strip-unneeded $PKG/usr/bin/$SRCNAM fi find $PKG/usr/man -type f -exec gzip -9 {} \; @@ -189,8 +191,11 @@ cp -a \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# Remove any .git remnants +find $PKG -name ".git*" -exec rm -vrf {} \; + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |