diff options
author | Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> | 2017-07-11 20:59:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-07-12 22:47:52 +0700 |
commit | b88d2f57f08ea61104dfcf05ef6456031b2d41ef (patch) | |
tree | 11dcb1bc6179e843fd367f7e965a358e8fe4cd07 /development/shc/shc.SlackBuild | |
parent | df40e05546f5f72c73c812dbb27c330bf651661f (diff) | |
download | slackbuilds-b88d2f57f08ea61104dfcf05ef6456031b2d41ef.tar.gz |
development/shc: Updated for version 3.9.6, new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/shc/shc.SlackBuild')
-rw-r--r-- | development/shc/shc.SlackBuild | 70 |
1 files changed, 45 insertions, 25 deletions
diff --git a/development/shc/shc.SlackBuild b/development/shc/shc.SlackBuild index f62701a492..d3d52deceb 100644 --- a/development/shc/shc.SlackBuild +++ b/development/shc/shc.SlackBuild @@ -1,10 +1,30 @@ #!/bin/sh -# Slackware build script for shc script compiler -# Updated for Slackware by Roberto Metere <roberto <at> metere <dot> it> +# Slackware build script for shc + +# Previously maintained by Roberto Metere <roberto <at> metere <dot> it> +# Copyright 2017 Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=shc -VERSION=${VERSION:-3.8.7} +VERSION=${VERSION:-3.9.6} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -24,10 +44,10 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" - elif [ "$ARCH" = "i686" ]; then +elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" - elif [ "$ARCH" = "x86_64" ]; then +elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else @@ -41,37 +61,37 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.t* +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz 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 \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# patch Makefile to respect CFLAGS -sed -i "s/CFLAGS =/CFLAGS +=/" Makefile - -make CFLAGS="$SLKCFLAGS" - -# avoid make install errors -mkdir -p $PKG/usr/bin -mkdir -p $PKG/usr/man/man1 -echo yes > yes - -make \ - INSTALL_PATH="$PKG/usr" \ - install < yes - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +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 -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/ -cp -a shc.README CHANGES Copying shc.html $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README README.md AUTHORS COPYING ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |