1 | #!/bin/bash |
---|
2 | |
---|
3 | #######Essential package info. |
---|
4 | #Change these if autodetection fails. |
---|
5 | |
---|
6 | #Name of the Syn-3 package that we are going to create |
---|
7 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
8 | |
---|
9 | #Archive of the sourcefiles to unpack |
---|
10 | SRC_ARC=`ls *.tar.*` |
---|
11 | |
---|
12 | #Version of the sourcefiles |
---|
13 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` |
---|
14 | |
---|
15 | #Directory of the sourcefiles to build (after optional unpacking) |
---|
16 | SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` |
---|
17 | |
---|
18 | #Architecture that the created binaries run on. |
---|
19 | #Use noarch for scripts. |
---|
20 | ARCH=`arch` |
---|
21 | |
---|
22 | |
---|
23 | ########Build and create the pacakge. |
---|
24 | #Uncomment the stuff that you dont want or need |
---|
25 | |
---|
26 | #Unpack source |
---|
27 | #(uncomment if not needed) |
---|
28 | syn3_unpack $SRC_ARC || exit 1 |
---|
29 | |
---|
30 | #apply patches |
---|
31 | #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 |
---|
32 | |
---|
33 | #build and install sourcefiles |
---|
34 | #(use one of the other syn3_build_* scripts when needed) |
---|
35 | #export CONFIGURE_OPTS="" |
---|
36 | #export MAKE_OPTS="" |
---|
37 | #export NOTEST=1 |
---|
38 | #syn3_build_automake $SRC_DIR /tmp/pkg || exit 1 |
---|
39 | |
---|
40 | mkdir -p /tmp/pkg/var/www/htdocs/syn3/mediawiki |
---|
41 | cp -r /tmp/build/mediawiki-*/* /tmp/pkg/var/www/htdocs/syn3/mediawiki/ ||exit 1 |
---|
42 | cp /tmp/build/LocalSettings.php /tmp/pkg/var/www/htdocs/syn3/mediawiki/ ||exit 1 |
---|
43 | cp /tmp/build/LdapAuthentication.php /tmp/pkg/var/www/htdocs/syn3/mediawiki/ ||exit 1 |
---|
44 | #mkdir -p /tmp/pkg/tmp/ |
---|
45 | cp /tmp/build/mediawiki.sql /tmp/pkg/var/www/htdocs/syn3/mediawiki ||exit 1 |
---|
46 | |
---|
47 | #postinstall script (import mysql db) |
---|
48 | mkdir -p /tmp/pkg/etc/postinst.d/ ||exit 1 |
---|
49 | cp /tmp/build/post.mediawiki /tmp/pkg/etc/postinst.d/ ||exit 1 |
---|
50 | chmod +x /tmp/pkg/etc/postinst.d/post.mediawiki ||exit 1 |
---|
51 | #mysql -u root -p ass < /tmp/mediawiki.sql |
---|
52 | chmod 700 /tmp/pkg/var/www/htdocs/syn3/mediawiki/mediawiki.sql |
---|
53 | |
---|
54 | #copy syn3 logo |
---|
55 | cp /tmp/build/logo.jpg /tmp/pkg/var/www/htdocs/syn3/mediawiki/images/ |
---|
56 | |
---|
57 | #copy webportal files |
---|
58 | cp webportal.* /tmp/pkg/var/www/htdocs/syn3/mediawiki || exit 1 |
---|
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 | |
---|