#!/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) ##DEP: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` ########Build and create the pacakge. #Uncomment the stuff that you dont want or need mkdir /tmp/pkg PKG=/tmp/pkg #Unpack source #(uncomment if not needed) syn3_unpack $SRC_ARC || exit 1 #Directory where the sourcefiles are unpacked. #(you might have to adjust this if autodetection fails) SRC_DIR=`ls -c|head -1` cd netdate || exit 1 chown -R root:root . || exit 1 zcat ../netdate.diff.gz | patch -p1 --backup || exit 1 zcat ../netdate.diff2.gz | patch -p1 --backup || exit 1 make || exit 1 strip netdate || exit 1 mkdir -p $PKG/usr/sbin || exit 1 cat netdate > $PKG/usr/sbin/netdate || exit 1 chmod 755 $PKG/usr/sbin/netdate || exit 1 mkdir -p $PKG/usr/man/man8 || exit 1 cat netdate.8 | gzip -9c > $PKG/usr/man/man8/netdate.8.gz || exit 1 mkdir -p $PKG/usr/doc/netdate || exit 1 cp -a COPYRIGHT $PKG/usr/doc/netdate || exit 1 #after unpacking we can no longer use the default package system :-( cd /tmp/build #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1