diff options
author | Thomas Morper <thomas@beingboiled.info> | 2014-03-11 07:23:26 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-03-12 12:42:50 -0500 |
commit | 574724696f8780450e27b16576e304d67513f1a0 (patch) | |
tree | d4c1f3daea260f842df06d4d92570ba1b06cac3d /misc/par2cmdline/par2cmdline.SlackBuild | |
parent | 7ef7a202a10673cdfc17da234b988ac2ce9ae355 (diff) | |
download | slackbuilds-574724696f8780450e27b16576e304d67513f1a0.tar.gz |
misc/par2cmdline: Updated for version 0.6.5.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/par2cmdline/par2cmdline.SlackBuild')
-rw-r--r-- | misc/par2cmdline/par2cmdline.SlackBuild | 83 |
1 files changed, 51 insertions, 32 deletions
diff --git a/misc/par2cmdline/par2cmdline.SlackBuild b/misc/par2cmdline/par2cmdline.SlackBuild index 589783a415..f1101051ea 100644 --- a/misc/par2cmdline/par2cmdline.SlackBuild +++ b/misc/par2cmdline/par2cmdline.SlackBuild @@ -1,12 +1,29 @@ #!/bin/sh # Slackware build script for par2cmdline -# Written by Thomas Morper <thomas@beingboiled.info> -# Thanks to maldoror for the previous version of this script -# Thanks to Debian, Fedora and Gentoo for patches and the man page + +# Copyright 2014, Thomas Morper <thomas@beingboiled.info>, Augsburg, Germany +# 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=par2cmdline -VERSION=${VERSION:-0.4} +VERSION=${VERSION:-0.6.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -43,29 +60,22 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/v$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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -# Fix wrong permissions -chmod 644 ChangeLog NEWS - -# Make it work with gcc4 -patch -p1 < $CWD/patches/gcc4.patch - -# Fix crash in quiet mode -patch -p1 < $CWD/patches/offset.patch + \( -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 {} \; -# Kill warnings (and fix a PPC compilation error) -patch -p1 < $CWD/patches/letype.patch +# Fix permissions. +chmod 644 ChangeLog INSTALL NEWS -# Kill warnings -patch -p1 < $CWD/patches/precedence.patch +# Generate 'configure'. +aclocal +automake --add-missing +autoconf CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -74,30 +84,39 @@ CXXFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux make make check -make install-strip DESTDIR=$PKG - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL NEWS PORTING README ROADMAP \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +make install DESTDIR=$PKG -# Replace the hardlinks with symlinks +# Replace absolute symlinks with relative ones. cd $PKG/usr/bin rm -f par2create; ln -s par2 par2create rm -f par2repair; ln -s par2 par2repair rm -f par2verify; ln -s par2 par2verify +cd - + +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 -# Install the man pages -mkdir -p $PKG/usr/man/man1 -gzip -9 < $CWD/par2.1 > $PKG/usr/man/man1/par2.1.gz +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 + +# Symlink manpage for the command aliases. cd $PKG/usr/man/man1 ln -s par2.1.gz par2create.1.gz ln -s par2.1.gz par2repair.1.gz ln -s par2.1.gz par2verify.1.gz +cd - + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog INSTALL NEWS PORTING README README.md ROADMAP \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |