blob: 1a45ed03cfa8bb86aac303e343fa881e391d49d0 (
about) (
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
|
#!/bin/sh
# $Id$
# Copyright (c) 2006 Eric Hameleers <alien@slackware.com>
# -----------------------------------------------------------------------------
#
# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: Frozen Bubble
# Descr: Puzzle Bubble clone written in perl
# URL: http://www.frozen-bubble.org
# Needs: SDL_perl >= 1.19.2
# Changelog:
# 1.0.0-1: 09/oct/2006 by Eric Hameleers <alien@slackware.com>
# * Initial build.
#
# Run 'sh SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
# -----------------------------------------------------------------------------
CWD=`pwd`
PRGNAM=frozen-bubble
VERSION=1.0.0
ARCH=${ARCH:-i486}
BUILD=1
if ["$TMP" = ""]; then
TMP=/tmp
fi
PKG=$TMP/package-$PRGNAM
DOCS="AUTHORS CHANGES COPYING INSTALL README $CWD/$PRGNAM.SlackBuild"
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
mkdir -p $PKG
fi
echo "++"
echo "|| Building $PRGNAM-$VERSION"
echo "++"
cd $TMP
tar -jxvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
# Make it work with SDL_perl 1.19 as well as 2.x
patch -p0 < $CWD/${PRGNAM}-makefile.patch 2>&1 | tee $TMP/patch-$PRGNAM.log
# I get segfaults with SDL_Perl 2.1.3 so I disable these:
#patch -p0 < $CWD/${PRGNAM}-sdl_perl.patch 2>&1 | tee -a $TMP/patch-$PRGNAM.log
#patch -p0 < $CWD/${PRGNAM}-editor-sdl_perl.patch 2>&1 | tee -a $TMP/patch-$PRGNAM.log
sed -i -e 's#INSTALLDIRS=.*#PREFIX=${PKG}/usr#' c_stuff/Makefile \
2>&1 | tee -a $TMP/patch-$PRGNAM.log
chown -R root:root .
make \
PREFIX=/usr \
BINDIR=/usr/games \
DATADIR=/usr/share/games \
MANDIR=/usr/man \
2>&1 | tee $TMP/make-$PRGNAM.log
mkdir -p $PKG/usr/{games,man,share}
make install \
PREFIX=$PKG/usr \
BINDIR=$PKG/usr/games \
DATADIR=$PKG/usr/share/games \
MANDIR=$PKG/usr/man \
2>&1 | tee $TMP/install-$PRGNAM.log
# Remove 'special' files
find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" \
| xargs rm -f
# No empty directories
find $PKG -type d -depth -exec rmdir {} \;
mkdir -p $PKG/usr/share/applications
cp -a $CWD/${PRGNAM}.desktop $PKG/usr/share/applications/
mkdir -p $PKG/usr/share/icons/hicolor/16x16
cp -a $TMP/$PRGNAM-$VERSION/icons/${PRGNAM}-icon-16x16.png $PKG/usr/share/icons/hicolor/16x16/${PRGNAM}.png
mkdir -p $PKG/usr/share/icons/hicolor/32x32
cp -a $TMP/$PRGNAM-$VERSION/icons/${PRGNAM}-icon-32x32.png $PKG/usr/share/icons/hicolor/32x32/${PRGNAM}.png
mkdir -p $PKG/usr/share/icons/hicolor/48x48
cp -a $TMP/$PRGNAM-$VERSION/icons/${PRGNAM}-icon-48x48.png $PKG/usr/share/icons/hicolor/48x48/${PRGNAM}.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION/
chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
[ -d $PKG/usr/man ] && \
find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
cd $PKG
makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz
(
cd $TMP && md5sum $PRGNAM-$VERSION-$ARCH-$BUILD.tgz > $PRGNAM-$VERSION-$ARCH-$BUILD.tgz.md5
)
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/$PRGNAM-$VERSION
rm -rf $PKG
fi
|