aboutsummaryrefslogtreecommitdiff
path: root/desktop/wmii/wmii.SlackBuild
diff options
context:
space:
mode:
authorAntonio Hernández Blas <hba.nihilismus@gmail.com>2010-05-13 00:23:28 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:23:28 +0200
commit821a7ad35c312be274e3dca3316e1cb8f8d42789 (patch)
treefbfa54a29124194a38167964ff6e541db1c24abf /desktop/wmii/wmii.SlackBuild
parentb1458525dcc4ce8c9310ef8ad84a3e5c04431215 (diff)
desktop/wmii: Updated for version 3.6
Diffstat (limited to 'desktop/wmii/wmii.SlackBuild')
-rw-r--r--desktop/wmii/wmii.SlackBuild58
1 files changed, 35 insertions, 23 deletions
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}