diff options
author | Marco Bonetti <sid77@slackware.it> | 2011-12-10 16:44:25 -0600 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-12-10 21:58:16 -0200 |
commit | d25436bde7f1404e0d2c40763be03c696a8caa1b (patch) | |
tree | 5d845b65624fd8439d23f1f5950d75d930ec36d7 /desktop/wmii/wmii.SlackBuild | |
parent | b53f581a61d7b6a6b60f97f7b93a189cc30547cf (diff) | |
download | slackbuilds-d25436bde7f1404e0d2c40763be03c696a8caa1b.tar.gz |
desktop/wmii: Added (window manager improved 2)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'desktop/wmii/wmii.SlackBuild')
-rw-r--r-- | desktop/wmii/wmii.SlackBuild | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/desktop/wmii/wmii.SlackBuild b/desktop/wmii/wmii.SlackBuild new file mode 100644 index 0000000000..eb9e63d16b --- /dev/null +++ b/desktop/wmii/wmii.SlackBuild @@ -0,0 +1,125 @@ +#!/bin/sh + +# Slackware build script for wmii + +# Copyright (c) 2011, Marco Bonetti <sid77@slackware.it> +# 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 +SRCNAM=wmii+ixp +VERSION=3.9.2 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tbz +cd $SRCNAM-$VERSION +chown -R root:root . +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 {} \; + +# Fixup config.mk +patch -p1 < $CWD/wmii-3.9.2-config_mk.diff +# Fixup mk/hdr.mk +patch -p1 < $CWD/wmii-3.9.2-mk_hdr_mk.diff + +make \ + OPT="$SLKCLAGS" \ + PREFIX=/usr \ + MAN=/usr/man \ + ETC=/etc \ + LIBDIRSUFFIX=${LIBDIRSUFFIX} + +make install \ + OPT="$SLKCLAGS" \ + PREFIX=$PKG/usr \ + MAN=$PKG/usr/man \ + ETC=$PKG/etc \ + LIBDIRSUFFIX=${LIBDIRSUFFIX} + +# Add wmii to xwmconfig's list... +install -D -m 0755 $CWD/xinitrc.wmii $PKG/etc/X11/xinit/xinitrc.wmii +# ...and the required startup script +install -D -m 0755 $CWD/wmii.xinit $PKG/usr/bin/wmii.xinit +# Add a simple wmii.desktop so it can be started from kdm +install -D -m 0644 $CWD/wmii.desktop $PKG/usr/share/apps/kdm/sessions/wmii.desktop + +# Don't clobber config files +mv $PKG/etc/wmii/welcome $PKG/etc/wmii/welcome.new +mv $PKG/etc/wmii/wmiirc $PKG/etc/wmii/wmiirc.new +mv $PKG/etc/wmii/plan9port/wmiirc $PKG/etc/wmii/plan9port/wmiirc.new +mv $PKG/etc/wmii/python/wmiirc $PKG/etc/wmii/python/wmiirc.new +mv $PKG/etc/wmii/ruby/wmiirc $PKG/etc/wmii/ruby/wmiirc.new + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; + +mv $PKG/usr/share/doc $PKG/usr +mv $PKG/usr/doc/$PRGNAM $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 +( 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} |