aboutsummaryrefslogtreecommitdiff
path: root/system/smart/smart.SlackBuild
diff options
context:
space:
mode:
authorMarcin Slodkiewicz <slociu@wp.pl>2013-12-03 07:57:36 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2013-12-03 07:57:36 +0700
commit45374bcd46037e98818685dd3e1584a04b786668 (patch)
tree6597c7f3e59ddfbdc4066dd05cde0d459ea511ff /system/smart/smart.SlackBuild
parentfbace84e4f664a76c7efe958a11899d4db6980e2 (diff)
system/smart: Added (meta-package manager).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/smart/smart.SlackBuild')
-rw-r--r--system/smart/smart.SlackBuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/system/smart/smart.SlackBuild b/system/smart/smart.SlackBuild
new file mode 100644
index 000000000000..af497a9fd175
--- /dev/null
+++ b/system/smart/smart.SlackBuild
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+# Slackware build script for smart
+# Written by Marcin Slodkiewicz <slociu@wp.pl>
+
+PRGNAM=smart
+VERSION=${VERSION:-1.4.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+
+python setup.py build
+python setup.py install \
+--root=/$PKG \
+--prefix=/usr
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README TODO LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+
+mkdir -p $PKG/etc/smart/channels
+cat $CWD/channels > $PKG/etc/smart/channels/channels.new
+
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/smart.desktop > $PKG/usr/share/applications/smart.desktop
+cp $CWD/smart.png $PKG/usr/share/pixmaps/
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mv $PKG/usr/share/man $PKG/usr/man
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+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}