aboutsummaryrefslogtreecommitdiff
path: root/games/xpenguins/xpenguins.SlackBuild
blob: 105cc7d3a0612ebccd70a079266bef340155595b (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/sh

CWD=`pwd`
NAME=xpenguins
VERSION=2.2
ARCH=i586
BUILD=1
PKGNAME=$NAME
PKGVER=$VERSION
BASEDIR=$PKGNAME-$PKGVER
ARCHIVE=$BASEDIR.tar.gz
THEMES="$NAME"_themes-1.0.tar.gz
REPOSITORY=http://xpenguins.seul.org
FLAGS="-O2 -march=pentium -mcpu=pentium -fno-strength-reduce \
 -fomit-frame-pointer -ffast-math"
PKG=/tmp/package-$NAME

rm -rf $PKG
mkdir -p $PKG

# Obtain sources
if [ ! -e $ARCHIVE ]; then
  if `wget "$REPOSITORY/$ARCHIVE"`; then
    true
  else
    exit 1
  fi
fi
if [ ! -e $THEMES ]; then
  if `wget "$REPOSITORY/$ARCHIVE"`; then
    true
  else
    exit 1
  fi
fi

# Compile
cd /tmp
tar zxvf $CWD/$ARCHIVE
cd $BASEDIR
bzcat $CWD/$NAME-$VERSION-icon.patch.bz2 | patch -p1 -s
CFLAGS=$FLAGS CXXFLAGS=$FLAGS ./configure --prefix=/usr \
 --bindir=/usr/X11R6/bin --mandir=/usr/X11R6/man --datadir=/usr/share/games
make

# Install
make install DESTDIR=$PKG
mkdir -p $PKG/install $PKG/usr/doc/$NAME-$VERSION $PKG/etc/X11/icons \
 $PKG/etc/X11/apps/Games/Desktop
cat > $PKG/install/slack-desc <<EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

         |-----handy-ruler------------------------------------------------------|
xpenguins: xpenguins
xpenguins:
xpenguins: Xpenguins makes little penguins invade your X screen. They fly, run
xpenguins: on your windows and do all sorts of weird things. If you have some
xpenguins: spare time, this can be what you are looking for, but you can also
xpenguins: amaze your friends with this wonder. If somehow you don't like
xpenguins: penguins, there are other themes included in this package.
xpenguins:
xpenguins:
xpenguins:
xpenguins:
EOF

cat > $PKG/install/slack-required <<EOF
x11 >= 6.8.1-i486-1
EOF

cat > $PKG/etc/X11/apps/Games/Desktop/Xpenguins.desktop <<EOF
[Desktop Entry]

Encoding=UTF-8
Name=X Penguins
GenericName=Penguins
GenericName[fr]=Pingouins
Type=Application
Exec=xpenguins
Icon=/etc/X11/icons/Xpenguins.png
Terminal=0

X-KDE-StartupNotify=false

Comment=Penguins on your desktop
Comment[fr]=Des pingouins sur votre bureau
EOF

uudecode xpenguins.uu
install -m644 -g0 -o0 Xpenguins.png $PKG/etc/X11/icons

install -m644 -g0 -o0 AUTHORS ChangeLog README \
 $PKG/usr/doc/$NAME-$VERSION

mv $PKG/usr/X11R6/man/man1/xpenguins.1 \
 $PKG/usr/X11R6/man/man1/xpenguins.1x

chmod 444 $PKG/usr/X11R6/man/man?/*.?x
gzip -9nf $PKG/usr/X11R6/man/man?/*.?x

strip $PKG/usr/X11R6/bin/* || :

(
  cd $PKG/usr/share/games/xpenguins
  tar zxvf $CWD/$THEMES
)

chown -R root.root $PKG
chgrp bin $PKG/usr/X11R6/bin $PKG/usr/X11R6/bin/*

# Make package
cd $PKG
cat install/slack-desc | grep "$NAME:" > /tmp/$NAME-$VERSION-$ARCH-$BUILD.txt
makepkg -l y -c n /tmp/$NAME-$VERSION-$ARCH-$BUILD.tgz