#!/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` CWD=`pwd` 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 $SRC_DIR chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; zcat $CWD/net-tools_1.60-19.diff.gz | patch -p1 --backup --verbose || exit 1 zcat $CWD/net-tools.diff.gz | patch -p1 --backup --verbose || exit 1 mkdir -p $PKG/usr/doc/net-tools-1.60 || exit 1 cp -a README README.ipv6 $PKG/usr/doc/net-tools-1.60 || exit 1 chmod 644 $PKG/usr/doc/net-tools-1.60/* || exit 1 chown root:root $PKG/usr/doc/net-tools-1.60/* || exit 1 HAVE_IP_TOOLS=1 HAVE_MII=1 make || exit 1 HAVE_IP_TOOLS=1 HAVE_MII=1 make hostname || exit 1 strip --strip-unneeded ipmaddr iptunnel hostname arp ifconfig nameif rarp route netstat plipconfig slattach mii-tool || exit 1 mkdir -p $PKG/sbin $PKG/bin $PKG/usr/sbin || exit 1 cat arp > $PKG/sbin/arp || exit 1 cat ifconfig > $PKG/sbin/ifconfig || exit 1 cat rarp > $PKG/sbin/rarp || exit 1 cat route > $PKG/sbin/route || exit 1 cat hostname > $PKG/bin/hostname || exit 1 cat mii-tool > $PKG/sbin/mii-tool || exit 1 cat nameif > $PKG/sbin/nameif || exit 1 cat netstat > $PKG/bin/netstat || exit 1 cat plipconfig > $PKG/sbin/plipconfig || exit 1 cat slattach > $PKG/usr/sbin/slattach || exit 1 cat ipmaddr > $PKG/sbin/ipmaddr || exit 1 cat iptunnel > $PKG/sbin/iptunnel || exit 1 chmod 755 $PKG/sbin/* $PKG/bin/* $PKG/usr/sbin/* || exit 1 cd man/en_US || exit 1 mkdir -p $PKG/usr/man/man{1,5,8} || exit 1 for page in dnsdomainname.1 domainname.1 hostname.1 nisdomainname.1 \ ypdomainname.1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz done cat ethers.5 | gzip -9c > $PKG/usr/man/man5/ethers.5.gz || exit 1 for page in arp.8 ifconfig.8 mii-tool.8 nameif.8 netstat.8 rarp.8 route.8 \ slattach.8 plipconfig.8 ; do cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz || exit 1 done ( cd $PKG/bin ln -sf hostname dnsdomainname ln -sf hostname nisdomainname ln -sf hostname ypdomainname ) cd /tmp/build #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1