diff options
Diffstat (limited to 'network/elinks/elinks.SlackBuild')
-rw-r--r-- | network/elinks/elinks.SlackBuild | 89 |
1 files changed, 56 insertions, 33 deletions
diff --git a/network/elinks/elinks.SlackBuild b/network/elinks/elinks.SlackBuild index 48769d4771..b402bed806 100644 --- a/network/elinks/elinks.SlackBuild +++ b/network/elinks/elinks.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for elinks -# Copyright 2014 David Woodfall <dave@dawoodfall.net> +# Copyright 2014 David Woodfall <dave@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -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=elinks -VERSION=${VERSION:-git20131231} -BUILD=${BUILD:-10} +VERSION=${VERSION:-20170723_f86be65} +COMMIT=${VERSION#*_} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -34,50 +38,62 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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="-g0 -O0 -march=i486 -mtune=i686 -fno-strict-aliasing -Wno-pointer-sign" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-g0 -O0 -march=i586 -mtune=i686 -fno-strict-aliasing -Wno-pointer-sign" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-g0 -O0 -march=i686 -mtune=i686 -fno-strict-aliasing -Wno-pointer-sign" + SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-g0 -O0 -fPIC -fno-strict-aliasing -Wno-pointer-sign" - SLKLDFLAGS="-m64" + SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else - SLKCFLAGS="-go -O0" + SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi +# A much more peaceful build +SLKCFLAGS="$SLKCFLAGS -fno-strict-aliasing -Wno-pointer-sign" + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$COMMIT +tar xvf $CWD/$COMMIT.tar.?z || tar xvf $CWD/$PRGNAM-$COMMIT.tar.?z +cd $PRGNAM-$COMMIT chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -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 {} \; + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# fix documentation generation on 15.0. +# xmlto needs --skip-validation or it fails. +sed -i 's/$(XMLTO) -o/$(XMLTO) --skip-validation -o/' doc/Makefile -for patch in $CWD/patches/* -do +for patch in $CWD/patches/*; do patch --verbose -p1 < $patch done +# patches for no suspend (^Z) and -no-connect by default +# courtesy of B. Watson. +[ "${NO_SUSPEND:-no}" = "yes" ] && + patch --verbose -p1 -i $CWD/option-patches/0010-* +[ "${NO_CONNECT:-no}" = "yes" ] && + patch --verbose -p1 -i $CWD/option-patches/0020-* + # System [ "${FASTMEM:-no}" = "yes" ] && fastmem="--enable-fastmem" [ "${CGI:-no}" = "yes" ] && cgi="--enable-cgi" @@ -114,8 +130,11 @@ done [ "${NNTP:-no}" = "yes" ] && nntp="--enable-nntp" [ "${SMB:-no}" = "yes" ] && smb="--enable-smb" -autoreconf -CFLAGS="$SLKCFLAGS -L/usr/lib64" \ +# quiet some more warnings +sed "s,^aclocal,& -Wnone," -i autogen.sh + +./autogen.sh +CFLAGS="$SLKCFLAGS -L/usr/lib$LIBDIRSUFFIX" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBDIRSUFFIX \ @@ -124,6 +143,7 @@ CFLAGS="$SLKCFLAGS -L/usr/lib64" \ --mandir=/usr/man \ --infodir=/usr/info \ --docdir=/usr/doc/$PRGNAM-$VERSION \ + --htmldir=/usr/doc/$PRGNAM-$VERSION/html \ $fastmem \ $cgi \ $combining \ @@ -153,23 +173,26 @@ CFLAGS="$SLKCFLAGS -L/usr/lib64" \ --build=$ARCH-slackware-linux make +# html doesn't install so we copy it later +make -C doc html make install DESTDIR=$PKG -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 - -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 +strip --strip-unneeded $PKG/usr/bin/$PRGNAM +gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION + cp -a \ - AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/html doc/*txt \ - contrib \ + AUTHORS BUGS COPYING NEWS README SITES THANKS TODO ChangeLog contrib \ + doc/*txt doc/manual.html-chunked \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# don't need these +find $PKG \( -name ".gitignore" -o -name "manual.proc" \) -delete + 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 |