summaryrefslogtreecommitdiffstats
path: root/openbox
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-05-16 19:48:03 +0000
committer Eric Hameleers <alien@slackware.com>2013-05-16 19:48:03 +0000
commit94ce1236a3cd8ceb0c1393a52e3c9dc53f95d144 (patch)
tree91cb1207bcd86b0144cc1460efa6162705e13855 /openbox
parent4c0a4efaccf3d790c64293bd7d2676186a9cf53c (diff)
downloadasb-94ce1236a3cd8ceb0c1393a52e3c9dc53f95d144.tar.gz
asb-94ce1236a3cd8ceb0c1393a52e3c9dc53f95d144.tar.xz
Update to 3.5.0
Diffstat (limited to 'openbox')
-rwxr-xr-xopenbox/build/openbox.SlackBuild110
1 files changed, 62 insertions, 48 deletions
diff --git a/openbox/build/openbox.SlackBuild b/openbox/build/openbox.SlackBuild
index 0954329f..49f743a4 100755
--- a/openbox/build/openbox.SlackBuild
+++ b/openbox/build/openbox.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2008-2009 Eric Hameleers, Eindhoven, NL
+# Copyright 2008, 2009, 2013 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -27,11 +27,13 @@
# By: Eric Hameleers <alien@slackware.com>
# For: openbox
# Descr: a highly configurable, lighweight window manager
-# URL: http://icculus.org/openbox/
+# URL: http://openbox.org/
# Needs:
# Changelog:
# 3.4.7.2-1: 04/Jun/2008 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 3.5.0-1: 16/may/2013 by Eric Hameleers <alien@slackware.com>
+# * Update. Borrow some of the good stuff from the SBo script.
#
# Run 'sh openbox.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -39,11 +41,8 @@
#
# -----------------------------------------------------------------------------
-# Set initial variables:
-
PRGNAM=openbox
-VERSION=${VERSION:-3.4.7.2}
-ARCH=${ARCH:-i486}
+VERSION=${VERSION:-3.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
@@ -58,47 +57,75 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
-SRCURL="http://icculus.org/${PRGNAM}/releases/${PRGNAM}-${VERSION}.tar.gz"
+SRCURL="http://openbox.org/dist/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
##
## --- with a little luck, you won't have to edit below this point --- ##
##
-# Exit the script on errors:
-set -e
-trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
-# Catch unitialized variables:
-set -u
-P1=${1:-1}
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ armv6hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
case "$ARCH" in
i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- s390) SLKCFLAGS="-O2"
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- powerpc) SLKCFLAGS="-O2"
+ armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- x86_64) SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
;;
esac
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Save old umask and set to 0022:
+_UMASK_=$(umask)
+umask 0022
+
# Create working directories:
mkdir -p $OUTPUT # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG # place for the package to be built
rm -rf $PKG/* # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
+ # remove old log files
# Source file availability:
if ! [ -f ${SOURCE} ]; then
+ echo "Source '$(basename ${SOURCE})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
+ if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL}" == "x" ]; then
- # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
- echo "Source '$(basename ${SOURCE})' not available yet..."
echo "Will download file to $(dirname $SOURCE)"
wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
@@ -123,19 +150,12 @@ echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"
-# Explode the package framework:
-if [ -f $SRCDIR/_$PRGNAM.tar.gz ]; then
- cd $PKG
- explodepkg $SRCDIR/_$PRGNAM.tar.gz
- cd -
-fi
-
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+chmod -R u+w,go+r-w,a+X-s .
echo Building ...
LDFLAGS="$SLKLDFLAGS" \
@@ -154,25 +174,23 @@ CFLAGS="$SLKCFLAGS" \
--enable-session-management \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux \
+ --build=$TARGET \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
-# Install all the needed stuff to the package dir
-# Use installwatch if available, to produce a logfile of the installation
-# process that is more easily readable:
-if $(which installwatch > /dev/null 2>&1); then
- installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install
-else
- make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
-fi
+# Add an xinitrc files to be used by xwmconfig:
+install -D -m 0755 $SRCDIR/xinitrc.openbox $PKG/etc/X11/xinit/xinitrc.openbox
+install -D -m 0755 $SRCDIR/xinitrc.openbox-session $PKG/etc/X11/xinit/xinitrc.openbox-session
-# Add an xinitrc file to be used by xwmconfig:
-mkdir -p $PKG/etc/X11/xinit
-install -m 0755 -o root $SRCDIR/xinitrc.$PRGNAM \
- $PKG/etc/X11/xinit/xinitrc.$PRGNAM
+# Change name of openbox.desktop KDM session file so it corresponds to openbox-session
+( cd $PKG/usr/share/xsessions
+ mv openbox.desktop openbox-session.desktop
+ sed -i "s/Name=Openbox/Name=Openbox-Session/" openbox-session.desktop
+)
-# Make sure that KDM picks up the LXDE session type as well:
+# Make sure that KDM picks up the session files as well:
mkdir -p $PKG/usr/share/apps/kdm/sessions
( cd $PKG/usr/share/apps/kdm/sessions
for i in $(ls ../../../xsessions/*.desktop) ; do ln -sf $i ; done
@@ -205,11 +223,7 @@ EOINS
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
-cat $SRCDIR/$(basename $0) | sed \
- -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \
- -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \
- -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \
- > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;
@@ -225,7 +239,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
# Add a package description:
mkdir -p $PKG/install
-cat $SRCDIR/slack-desc.$PRGNAM > $PKG/install/slack-desc
+cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# Build the package:
cd $PKG