#!/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 < fluxkiosk.patch || exit 1 pushd $SRC_DIR #AUTOMAKE: Configure #Some usefull stuff you sometimes need to set: #export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/" #export LD_LIBRARY_PATH=/usr/lib/mysql #export VPATH=$LD_LIBRARY_PATH MAKE_OPTS="" #AUTOMAKE: Compile make $MAKE_OPTS >/dev/null || exit 1 #AUTOMAKE: Install mkdir -p /tmp/pkg &>/dev/null #make pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install >/dev/null || exit 1 PKG=/tmp/pkg ( cd doc ; make man ) strip arping clockdiff ping ping6 rarpd rdisc tracepath tracepath6 traceroute6 mkdir -p $PKG/sbin cat arping > $PKG/sbin/arping chmod 755 $PKG/sbin/arping mkdir -p $PKG/usr/sbin cat clockdiff > $PKG/usr/sbin/clockdiff chmod 755 $PKG/usr/sbin/clockdiff mkdir -p $PKG/bin cat ping > $PKG/bin/ping cat ping6 > $PKG/bin/ping6 chmod 4711 $PKG/bin/ping $PKG/bin/ping6 cat rarpd > $PKG/usr/sbin/rarpd cat rdisc > $PKG/usr/sbin/rdisc chmod 755 $PKG/usr/sbin/rarpd $PKG/usr/sbin/rdisc mkdir -p $PKG/usr/bin cat tracepath > $PKG/usr/bin/tracepath cat tracepath6 > $PKG/usr/bin/tracepath6 cat traceroute6 > $PKG/usr/bin/traceroute6 chmod 755 $PKG/usr/bin/tracepath* chmod 4711 $PKG/usr/bin/traceroute6 mkdir -p $PKG/usr/man/man8 ( cd doc for file in arping clockdiff ping rarpd rdisc tracepath traceroute6 ; do cat $file.8 | gzip -9c > $PKG/usr/man/man8/$file.8.gz done cd $PKG/usr/man/man8 ln -sf ping.8.gz ping6.8.gz ln -sf tracepath.8.gz tracepath6.8.gz ) mkdir -p $PKG/usr/doc/iputils-$VERSION cp -a \ RELNOTES \ $PKG/usr/doc/iputils-$VERSION chmod 644 $PKG/usr/doc/iputils-$VERSION/* #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 popd #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1