[c5c522c] | 1 | #!/bin/bash |
---|
| 2 | #DEP:python |
---|
| 3 | #DEP:python_setuptools |
---|
[cd5d2d4] | 4 | #DEP:python_Genshi |
---|
[8b8e03e] | 5 | #DEP:postgresql |
---|
| 6 | #DEP:python_pyPgSQL |
---|
[c5c522c] | 7 | |
---|
| 8 | #######Essential package info. |
---|
| 9 | #Change these if autodetection fails. |
---|
| 10 | |
---|
| 11 | #Name of the Syn-3 package that we are going to create |
---|
| 12 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
| 13 | |
---|
| 14 | #Archive of the sourcefiles to unpack |
---|
| 15 | SRC_ARC=`ls *.tar.*` |
---|
| 16 | |
---|
| 17 | #Version of the sourcefiles |
---|
| 18 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` |
---|
| 19 | |
---|
| 20 | #Directory of the sourcefiles to build (after optional unpacking) |
---|
| 21 | SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` |
---|
| 22 | |
---|
| 23 | #Architecture that the created binaries run on. |
---|
| 24 | #Use noarch for scripts. |
---|
| 25 | ARCH=`uname -m` |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | ########Build and create the pacakge. |
---|
| 29 | #Uncomment the stuff that you dont want or need |
---|
| 30 | |
---|
| 31 | #webportal stuff |
---|
| 32 | mkdir -p /tmp/pkg/var/www/htdocs/syn3/tracportal/ |
---|
| 33 | cp webportal/* /tmp/pkg/var/www/htdocs/syn3/tracportal/ || exit 1 |
---|
| 34 | |
---|
| 35 | #postinst |
---|
| 36 | mkdir -p /tmp/pkg/etc/postinst.d |
---|
| 37 | cp post.* /tmp/pkg/etc/postinst.d || exit 1 |
---|
| 38 | chmod +x /tmp/pkg/etc/postinst.d/* || exit 1 |
---|
| 39 | |
---|
| 40 | #apache config |
---|
| 41 | mkdir -p /tmp/pkg/etc/apache2/conf.d |
---|
| 42 | cp trac.conf /tmp/pkg/etc/apache2/conf.d || exit 1 |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | #Unpack source |
---|
| 46 | #(uncomment if not needed) |
---|
| 47 | syn3_unpack $SRC_ARC || exit 1 |
---|
| 48 | |
---|
| 49 | #apply patches |
---|
| 50 | #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 |
---|
| 51 | |
---|
| 52 | pushd $SRC_DIR || exit 1 |
---|
| 53 | python setup.py install --root=/tmp/pkg || exit 1 |
---|
| 54 | popd |
---|
| 55 | |
---|
| 56 | #scripts and stuff to create new syn3 trac env. |
---|
| 57 | mkdir -p /tmp/pkg/usr/share/trac/syn3_defaults |
---|
| 58 | cp defaults/* /tmp/pkg/usr/share/trac/syn3_defaults |
---|
| 59 | mkdir /tmp/pkg/usr/bin |
---|
| 60 | cp syn3-newtrac /tmp/pkg/usr/bin || exit 1 |
---|
| 61 | chmod +x /tmp/pkg/usr/bin/syn3-newtrac || exit 1 |
---|
| 62 | |
---|
| 63 | #wsgi stuff |
---|
| 64 | mkdir -p /tmp/pkg//usr/share/trac/cgi-bin |
---|
| 65 | cp trac.wsgi /tmp/pkg//usr/share/trac/cgi-bin || exit 1 |
---|
| 66 | |
---|
| 67 | #strip bins and other stuff |
---|
| 68 | syn3_strip /tmp/pkg || exit 1 |
---|
| 69 | |
---|
| 70 | #move development stuff and create seperate development package |
---|
| 71 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
| 72 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
| 73 | |
---|
| 74 | #make main package |
---|
| 75 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|
| 76 | |
---|
| 77 | |
---|