[c5c522c] | 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 | #Our package will be automaticly rebuilded if there is a major change in a DEP package. |
---|
| 9 | #(this is recommended for most dependencys) |
---|
| 10 | #DEP:linux |
---|
| 11 | #DEP:linux_src |
---|
| 12 | ##DEP:openldap |
---|
| 13 | #DEP:glib2 |
---|
| 14 | #DEP:procps_ng |
---|
| 15 | #DEP:libdnet |
---|
| 16 | #DEP:mspack |
---|
| 17 | #DEP:xerces_c |
---|
| 18 | #DEP:xml_security_c |
---|
| 19 | |
---|
| 20 | #DEP:openssl |
---|
| 21 | #DEP:libffi |
---|
| 22 | #DEP:Linux_PAM |
---|
| 23 | |
---|
| 24 | #Loose build-dependencies |
---|
| 25 | #The package will be installed in the buildroot during buidling, but no automatic rebuild will occur. |
---|
| 26 | #(not recommended) |
---|
| 27 | ##NEED:doxygen |
---|
| 28 | |
---|
| 29 | #######Essential package info. |
---|
| 30 | #Change these if autodetection fails. |
---|
| 31 | |
---|
| 32 | #Name of the Syn-3 package that we are going to create |
---|
| 33 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
| 34 | |
---|
| 35 | #Archive of the sourcefiles to unpack |
---|
| 36 | SRC_ARC=`ls *.tar.* *.zip 2>/dev/null` |
---|
| 37 | |
---|
| 38 | #Version of the sourcefiles |
---|
| 39 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'` |
---|
| 40 | |
---|
| 41 | #Architecture that the created binaries run on. |
---|
| 42 | #Use noarch for scripts. |
---|
| 43 | ARCH=`uname -m` |
---|
| 44 | |
---|
| 45 | #from this point on, exit on errors: |
---|
| 46 | set -e |
---|
| 47 | |
---|
| 48 | ########Build and create the pacakge. |
---|
| 49 | #Uncomment the stuff that you dont want or need |
---|
| 50 | |
---|
| 51 | #Unpack source |
---|
| 52 | #(uncomment if not needed) |
---|
| 53 | syn3_unpack $SRC_ARC |
---|
| 54 | |
---|
| 55 | #Directory where the sourcefiles are unpacked. |
---|
| 56 | #(you might have to adjust this if autodetection fails) |
---|
[6936b89] | 57 | SRC_DIR=`ls -c|head -1` |
---|
[c5c522c] | 58 | |
---|
| 59 | #apply patches |
---|
| 60 | #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 |
---|
| 61 | |
---|
| 62 | pushd $SRC_DIR |
---|
| 63 | |
---|
| 64 | #AUTOMAKE: Configure |
---|
| 65 | #Some usefull stuff you sometimes need to set: |
---|
| 66 | #export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/" |
---|
| 67 | #export LD_LIBRARY_PATH=/usr/lib/mysql |
---|
| 68 | #export VPATH=$LD_LIBRARY_PATH |
---|
| 69 | MAKE_OPTS="" |
---|
| 70 | |
---|
[6936b89] | 71 | #autoreconf -i || exit 1 |
---|
[c5c522c] | 72 | #export CFLAGS="-Wno-error=cpp -Wno-error=format=" |
---|
| 73 | chmod +x configure |
---|
[6936b89] | 74 | ./configure --prefix=/usr --without-x --without-icu --disable-docs --without-kernel-modules --without-xml2 || exit 1 |
---|
[c5c522c] | 75 | |
---|
| 76 | #AUTOMAKE: Compile |
---|
| 77 | make $MAKE_OPTS || exit 1 |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | #AUTOMAKE: Install |
---|
| 81 | mkdir -p /tmp/pkg &>/dev/null |
---|
| 82 | make DEPMOD="depmod -a `uname -r`" DESTDIR=/tmp/pkg $MAKE_OPTS install || exit 1 |
---|
| 83 | popd |
---|
| 84 | |
---|
| 85 | #strip bins and other stuff |
---|
| 86 | syn3_strip /tmp/pkg || exit 1 |
---|
| 87 | |
---|
| 88 | #move development stuff and create seperate development package |
---|
| 89 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
| 90 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
| 91 | |
---|
| 92 | #make main package |
---|
| 93 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|