summaryrefslogtreecommitdiff
path: root/desktop/desklaunch/desklaunch.SlackBuild
blob: 0b6bc1b9782a2665fa39d9b25d824c1a7245a72c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh

######################################
#       Slackware Build Script       #
######################################
#  BUILDS: Desklaunch                #
#    HOME: http://www.oroborus.org   #
#  AUTHOR: Lehman Black              #
# CONTACT: bzqwerty[at]gmail[dot]com #
######################################

# Modified by the SlackBuilds.org project

PRGNAM=desklaunch
VERSION=1.1.5
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=`pwd`
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
	SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i586" ]; then
	SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
	SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi

rm -rf $PKG $PRGNAM-$VERSION
mkdir -p $TMP $PKG/usr/bin $OUTPUT
cd $TMP
tar xvf $CWD/${PRGNAM}_$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .

# Modify the Makefile so it will use custom CFLAGS if needed
sed -i 's%CFLAGS    =%CFLAGS    +=%g' Makefile

CFLAGS="$SLKCFLAGS" make || exit 1

# Rather than use the install target in the Makefile, let's just install the
# binary manually into the package directory - this avoids having to remove
# directories that are unnecessarily created by the install target
install -D -m 0755 desklaunch $PKG/usr/bin/desklaunch

strip --strip-unneeded $PKG/usr/bin/desklaunch

# Install the example desklaunchrc file provided by Debian :)
cat debian/example_rc > $PKG/usr/doc/$PRGNAM-$VERSION/desklaunchrc.example

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/usr/man/man1
cat debian/desklaunch.1 | gzip -9 > $PKG/usr/man/man1/desklaunch.1.gz

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz