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 | |
---|
8 | ##DEP:xorg_lib |
---|
9 | ##DEP:xorg_proto |
---|
10 | #DEP:libpng |
---|
11 | #DEP:libjpeg |
---|
12 | #DEP:libtiff |
---|
13 | #DEP:zlib |
---|
14 | #DEP:freetype2 |
---|
15 | #DEP:bzip2 |
---|
16 | |
---|
17 | #source /etc/xorg_build.conf || exit 1 |
---|
18 | |
---|
19 | #######Essential package info. |
---|
20 | #Change these if autodetection fails. |
---|
21 | |
---|
22 | #Name of the Syn-3 package that we are going to create |
---|
23 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
24 | |
---|
25 | #Archive of the sourcefiles to unpack |
---|
26 | SRC_ARC=`ls *.tar.*` |
---|
27 | |
---|
28 | #Version of the sourcefiles |
---|
29 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` |
---|
30 | |
---|
31 | #Directory of the sourcefiles to build (after optional unpacking) |
---|
32 | SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` |
---|
33 | |
---|
34 | #Architecture that the created binaries run on. |
---|
35 | #Use noarch for scripts. |
---|
36 | ARCH=`uname -m` |
---|
37 | |
---|
38 | |
---|
39 | ########Build and create the pacakge. |
---|
40 | #Uncomment the stuff that you dont want or need |
---|
41 | |
---|
42 | #Unpack source |
---|
43 | #(uncomment if not needed) |
---|
44 | syn3_unpack $SRC_ARC || exit 1 |
---|
45 | |
---|
46 | #apply patches |
---|
47 | #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 |
---|
48 | |
---|
49 | #build and install sourcefiles |
---|
50 | #./configure optiones: |
---|
51 | export CONFIGURE_OPTS="--without-x" |
---|
52 | #options for all make commands: |
---|
53 | export MAKE_OPTS="" |
---|
54 | #skip testing: |
---|
55 | #export NOTEST=1 |
---|
56 | #extra optiones for the make install command, use with INSTALL_BASE for example: |
---|
57 | export INSTALL_OPTS="" |
---|
58 | #export CFLAGS="-fgnu89-inline" |
---|
59 | syn3_build_automake $SRC_DIR /tmp/pkg || exit 1 |
---|
60 | |
---|
61 | #strip bins and other stuff |
---|
62 | syn3_strip /tmp/pkg || exit 1 |
---|
63 | |
---|
64 | #move development stuff and create seperate development package |
---|
65 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
66 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
67 | |
---|
68 | #make main package |
---|
69 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|
70 | |
---|
71 | |
---|