#!/bin/bash #Gebruik deze file als voorbeeld. Plaats de source tar.gz file in de zelfde directory als deze slackbuild #Met de NEED en DEP opties is het mogelijk om build dependencies aan te geven. #Voor de meeste packages hoeft er verder niks aan de variabellen veranderd te worden. ##################################### Build dependency info: #Strict build-dependencies. #Only use when really neccesary, this will rebuild our package if the dependencie has changed: ##DEP:linux ##DEP:linux_src #DEP:curl #Loose build-dependencies. #Use this to specify the packages that are required to build our package: ##NEED:libcairo ##NEED:glib ##NEED:gtk+ ##NEED:glib2 ##NEED:gtk+2 ##NEED:xorg_lib ##NEED:xorg_proto #DEP:openldap #DEP:postgresql #DEP:mysql56 #DEP:openssl #DEP:libmm #DEP:libxml2 #DEP:libjpeg #DEP:libpng #DEP:gmp #DEP:zlib #DEP:bzip2 #DEP:Linux_PAM #NEED:apache_conf #DEP:apache2 #DEP:apr #DEP:apr_util #DEP:apache_conf #DEP:cyrus_sasl CWD=`pwd` #######Essential package info. #Change these if autodetection fails. #Name of the Syn-3 package that we are going to create NAME=`basename $0|sed 's/.SlackBuild//'` #Archive of the sourcefiles to unpack SRC_ARC=`ls php-*.tar.*` #Version of the sourcefiles VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` #Directory of the sourcefiles to build (after optional unpacking) SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`arch` ########Build and create the pacakge. #Uncomment the stuff that you dont want or need #Imap client libs uitpakken, compilen zodat we daar tegen kunnen builden #IMAP=imap-2006k.DEV.SNAP-0709012035 IMAP=imap-2007e IMAPLIBDIR="`pwd`/$IMAP" tar -xzf $IMAP.tar.gz || exit 1 cd $IMAP || exit 1 yes|make SSLTYPE=none slx || exit 1 cd .. #Unpack source #(uncomment if not needed) syn3_unpack $SRC_ARC || exit 1 #Set essential files mkdir -p /tmp/pkg/etc/apache2/ cp /etc/apache2/httpd.conf /tmp/pkg/etc/apache2 || exit 1 #cp -a /etctmp/build/php.ini $PKG/etc || exit 1 #apply patches #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 #build and install sourcefiles #(use one of the other syn3_build_* scripts when needed) export CONFIGURE_OPTS=" --with-config-file-path=/etc/php5 --with-config-file-scan-dir=/etc/php5 --prefix=/usr/php5 --libdir=/usr/php5 --with-mysql --without-sqlite --without-pdo-sqlite --sysconfdir=/etc/php5 --enable-discard-path --enable-soap --enable-mbstring --with-mysqli --with-pgsql --with-pdo-pgsql --with-pdo-mysql --with-curl --with-imap=$IMAPLIBDIR --with-apxs2 --disable-static --x-includes=/usr/include/apache2 --enable-safe-mode --with-openssl --with-ldap --with-mhash --enable-bcmath --with-bz2 --with-pic --enable-calendar --enable-ctype --enable-ftp --with-iconv --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-gmp --with-gettext=/usr/share --enable-wddx --enable-shmop --enable-sockets --with-regex=php --enable-sysvsem --enable-sysvshm --with-tsrm-pthreads --enable-shared --enable-pcntl --enable-zip --disable-debug --with-zlib=/usr --disable-dba --with-pgsql " #export MAKE_OPTS="-j1" export NOTEST=1 export CFLAGS="-D_FILE_OFFSET_BITS=64" syn3_build_automake $SRC_DIR /tmp/pkg || exit 1 ##### php5 the default cli-tool from now on (no longer php4 !) mkdir -p /tmp/pkg/usr/bin ln -s /usr/php5/bin/php /tmp/pkg/usr/bin/php || exit 1 #####clear some stuff rm -rf /tmp/pkg/etc/apache2 || exit 1 rm -rf /tmp/pkg/.* #post installer mkdir -p /tmp/pkg/etc/postinst.d || exit 1 cp post.php5 /tmp/pkg/etc/postinst.d/ || exit 1 chmod +x /tmp/pkg/etc/postinst.d/* || exit 1 #channels er uit, worden automatisch gefixed en staan standaard verkeerd: rm /tmp/pkg/usr/php5/php/.channels/pear.php.net.reg rm /tmp/pkg/usr/php5/php/.channels/doc.php.net.reg rm /tmp/pkg/usr/php5/php/.channels/pecl.php.net.reg ####################### AFWERKEN cd $CWD ####strip bins and other stuff syn3_strip /tmp/pkg || exit 1 ####move development stuff and create seperate development package syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 ####make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1