summaryrefslogtreecommitdiff
path: root/source/xap/windowmaker/windowmaker.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/windowmaker/windowmaker.SlackBuild')
-rwxr-xr-xsource/xap/windowmaker/windowmaker.SlackBuild37
1 files changed, 31 insertions, 6 deletions
diff --git a/source/xap/windowmaker/windowmaker.SlackBuild b/source/xap/windowmaker/windowmaker.SlackBuild
index 8736f058..15e32edf 100755
--- a/source/xap/windowmaker/windowmaker.SlackBuild
+++ b/source/xap/windowmaker/windowmaker.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,20 @@
VERSION=20060427cvs
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:-" -j7 "}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -36,11 +45,15 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-windowmaker
+
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -50,6 +63,9 @@ tar xvf $CWD/WindowMaker-$VERSION.tar.bz2 || exit 1
cd WindowMaker-$VERSION || exit 1
zcat $CWD/windowmaker.no-mmx.diff.gz | patch -p1 --verbose -F 3 || exit 1
+
+zcat $CWD/windowmaker.png.1.4.0.diff.gz | patch -p1 --verbose || exit 1
+
sh autogen.sh
chown -R root:root .
@@ -89,6 +105,15 @@ mkdir -p $PKG/usr/doc/WindowMaker-$VERSION
cp -a \
AUTHORS BUGFORM BUGS COPYING COPYING.WTFPL FAQ FAQ.I18N FAQ.I18N.cs FAQ.I18N.sk INSTALL INSTALL.cs INSTALL.es INSTALL.fr INSTALL.pt INSTALL.sk MIRRORS NEWS README README.definable-cursor README.pt TODO \
$PKG/usr/doc/WindowMaker-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
cd $TMP
rm -rf WindowMaker-extra-0.1
tar xvf $CWD/WindowMaker-extra-0.1.tar.gz || exit 1
@@ -98,7 +123,7 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-iconsdir=/usr/share/pixmaps \
- $ARCH-slackware-linux
+ --build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
@@ -107,8 +132,8 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/etc/X11/xinit
-cat $CWD/xinitrc.wmaker > $PKG/etc/X11/xinit/xinitrc.wmaker
-chmod 755 $PKG/etc/X11/xinit/xinitrc.wmaker
+zcat $CWD/xinitrc.wmaker.gz > $PKG/etc/X11/xinit/xinitrc.wmaker
+chmod 0755 $PKG/etc/X11/xinit/xinitrc.wmaker
gzip -9 $PKG/usr/man/man1/* $PKG/usr/man/sk/man1/*