1 | #!/bin/bash |
---|
2 | #Gebruik deze file als voorbeeld. Plaats de source tar.gz file in de zelfde directory als deze slackbuild |
---|
3 | #Met de NEED en DEP opties is het mogelijk om build dependencies aan te geven. |
---|
4 | #Voor de meeste packages hoeft er verder niks aan de variabellen veranderd te worden. |
---|
5 | ##################################### Build dependency info: |
---|
6 | |
---|
7 | #DEP:python |
---|
8 | #DEP:python_setuptools |
---|
9 | #DEP:gtk2 |
---|
10 | #DEP:python_pygobject |
---|
11 | #DEP:python_pycairo |
---|
12 | |
---|
13 | #######Essential package info. |
---|
14 | #Change these if autodetection fails. |
---|
15 | |
---|
16 | #Name of the Syn-3 package that we are going to create |
---|
17 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
18 | |
---|
19 | #Archive of the sourcefiles to unpack |
---|
20 | SRC_ARC=`ls *.tar.* *.zip 2>/dev/null` |
---|
21 | |
---|
22 | #Version of the sourcefiles |
---|
23 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'` |
---|
24 | |
---|
25 | #Architecture that the created binaries run on. |
---|
26 | #Use noarch for scripts. |
---|
27 | ARCH=`uname -m` |
---|
28 | |
---|
29 | ########Build and create the pacakge. |
---|
30 | #Uncomment the stuff that you dont want or need |
---|
31 | |
---|
32 | #Unpack source |
---|
33 | #(uncomment if not needed) |
---|
34 | syn3_unpack $SRC_ARC || exit 1 |
---|
35 | |
---|
36 | #Directory where the sourcefiles are unpacked. |
---|
37 | #(you might have to adjust this if autodetection fails) |
---|
38 | SRC_DIR=`ls -c|head -1` |
---|
39 | |
---|
40 | #apply patches |
---|
41 | #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 |
---|
42 | |
---|
43 | export CFLAGS="-fgnu89-inline" #If "multiple definition of `foo'" Also see http://gcc.gnu.org/gcc-4.3/porting_to.html |
---|
44 | |
---|
45 | |
---|
46 | #AUTOMAKE: Configure |
---|
47 | pushd $SRC_DIR || exit 1 |
---|
48 | ./configure --prefix=/usr || exit 1 |
---|
49 | |
---|
50 | #AUTOMAKE: Compile |
---|
51 | MAKE_OPTS="" |
---|
52 | make $MAKE_OPTS >/dev/null || exit 1 |
---|
53 | |
---|
54 | |
---|
55 | #AUTOMAKE: Install |
---|
56 | mkdir -p /tmp/pkg &>/dev/null |
---|
57 | make pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install >/dev/null || exit 1 |
---|
58 | popd |
---|
59 | |
---|
60 | #strip bins and other stuff |
---|
61 | syn3_strip /tmp/pkg || exit 1 |
---|
62 | |
---|
63 | #move development stuff and create seperate development package |
---|
64 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
65 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
66 | |
---|
67 | #make main package |
---|
68 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|
69 | |
---|
70 | |
---|