[4f7cda5] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | ##NEED:... |
---|
| 4 | ##DEP:.. |
---|
| 5 | #NEED:netqmail |
---|
| 6 | #DEP:openldap |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | #######Essential package info. |
---|
| 10 | #Change these if autodetection fails. |
---|
| 11 | |
---|
| 12 | #Name of the Syn-3 package that we are going to create |
---|
| 13 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
| 14 | |
---|
| 15 | #Archive of the sourcefiles to unpack |
---|
| 16 | SRC_ARC=`ls *.tar.* *.zip 2>/dev/null` |
---|
| 17 | |
---|
| 18 | #Version of the sourcefiles |
---|
| 19 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'` |
---|
| 20 | |
---|
| 21 | #Architecture that the created binaries run on. |
---|
| 22 | #Use noarch for scripts. |
---|
| 23 | ARCH=`uname -m` |
---|
| 24 | |
---|
| 25 | #from this point on, exit on errors: |
---|
| 26 | set -e |
---|
| 27 | |
---|
| 28 | ########Build and create the pacakge. |
---|
| 29 | #Uncomment the stuff that you dont want or need |
---|
| 30 | |
---|
| 31 | #Unpack source |
---|
| 32 | #(uncomment if not needed) |
---|
| 33 | syn3_unpack $SRC_ARC |
---|
| 34 | |
---|
| 35 | #Directory where the sourcefiles are unpacked. |
---|
| 36 | #(you might have to adjust this if autodetection fails) |
---|
| 37 | SRC_DIR=`ls -c|head -1` |
---|
| 38 | |
---|
| 39 | #apply patches |
---|
| 40 | #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 |
---|
| 41 | |
---|
| 42 | pushd $SRC_DIR |
---|
| 43 | |
---|
| 44 | groupadd -g 89 vchkpw |
---|
| 45 | useradd -g vchkpw -u 89 -d /home/vpopmail vpopmail |
---|
| 46 | #AUTOMAKE: Configure |
---|
| 47 | #Some usefull stuff you sometimes need to set: |
---|
| 48 | #export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/" |
---|
| 49 | #export LD_LIBRARY_PATH=/usr/lib/mysql |
---|
| 50 | #export VPATH=$LD_LIBRARY_PATH |
---|
| 51 | #export CFLAGS="-std=c89" |
---|
| 52 | #export CFLAGS="-fgnu89-inline" #If "multiple definition of `foo'" Also see http://gcc.gnu.org/gcc-4.3/porting_to.html |
---|
| 53 | MAKE_OPTS="" |
---|
| 54 | ./configure \ |
---|
| 55 | --prefix=/usr \ |
---|
| 56 | --enable-qmaildir=/var/qmail/ \ |
---|
| 57 | --enable-qmail-newu=/var/qmail/bin/qmail-newu \ |
---|
| 58 | --enable-qmail-inject=/var/qmail/bin/qmail-inject \ |
---|
| 59 | --enable-qmail-newmrh=/var/qmail/bin/qmail-newmrh \ |
---|
| 60 | --disable-roaming-users \ |
---|
| 61 | --enable-incdir=/usr/include/mysql \ |
---|
| 62 | --enable-libdir=/usr/lib64 \ |
---|
| 63 | --enable-logging=p \ |
---|
| 64 | --enable-auth-module=ldap \ |
---|
| 65 | --disable-clear-passwd \ |
---|
| 66 | --enable-auth-logging \ |
---|
| 67 | --disable-valias \ |
---|
| 68 | --disable-passwd \ |
---|
| 69 | --enable-qmail-ext \ |
---|
| 70 | --enable-learn-passwords |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | #AUTOMAKE: Compile |
---|
| 74 | make $MAKE_OPTS || exit 1 |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | #AUTOMAKE: Install |
---|
| 78 | mkdir -p /tmp/pkg &>/dev/null |
---|
| 79 | make pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install || exit 1 |
---|
| 80 | popd |
---|
| 81 | |
---|
| 82 | #strip bins and other stuff |
---|
| 83 | syn3_strip /tmp/pkg || exit 1 |
---|
| 84 | |
---|
| 85 | #move development stuff and create seperate development package |
---|
| 86 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
| 87 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
| 88 | |
---|
| 89 | #make main package |
---|
| 90 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|