#!/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 #Our package will be automaticly rebuilded if there is a major change in a DEP package. #(this is recommended for most dependencys) ##DEP:linux ##DEP:linux_src ##DEP:openldap #Loose build-dependencies #The package will be installed in the buildroot during buidling, but no automatic rebuild will occur. #(not recommended) ##NEED:doxygen #######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 *.tar.* *.zip 2>/dev/null` #Version of the sourcefiles VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'` #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`uname -m` #from this point on, exit on errors: set -e ########Build and create the pacakge. #Uncomment the stuff that you dont want or need #Unpack source #(uncomment if not needed) syn3_unpack $SRC_ARC #Directory where the sourcefiles are unpacked. #(you might have to adjust this if autodetection fails) SRC_DIR=`ls -c|head -1` #apply patches patch -p1 -d $SRC_DIR < smokeping-mail.patch || exit 1 pushd $SRC_DIR #manually SUCKY install mkdir -p /tmp/pkg/bin mkdir -p /tmp/pkg/etc mkdir -p /tmp/pkg/usr/lib/smokeping/doc mkdir -p /tmp/pkg/home/system/smokeping/data mkdir -p /tmp/pkg/var/www/htdocs/syn3/smokeping/cache mkdir -p /tmp/pkg/etc/postinst.d cp bin/smokeping.dist /tmp/pkg/bin/smokeping cp bin/tSmoke.dist /tmp/pkg/bin/tSmoke cp ../basepage.html /tmp/pkg/var/www/htdocs/syn3/smokeping/basepage.html cp ../syn3.png /tmp/pkg/var/www/htdocs/syn3/smokeping/ cp -a lib/* /tmp/pkg/usr/lib/smokeping/ cp etc/smokemail.dist /tmp/pkg/usr/lib/smokeping/smokemail cp -a doc/* /tmp/pkg/usr/lib/smokeping/doc cp ../smokeping.conf.new /tmp/pkg/home/system/smokeping cp ../syn3-asterisk_smokeping /tmp/pkg/home/system/smokeping cp ../mailtemplate /tmp/pkg/home/system/smokeping chmod +x /tmp/pkg/home/system/smokeping/syn3-ast* #hack paths in perl script (succcks) sed -i 's@/usr/pack/rrdtool-1.3.0-rp/lib/perl@/usr/lib/smokeping/@' /tmp/pkg/bin/smokeping cp ../post.smokeping /tmp/pkg/etc/postinst.d chmod +x /tmp/pkg/etc/postinst.d/* mkdir -p /tmp/pkg/service/smokeping cp ../run /tmp/pkg/service/smokeping chmod +x /tmp/pkg/service/smokeping/* popd #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1