#!/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 #NEED:perlmod_Net_SSLeay #######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=noarch #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 < fluxkiosk.patch || exit 1 #install webmin pushd $SRC_DIR mkdir -p /home/system/webmin /usr/webmin /var/log/webmin /etc ssl=1 nostart=1 atboot=0 password=syn3 login=admin port=10001 perl=/usr/bin/perl var_dir=/var/log/webmin config_dir=/home/system/webmin ./setup.sh /usr/webmin popd #move to package dir mkdir -p /tmp/pkg/home/system /tmp/pkg/usr /tmp/pkg/var/log /tmp/pkg/etc ln -s /home/system/webmin /tmp/pkg/etc/webmin mv /home/system/webmin /tmp/pkg/home/system mv /usr/webmin /tmp/pkg/usr mv /var/log/webmin /tmp/pkg/var/log #our tuned config cp miniserv.conf /tmp/pkg/home/system/webmin/miniserv.conf #firewall service mkdir -p /tmp/pkg/etc/firewall cp services.webmin.new /tmp/pkg/etc/firewall #remove ssl keys, we use syn3's webint ssl keys rm /tmp/pkg/home/system/webmin/miniserv.pem #daemon tools runscript mkdir -p /tmp/pkg/service/webmin cp run /tmp/pkg/service/webmin chmod +x /tmp/pkg/service/webmin/run #webportal stuff mkdir -p /tmp/pkg/var/www/htdocs/syn3/webmin/ cp webportal/* /tmp/pkg/var/www/htdocs/syn3/webmin/ || exit 1 #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