Ticket #111: guake.SlackBuild

File guake.SlackBuild, 1.9 KB (added by grafithaka, 3 years ago)

Slackbuild I wrote for guake

Line 
1#!/bin/sh
2
3# SlackBuild for guake-0.3.1 / Slamd64
4# Written by Georg Michelitsch <gm_ail at gmx dot at>
5# Comes with absolutely no warranty, free to modify/distribute
6
7CWD=$(pwd)
8if [ "$TMP" = ""]; then
9  TMP=/tmp
10 else
11  TMP=/tmp/SB64
12fi
13
14APP=guake
15VERSION=0.3.1
16ARCH=${ARCH:-x86_64}
17BUILD=${BUILD:-1_gsm}
18DISTRO=${DISTRO:-slamd64}
19PKG=$TMP/package-$APP
20
21if [ "$ARCH" = "i486" ]; then
22  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
23elif [ "$ARCH" = "i686" ]; then
24  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
25elif [ "$ARCH" = "x86_64" ]; then
26  SLKCFLAGS="-O2 -fPIC"
27fi
28
29rm -rf $PKG
30mkdir -p $TMP $PKG
31rm -rf $TMP/$APP-$VERSION
32cd $TMP || exit 1
33tar -zxvf $CWD/$APP-$VERSION.tar.gz || exit 1
34cd $APP-$VERSION || exit 1
35chown -R root:root .
36chmod -R u+w,go+r-w,a-s .
37
38CFLAGS="$SLKCFLAGS" \
39  ./configure \
40  --prefix=/usr \
41  --sysconfdir=/etc \
42  --localstatedir=/var \
43  --build=$ARCH-slamd64-linux \
44  --host=$ARCH-slamd64-linux \
45  --libdir=/usr/lib64
46
47make || exit
48make install DESTDIR=$PKG || exit
49 
50mkdir -p $PKG/usr/doc/$APP-$VERSION
51cp -a NEWS ChangeLog AUTHORS INSTALL COPYING README TODO $PKG/usr/doc/$APP-$VERSION
52find $PKG/usr/doc/$APP-$VERSION -type f -exec chmod 664 {} \;
53cat $CWD/$APP.SlackBuild > $PKG/usr/doc/$APP-$VERSION/$APP.SlackBuild
54
55mkdir -p $PKG/install
56cat $CWD/slack-desc > $PKG/install/slack-desc
57
58if [ -e $CWD/doinst.sh.gz ]; then
59        zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
60fi
61
62( cd $PKG
63   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
64   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
65)
66
67if [ -d $PKG/usr/man ]; then
68  ( cd $PKG/usr/man
69  find . -type f -exec gzip -9 {} \;
70  for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
71  ) 
72fi
73
74if [ -d $PKG/usr/info ]; then
75  gzip -9 $PKG/usr/info/*.info
76  rm -f $PKG/usr/info/dir
77fi
78
79cd $PKG
80/sbin/makepkg -l y -c n $TMP/$APP-$VERSION-$ARCH-$BUILD.tgz