diff options
author | Antonio Hernández Blas <hba.nihilismus@gmail.com> | 2010-05-13 00:23:28 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-13 00:23:28 +0200 |
commit | 821a7ad35c312be274e3dca3316e1cb8f8d42789 (patch) | |
tree | fbfa54a29124194a38167964ff6e541db1c24abf | |
parent | b1458525dcc4ce8c9310ef8ad84a3e5c04431215 (diff) |
desktop/wmii: Updated for version 3.6
-rw-r--r-- | desktop/wmii/README | 3 | ||||
-rw-r--r-- | desktop/wmii/doinst.sh | 17 | ||||
-rw-r--r-- | desktop/wmii/wmii-3.6-config_mk.diff | 29 | ||||
-rw-r--r-- | desktop/wmii/wmii.SlackBuild | 58 | ||||
-rw-r--r-- | desktop/wmii/wmii.info | 4 | ||||
-rw-r--r-- | desktop/wmii/xinitrc.wmii | 28 |
6 files changed, 93 insertions, 46 deletions
diff --git a/desktop/wmii/README b/desktop/wmii/README index 052907cd3adff..641a3381370dd 100644 --- a/desktop/wmii/README +++ b/desktop/wmii/README @@ -7,5 +7,4 @@ with a new tagging approach. Its minimalist philosophy attempts to not exceed 10.000 lines of code (including all shipped utilities and libraries), to enforce simplicity and clarity. -Note: wmii requires 'libixp','plan9port' and dmenu. -All availiable at SlackBuilds.org. +This requires libixp, plan9port, and dmenu. diff --git a/desktop/wmii/doinst.sh b/desktop/wmii/doinst.sh new file mode 100644 index 0000000000000..7fb1a58aff1d7 --- /dev/null +++ b/desktop/wmii/doinst.sh @@ -0,0 +1,17 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/wmii-3.5/wmiirc.new +config etc/wmii-3.5/welcome.new +config etc/wmii-3.5/rc.wmii.new + diff --git a/desktop/wmii/wmii-3.6-config_mk.diff b/desktop/wmii/wmii-3.6-config_mk.diff new file mode 100644 index 0000000000000..81d0225ad0381 --- /dev/null +++ b/desktop/wmii/wmii-3.6-config_mk.diff @@ -0,0 +1,29 @@ +diff -Nur wmii-3.6.orig/config.mk wmii-3.6/config.mk +--- wmii-3.6.orig/config.mk 2007-11-16 07:59:15.000000000 -0600 ++++ wmii-3.6/config.mk 2009-08-03 01:14:13.179886673 -0500 +@@ -10,11 +10,12 @@ + + # Includes and libs + INCPATH = .:${ROOT}/include:${INCLUDE}:/usr/include +-LIBS = -L/usr/lib -lc -L${ROOT}/lib ++LIBS = -L${LIBDIR} -lc -L${ROOT}/lib + + # Flags + include ${ROOT}/mk/gcc.mk +-CFLAGS += -g -O0 -DIXPlint ++OPT ?= -O0 ++CFLAGS += -g ${OPT} -DIXPlint + LDFLAGS += -g ${LIBS} + STATIC = -static + MKDEP = cpp -M +@@ -29,8 +30,8 @@ + AWKPATH = $$(which awk) + P9PATHS = ${PLAN9}:"'$${HOME}/plan9'":/usr/local/plan9:/usr/local/9:/opt/plan9:/opt/9:/usr/plan9:/usr/9 + +-INCX11 = -I/usr/X11R6/include +-LIBX11 = -L/usr/X11R6/lib -lX11 ++INCX11 = -I${PREFIX}include ++LIBX11 = -L${LIBDIR}/X11 -lX11 + LIBICONV = # Leave blank if your libc includes iconv (glibc does) + LIBIXP = ${ROOT}/libixp/libixp.a + LIBIXP = ${LIBDIR}/libixp.a diff --git a/desktop/wmii/wmii.SlackBuild b/desktop/wmii/wmii.SlackBuild index c7171ff597ebe..c9943b622171d 100644 --- a/desktop/wmii/wmii.SlackBuild +++ b/desktop/wmii/wmii.SlackBuild @@ -36,10 +36,13 @@ 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 @@ -48,7 +51,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find . \ @@ -57,26 +60,37 @@ find . \ \( -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 \ - -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 - -# 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 +# Fixup config.mk +patch -p1 < $CWD/wmii-3.6-config_mk.diff + +make \ + OPT="$SLKCLAGS" \ + PREFIX=/usr \ + MAN=/usr/man \ + ETC=/etc \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} + +make install \ + OPT="$SLKCLAGS" \ + PREFIX=$PKG/usr \ + MAN=$PKG/usr/man \ + ETC=$PKG/etc \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} +# Nothing is installed to LIBDIR + +# Add wmii to xwmconfig's list +install -D -m 0755 $CWD/xinitrc.wmii $PKG/etc/X11/xinit/xinitrc.wmii + +# Don't clobber config files +mv $PKG/etc/wmii-3.5/wmiirc $PKG/etc/wmii-3.5/wmiirc.new +mv $PKG/etc/wmii-3.5/welcome $PKG/etc/wmii-3.5/welcome.new +mv $PKG/etc/wmii-3.5/rc.wmii $PKG/etc/wmii-3.5/rc.wmii.new ( 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 "shared object" | 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 ) ( cd $PKG/usr/man @@ -88,11 +102,9 @@ 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 -# Add wmii to xwmconfig's list -install -D -m 0755 $CWD/xinitrc.wmii $PKG/etc/X11/xinit/xinitrc.wmii - 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.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/desktop/wmii/wmii.info b/desktop/wmii/wmii.info index 85fa22a453d74..5e40619994829 100644 --- a/desktop/wmii/wmii.info +++ b/desktop/wmii/wmii.info @@ -3,6 +3,8 @@ VERSION="3.6" HOMEPAGE="http://wmii.suckless.org" DOWNLOAD="http://code.suckless.org/dl/wmii/wmii-3.6.tar.gz" MD5SUM="9d17a09871fada998b4d989d9318bbf5" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Antonio Hernández Blas" EMAIL="hba.nihilismus@gmail.com" -APPROVED="David Somero" +APPROVED="dsomero" diff --git a/desktop/wmii/xinitrc.wmii b/desktop/wmii/xinitrc.wmii index 8d6372a83972c..81387b8890488 100644 --- a/desktop/wmii/xinitrc.wmii +++ b/desktop/wmii/xinitrc.wmii @@ -1,30 +1,18 @@ #!/bin/sh -# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $ userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap -sysresources=/usr/lib/X11/xinit/.Xresources -sysmodmap=/usr/lib/X11/xinit/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap -# merge in defaults and keymaps - -if [ -f $sysresources ]; then - xrdb -merge $sysresources -fi - -if [ -f $sysmodmap ]; then - xmodmap $sysmodmap -fi - -if [ -f $userresources ]; then - xrdb -merge $userresources -fi - -if [ -f $usermodmap ]; then - xmodmap $usermodmap -fi +# Merge in defaults and keymaps +[ -f $sysresources ] && xrdb -merge $sysresources +[ -f $sysmodmap ] && xmodmap $sysmodmap +[ -f $userresources ] && xrdb -merge $userresources +[ -f $usermodmap ] && xmodmap $usermodmap # Start the window manager: until wmii; do true done + |