diff options
Diffstat (limited to 'system/pcp-gui/pcp-gui.SlackBuild')
-rw-r--r-- | system/pcp-gui/pcp-gui.SlackBuild | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/system/pcp-gui/pcp-gui.SlackBuild b/system/pcp-gui/pcp-gui.SlackBuild new file mode 100644 index 0000000000000..3732b47800fa8 --- /dev/null +++ b/system/pcp-gui/pcp-gui.SlackBuild @@ -0,0 +1,79 @@ +#!/bin/sh + +# Slackware build script for pcp-gui + +# Roman Revyakin <rrevyakin@aconex.com> +# ver 1.0 2009-10-05 + +PRGNAM=pcp-gui +VERSION=1.4.5 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.src.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +autoconf + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var/lib/pcp \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --build=$ARCH-slackware-linux + +make +make install DIST_ROOT="$PKG" + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd "$PKG/usr/man" + find . -type f -exec gzip -9 {} \; + for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done +) + +mv $PKG/usr/share/doc $PKG/usr +mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# Create a symlink because some parts of pcp-gui expect the unversioned dir +( cd $PKG/usr/doc ; ln -s $PRGNAM-$VERSION $PRGNAM ) + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |