summaryrefslogtreecommitdiff
path: root/source/xap/blackbox/blackbox.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/xap/blackbox/blackbox.SlackBuild
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/xap/blackbox/blackbox.SlackBuild')
-rwxr-xr-xsource/xap/blackbox/blackbox.SlackBuild120
1 files changed, 87 insertions, 33 deletions
diff --git a/source/xap/blackbox/blackbox.SlackBuild b/source/xap/blackbox/blackbox.SlackBuild
index 4505d06e..130355f4 100755
--- a/source/xap/blackbox/blackbox.SlackBuild
+++ b/source/xap/blackbox/blackbox.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,23 +20,48 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# http://downloads.sourceforge.net/project/blackboxwm/blackboxwm/Blackbox%200.70.1/blackbox-0.70.1.tar.bz2
+# http://downloads.sourceforge.net/project/bbkeys/bbkeys/0.9.1/bbkeys-0.9.1.tar.gz
PKGNAM=blackbox
-VERSION=${VERSION:-0.65.0}
-BBVER=${BBVER:-0.8.6}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-4}
-
+VERSION=${VERSION:-0.70.1}
+BBKEYSVER=${BBKEYSVER:-0.9.1}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:-" -j7 "}
+PKGEXT=${PKGEXT:-txz}
+
+# 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
+# Determine the CFLAGS for the known architectures:
+case $ARCH in
+ i486) export SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ export LIBDIRSUFFIX=""
+ export ARCHQUADLET="" ;;
+ i686) export SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ export LIBDIRSUFFIX=""
+ export ARCHQUADLET="" ;;
+ x86_64) export SLKCFLAGS="-O2 -fPIC"
+ export LIBDIRSUFFIX="64"
+ export ARCHQUADLET="" ;;
+ s390) export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+ export ARCHQUADLET="" ;;
+ arm) export SLKCFLAGS="-O2 -march=armv4t"
+ export LIBDIRSUFFIX=""
+ export ARCHQUADLET="-gnueabi" ;;
+ *) export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+ export ARCHQUADLET="" ;;
+esac
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
-fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -46,7 +71,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz || exit 1
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
cd ${PKGNAM}-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
@@ -57,24 +82,33 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Thanks for the gcc-4.1.1 patch, Debian. :-)
-zcat $CWD/blackbox_0.65.0-5.diff.gz | patch -p1 --verbose || exit 1
+# Build fix for gcc-4:
+zcat $CWD/blackbox-0.70.1-gcc-4.3.patch.gz | patch --verbose -p1 || exit 1
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--enable-shape \
--enable-slit \
--enable-interlace \
--enable-nls \
+ --enable-shared=yes \
+ --enable-static=no \
--enable-timed-cache \
- $ARCH-slackware-linux
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
-# Build and install:
+# Build:
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
+# Install onto filesystem - needed for bbkeys to find libbt:
+make install || exit 1
+
+# Install into package:
+make install DESTDIR=$PKG || exit 1
mkdir -p $PKG/etc/X11/xinit
zcat $CWD/xinitrc.blackbox.gz > $PKG/etc/X11/xinit/xinitrc.blackbox
chmod 755 $PKG/etc/X11/xinit/xinitrc.blackbox
@@ -85,12 +119,20 @@ cp -a \
AUTHORS INSTALL LICENSE README* TODO \
$PKG/usr/doc/${PKGNAM}-$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/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
######################################
# Compile bbkeys program for blackbox:
cd $TMP
-rm -rf bbkeys-${BBVER}
-tar xvf $CWD/bbkeys-${BBVER}.tar.gz || exit 1
-cd bbkeys-${BBVER} || exit 1
+rm -rf bbkeys-${BBKEYSVER}
+tar xvf $CWD/bbkeys-${BBKEYSVER}.tar.xz
+cd bbkeys-${BBKEYSVER} || exit 1
# Make sure ownerships and permissions are sane:
chown -R root:root .
@@ -104,18 +146,27 @@ find . \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-interlace \
- $ARCH-slackware-linux
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/bbkeys-$BBKEYSVER \
+ --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
+
+# --docdir isn't honoured:
+sed -i 's?^docdir.*=.*?docdir = /usr/doc/bbkeys-'"$BBKEYSVER"'?g' Makefile
+
+# 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/bbkeys-${BBKEYSVER})
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
-# Build and install:
+# Build and install into package:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-mkdir -p /usr/doc/bbkeys-$BBKEYS
-cp -a \
- AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README* TODO \
- /usr/doc/bbkeys-$BBKEYS
-
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -135,9 +186,12 @@ if [ -d $PKG/usr/man ]; then
)
fi
+# Set doc permissions:
+find $PKG/usr/doc -type f -print0 | xargs -0 chmod 644
+find $PKG/usr/doc -type d -print0 | xargs -0 chmod 755
+
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+install -vpm644 $CWD/slack-desc $PKG/install/
cd $PKG
-/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
-
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.$PKGEXT