diff options
author | Antonio Hernández Blas <hba.nihilismus@gmail.com> | 2010-05-11 22:22:06 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-11 22:22:06 +0200 |
commit | 07a93b457868b05e1432e81be694dcf63ab2bf09 (patch) | |
tree | 01373084df066af10bd7c0bbd5d99e824ba49691 /desktop/wmii/wmii.SlackBuild | |
parent | dd33b1582a2478df8b97cac944e6c324afb5a7b5 (diff) |
desktop/wmii: Updated for version 3.6
Diffstat (limited to 'desktop/wmii/wmii.SlackBuild')
-rw-r--r-- | desktop/wmii/wmii.SlackBuild | 67 |
1 files changed, 50 insertions, 17 deletions
diff --git a/desktop/wmii/wmii.SlackBuild b/desktop/wmii/wmii.SlackBuild index 7e82401fdbe4f..c7171ff597ebe 100644 --- a/desktop/wmii/wmii.SlackBuild +++ b/desktop/wmii/wmii.SlackBuild @@ -1,16 +1,34 @@ #!/bin/sh # Slackware build script for wmii -# Written by eroc <eroc@linuxmail.org> -# Thanks to selkfoster <selkfoster@gmail.com> -# Modified by the SlackBuilds.org project +# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com> +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1.- Redistributions of source code 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. + +# Thanks to selkfoster <selkfoster@gmail.com> PRGNAM=wmii -VERSION=3.5.1 +VERSION=3.6 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -20,29 +38,44 @@ 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 -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . -chmod -R a-s,u+rw,go-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 {} \; # Fix the prefix, sysconfdir, and mandir -sed -i s#'PREFIX = /usr/local'#'PREFIX = /usr'# config.mk || exit 1 -sed -i s#'CONFPREFIX = ${PREFIX}/etc'#'CONFPREFIX = /etc/X11'# config.mk || exit 1 -sed -i s#'MANPREFIX = ${PREFIX}/share/man'#'MANPREFIX = ${PREFIX}/man'# config.mk || exit 1 -# Fix the CFLAGS -sed -i 's/CFLAGS = -Os /CFLAGS += /g' config.mk || exit 1 +sed -i \ + -e 's:^PREFIX = /usr/local:PREFIX = /usr:' \ + -e 's:^MAN = \${PREFIX}/share/man:MAN = /usr/man:' \ + -e 's:^ETC = \${PREFIX}/etc:ETC = /etc/X11:' \ + config.mk +CFLAGS="$SLKCFLAGS" make -CFLAGS="$SLKCFLAGS" make || exit 1 -make install DESTDIR=$PKG || exit 1 +# This is *needed* to install wmii under $PKG +sed -i \ + -e 's:^PREFIX = /usr:PREFIX = '${PKG}'/usr:' \ + -e 's:^MAN = /usr/man:MAN = '${PKG}'/usr/man:' \ + -e 's:^ETC = /etc/X11:ETC = '${PKG}'/etc/X11:' \ + -e 's:^LIBIXP =.*:LIBIXP = /usr/lib/libixp.a:' \ + config.mk +make install ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) @@ -55,7 +88,7 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# xwmconfig is your friend. +# Add wmii to xwmconfig's list install -D -m 0755 $CWD/xinitrc.wmii $PKG/etc/X11/xinit/xinitrc.wmii mkdir -p $PKG/install |