diff options
author | Frank Caraballo <fecaraballo{at}gmail{dot}com> | 2010-05-12 17:38:05 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 17:38:05 +0200 |
commit | bbe2cab46caaabd380fbb4598bfa6086049594f0 (patch) | |
tree | ad5f19b2390883c7c2ca5f4fa1227fb86d108295 /desktop/slim/slim.SlackBuild | |
parent | a4c27216dc6abb7b9272afead8db969f371e95f4 (diff) | |
download | slackbuilds-bbe2cab46caaabd380fbb4598bfa6086049594f0.tar.gz |
desktop/slim: Updated for version 1.3.1
Diffstat (limited to 'desktop/slim/slim.SlackBuild')
-rw-r--r-- | desktop/slim/slim.SlackBuild | 75 |
1 files changed, 42 insertions, 33 deletions
diff --git a/desktop/slim/slim.SlackBuild b/desktop/slim/slim.SlackBuild index 4c9e2879f4..ba902f6718 100644 --- a/desktop/slim/slim.SlackBuild +++ b/desktop/slim/slim.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Slackware build script for slim +# Slackware build script for SLiM # Copyright 2006 Martin Lefebvre <dadexter@gmail.com> # All rights reserved. @@ -22,10 +22,12 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Script maintained by Frank Caraballo <fecaraballo{at}gmail{dot}com> + PRGNAM=slim -VERSION=1.3.0 +VERSION=${VERSION:-1.3.1} ARCH=${ARCH:-i486} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -34,59 +36,66 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # Since PAM is not included on a stock Slackware system, default to NO. -# If you (shudder) have PAM installed, then run the build script like this: -# PAM=YES ./slim.SlackBuild -PAM=${PAM:-NO} +# If you have PAM installed, then run the build script like this: +# USE_PAM=1 ./slim.SlackBuild +USE_PAM=${USE_PAM:-""} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . -chmod -R a-s,u+w,go+r-w . +find . \ + \( -perm 777 -o -perm 775 -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 {} \; -# Edit Makefile to set proper CFLAGS/CXXFLAGS -# If you want different flags, then you'll need to modify the patch(es) -if [ "$ARCH" = "i486" ]; then - zcat $CWD/Makefile-i486.diff.gz | patch -p0 || exit 1 -elif [ "$ARCH" = "i686" ]; then - zcat $CWD/Makefile-i686.diff.gz | patch -p0 || exit 1 -fi +# Correct the path used for suspend: +patch -p0 < $CWD/slim.conf.patch -if [ "$PAM" = "YES" ]; then - make USE_PAM=1 -else - make || exit 1 -fi +make \ + CFLAGS+="$SLKCFLAGS" \ + USE_PAM=${USE_PAM} +make install DESTDIR=$PKG + +# Don't overwrite existing config file: +mv $PKG/etc/slim.conf $PKG/etc/slim.conf.new -make install DESTDIR=$PKG || exit 1 +# Add the slackware-black theme to the package: +tar xvf $CWD/slackware-black.tar.bz2 -C $PKG/usr/share/slim/themes ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + 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 ) -if [ -d $PKG/usr/man ]; then -( cd $PKG/usr/man +( cd $PKG/usr/man || exit 1 find . -type f -exec gzip -9 {} \; - for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) -fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING ChangeLog INSTALL README THEMES TODO xinitrc.sample \ +cp -a ChangeLog COPYING INSTALL README THEMES TODO xinitrc.sample \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -mkdir -p $PKG/etc/rc.d -cat $CWD/rc.slim > $PKG/etc/rc.d/rc.slim.new -mv $PKG/etc/slim.conf $PKG/etc/slim.conf.new - cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |