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 | #Strict build-dependencies. |
---|
8 | #Only use when really neccesary, this will rebuild our package if the dependencie has changed: |
---|
9 | ##DEP:linux |
---|
10 | ##DEP:linux_src |
---|
11 | #DEP:curl |
---|
12 | |
---|
13 | #Loose build-dependencies. |
---|
14 | #Use this to specify the packages that are required to build our package: |
---|
15 | ##NEED:libcairo |
---|
16 | ##NEED:glib |
---|
17 | ##NEED:gtk+ |
---|
18 | ##NEED:glib2 |
---|
19 | ##NEED:gtk+2 |
---|
20 | ##NEED:xorg_lib |
---|
21 | ##NEED:xorg_proto |
---|
22 | |
---|
23 | #DEP:openldap |
---|
24 | #DEP:postgresql |
---|
25 | #DEP:mysql56 |
---|
26 | #DEP:openssl |
---|
27 | #DEP:libmm |
---|
28 | #DEP:libxml2 |
---|
29 | #DEP:libjpeg |
---|
30 | #DEP:libpng |
---|
31 | #DEP:gmp |
---|
32 | #DEP:zlib |
---|
33 | #DEP:bzip2 |
---|
34 | #DEP:Linux_PAM |
---|
35 | |
---|
36 | #NEED:apache_conf |
---|
37 | #DEP:apache2 |
---|
38 | #DEP:apr |
---|
39 | #DEP:apr_util |
---|
40 | #DEP:apache_conf |
---|
41 | |
---|
42 | #DEP:cyrus_sasl |
---|
43 | |
---|
44 | CWD=`pwd` |
---|
45 | |
---|
46 | #######Essential package info. |
---|
47 | #Change these if autodetection fails. |
---|
48 | |
---|
49 | #Name of the Syn-3 package that we are going to create |
---|
50 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
51 | |
---|
52 | #Archive of the sourcefiles to unpack |
---|
53 | SRC_ARC=`ls php-*.tar.*` |
---|
54 | |
---|
55 | #Version of the sourcefiles |
---|
56 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` |
---|
57 | |
---|
58 | #Directory of the sourcefiles to build (after optional unpacking) |
---|
59 | SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` |
---|
60 | |
---|
61 | #Architecture that the created binaries run on. |
---|
62 | #Use noarch for scripts. |
---|
63 | ARCH=`arch` |
---|
64 | |
---|
65 | |
---|
66 | ########Build and create the pacakge. |
---|
67 | #Uncomment the stuff that you dont want or need |
---|
68 | |
---|
69 | #Imap client libs uitpakken, compilen zodat we daar tegen kunnen builden |
---|
70 | #IMAP=imap-2006k.DEV.SNAP-0709012035 |
---|
71 | IMAP=imap-2007e |
---|
72 | |
---|
73 | IMAPLIBDIR="`pwd`/$IMAP" |
---|
74 | tar -xzf $IMAP.tar.gz || exit 1 |
---|
75 | cd $IMAP || exit 1 |
---|
76 | yes|make SSLTYPE=none slx || exit 1 |
---|
77 | cd .. |
---|
78 | |
---|
79 | #Unpack source |
---|
80 | #(uncomment if not needed) |
---|
81 | syn3_unpack $SRC_ARC || exit 1 |
---|
82 | |
---|
83 | #Set essential files |
---|
84 | mkdir -p /tmp/pkg/etc/apache2/ |
---|
85 | cp /etc/apache2/httpd.conf /tmp/pkg/etc/apache2 || exit 1 |
---|
86 | #cp -a /etctmp/build/php.ini $PKG/etc || exit 1 |
---|
87 | |
---|
88 | #apply patches |
---|
89 | #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 |
---|
90 | |
---|
91 | #build and install sourcefiles |
---|
92 | #(use one of the other syn3_build_* scripts when needed) |
---|
93 | export CONFIGURE_OPTS=" |
---|
94 | --with-config-file-path=/etc/php5 |
---|
95 | --with-config-file-scan-dir=/etc/php5 |
---|
96 | --prefix=/usr/php5 |
---|
97 | --libdir=/usr/php5 |
---|
98 | --with-mysql |
---|
99 | --without-sqlite |
---|
100 | --without-pdo-sqlite |
---|
101 | --sysconfdir=/etc/php5 |
---|
102 | --enable-discard-path |
---|
103 | --enable-soap |
---|
104 | --enable-mbstring |
---|
105 | --with-mysqli |
---|
106 | --with-pgsql |
---|
107 | --with-pdo-pgsql |
---|
108 | --with-pdo-mysql |
---|
109 | --with-curl |
---|
110 | --with-imap=$IMAPLIBDIR |
---|
111 | --with-apxs2 |
---|
112 | --disable-static |
---|
113 | --x-includes=/usr/include/apache2 |
---|
114 | --enable-safe-mode --with-openssl --with-ldap |
---|
115 | --with-mhash --enable-bcmath --with-bz2 --with-pic |
---|
116 | --enable-calendar --enable-ctype --enable-ftp |
---|
117 | --with-iconv --with-gd --enable-gd-native-ttf |
---|
118 | --with-jpeg-dir=/usr |
---|
119 | --with-gmp --with-gettext=/usr/share |
---|
120 | --enable-wddx --enable-shmop --enable-sockets |
---|
121 | --with-regex=php --enable-sysvsem --enable-sysvshm |
---|
122 | --with-tsrm-pthreads --enable-shared |
---|
123 | --enable-pcntl |
---|
124 | --enable-zip |
---|
125 | --disable-debug --with-zlib=/usr --disable-dba --with-pgsql " |
---|
126 | #export MAKE_OPTS="-j1" |
---|
127 | export NOTEST=1 |
---|
128 | export CFLAGS="-D_FILE_OFFSET_BITS=64" |
---|
129 | syn3_build_automake $SRC_DIR /tmp/pkg || exit 1 |
---|
130 | |
---|
131 | ##### php5 the default cli-tool from now on (no longer php4 !) |
---|
132 | mkdir -p /tmp/pkg/usr/bin |
---|
133 | ln -s /usr/php5/bin/php /tmp/pkg/usr/bin/php || exit 1 |
---|
134 | |
---|
135 | #####clear some stuff |
---|
136 | rm -rf /tmp/pkg/etc/apache2 || exit 1 |
---|
137 | rm -rf /tmp/pkg/.* |
---|
138 | |
---|
139 | |
---|
140 | #post installer |
---|
141 | mkdir -p /tmp/pkg/etc/postinst.d || exit 1 |
---|
142 | cp post.php5 /tmp/pkg/etc/postinst.d/ || exit 1 |
---|
143 | chmod +x /tmp/pkg/etc/postinst.d/* || exit 1 |
---|
144 | |
---|
145 | #channels er uit, worden automatisch gefixed en staan standaard verkeerd: |
---|
146 | rm /tmp/pkg/usr/php5/php/.channels/pear.php.net.reg |
---|
147 | rm /tmp/pkg/usr/php5/php/.channels/doc.php.net.reg |
---|
148 | rm /tmp/pkg/usr/php5/php/.channels/pecl.php.net.reg |
---|
149 | |
---|
150 | ####################### AFWERKEN |
---|
151 | cd $CWD |
---|
152 | |
---|
153 | ####strip bins and other stuff |
---|
154 | syn3_strip /tmp/pkg || exit 1 |
---|
155 | |
---|
156 | ####move development stuff and create seperate development package |
---|
157 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
158 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
159 | |
---|
160 | ####make main package |
---|
161 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|