Index: npl/internetserver/bind/bind.SlackBuild
===================================================================
--- npl/internetserver/bind/bind.SlackBuild	(revision c5c522c7ca74a4c1725ca5e3fe0bdcadff80e49a)
+++ npl/internetserver/bind/bind.SlackBuild	(revision 34a7c560ee18732d5e187720172c106910b21d1b)
@@ -1,197 +1,31 @@
-#!/bin/sh
+#!/bin/bash
+#
+# Automaticly created by importpackage v1.0
+# Imported from: http://mirrors.slackware.com/slackware/slackware-current/source/n/bind/
+# Created at Fri Jan 20 21:49:55 CET 2017
 #DEP:openssl
-# Set initial variables:
+#DEP:readline
+#DEP:idnkit
+
+########### source original slackbuild (hopefully we dont need to modify it)
 CWD=`pwd`
-if [ "$TMP" = "" ]; then
-  TMP=/tmp
-fi
-PKG=$TMP/package-bind
-rm -rf $PKG
-
-VERSION=9.5.1-P2
-PVER=9.5.1_P2
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
-
-# Edit these library versions with each release:
-#LIBBINDVER=0.0.5
-#LIBDNSVER=20.0.2
-#LIBISCVER=9.1.5
-#LIBISCCCVER=0.2.1
-#LIBISCCFGVER=1.0.5
-#LIBLWRESVER=1.2.2
-
-# Determine major numbers:
-#LIBBINDMAJOR=`echo $LIBBINDVER | cut -f 1 -d .`
-#LIBDNSMAJOR=`echo $LIBDNSVER | cut -f 1 -d .`
-#LIBISCMAJOR=`echo $LIBISCVER | cut -f 1 -d .`
-#LIBISCCCMAJOR=`echo $LIBISCCCVER | cut -f 1 -d .`
-#LIBISCCFGMAJOR=`echo $LIBISCCFGVER | cut -f 1 -d .`
-#LIBLWRESMAJOR=`echo $LIBLWRESVER | cut -f 1 -d .`
-
-if [ "$ARCH" = "i386" ]; then
-  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
-elif [ "$ARCH" = "i486" ]; then
-  SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
-elif [ "$ARCH" = "s390" ]; then
-  SLKCFLAGS="-O2"
-elif [ "$ARCH" = "x86_64" ]; then
-  SLKCFLAGS="-O2"
-fi
-
-if [ ! -d $TMP ]; then
-  mkdir -p $TMP # location to build the source
-fi
-rm -rf $PKG
-mkdir -p $PKG
-
-# Explode the package framework:
-cd $PKG
-explodepkg $CWD/_bind.tar.gz
-
-cd $TMP
-rm -rf bind-$VERSION
-tar xzvf $CWD/bind-$VERSION.tar.gz || exit 1
-cd bind-$VERSION
-
-chown -R root.root .
-find . -perm 775 -exec chmod 755 {} \;
-find . -perm 664 -exec chmod 644 {} \;
-# We want to use /var/run/named/, not just /var/run/.
-# This allows changing the ownership of that directory if we want to run
-# named as a non-root user.
-zcat $CWD/bind.var.run.named.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
-# Threads break '-u' on Linux (for now)
-CFLAGS="$SLKCFLAGS" \
-./configure \
-       --prefix=/usr \
-       --sysconfdir=/etc \
-       --localstatedir=/var \
-       --with-libtool \
-       --enable-shared \
-       --disable-threads \
-       --with-openssl=/usr \
-       $ARCH-slackware-linux || exit 1
-make -j1 || exit 1
-cat isc-config.sh > $PKG/usr/bin/isc-config.sh
-chmod 755 $PKG/usr/bin/isc-config.sh
-chown root.bin $PKG/usr/bin/isc-config.sh
-cat contrib/named-bootconf/named-bootconf.sh > $PKG/usr/sbin/named-bootconf.sh
-cd bin/check/.libs
-cat named-checkconf > $PKG/usr/sbin/named-checkconf
-cat named-checkzone > $PKG/usr/sbin/named-checkzone
-cd ../../dig/.libs
-cat dig > $PKG/usr/bin/dig
-cat host > $PKG/usr/bin/host
-cat nslookup > $PKG/usr/bin/nslookup
-cd ../../dnssec/.libs
-cat dnssec-keygen > $PKG/usr/sbin/dnssec-keygen
-# obsolete
-#cat dnssec-makekeyset > $PKG/usr/sbin/dnssec-makekeyset
-#cat dnssec-signkey > $PKG/usr/sbin/dnssec-signkey
-cat dnssec-signzone > $PKG/usr/sbin/dnssec-signzone
-cd ../../named/.libs
-#rm lwresd
-cat named > $PKG/usr/sbin/named
-( cd $PKG/usr/sbin ; ln -sf named lwresd )
-cd ../../nsupdate/.libs
-cat nsupdate > $PKG/usr/bin/nsupdate
-cd ../../rndc/.libs
-cat rndc > $PKG/usr/sbin/rndc
-cat rndc-confgen > $PKG/usr/sbin/rndc-confgen
-cd ..
-mkdir -p $PKG/usr/doc/bind-$VERSION/misc
-cat rndc.conf > $PKG/usr/doc/bind-$VERSION/misc/rndc.conf-sample
-chmod 600 $PKG/usr/doc/bind-$VERSION/misc/rndc.conf-sample
-cd ../../lib/bind9/.libs
-cp -a libbind9.so.* $PKG/usr/lib || exit 1
-#chmod 755 $PKG/usr/lib/libbind9.so.*
-#( cd $PKG/usr/lib ; rm -rf libbind9.so.${LIBBINDMAJOR} ; ln -sf libbind9.so.${LIBBINDVER} libbind.so.${LIBBINDMAJOR} )
-cd ../../dns/.libs
-cp -a libdns.so.* $PKG/usr/lib || exit 1
-#chmod 755 $PKG/usr/lib/libdns.so.${LIBDNSVER}
-#( cd $PKG/usr/lib ; rm -rf libdns.so.${LIBDNSMAJOR} ; ln -sf libdns.so.${LIBDNSVER} libdns.so.${LIBDNSMAJOR} )
-cd ../../isc/.libs
-cp -a libisc.so.* $PKG/usr/lib  || exit 1
-#chmod 755 $PKG/usr/lib/libisc.so.${LIBISCVER}
-#( cd $PKG/usr/lib ; rm -rf libisc.so.${LIBISCMAJOR} ; ln -sf libisc.so.${LIBISCVER} libisc.so.${LIBISCMAJOR} )
-cd ../../isccc/.libs
-cp -a libisccc.so.* $PKG/usr/lib || exit 1
-#chmod 755 $PKG/usr/lib/libisccc.so.${LIBISCCCVER}
-#( cd $PKG/usr/lib ; rm -rf libisccc.so.${LIBISCCCMAJOR} ; ln -sf libisccc.so.${LIBISCCCVER} libisccc.so.${LIBISCCCMAJOR} )
-cd ../../isccfg/.libs
-cp -a libisccfg.so.* $PKG/usr/lib || exit 1
-#chmod 755 $PKG/usr/lib/libisccfg.so.${LIBISCCFGVER}
-#( cd $PKG/usr/lib ; rm -rf libisccfg.so.${LIBISCCFGMAJOR} ; ln -sf libisccfg.so.${LIBISCCFGVER} libisccfg.so.${LIBISCCFGMAJOR} )
-cd ../../lwres/.libs
-cp -a liblwres.so.* $PKG/usr/lib || exit 1
-#chmod 755 $PKG/usr/lib/liblwres.so.${LIBLWRESVER}
-#( cd $PKG/usr/lib ; rm -rf liblwres.so.${LIBLWRESMAJOR} ; ln -sf liblwres.so.${LIBLWRESVER} liblwres.so.${LIBLWRESMAJOR} )
-#mkdir -p $PKG/usr/man/man{1,5,8}
-cd ../../../bin
-cat dig/dig.1 | gzip -9c > $PKG/usr/man/man1/dig.1.gz
-cat dig/host.1 | gzip -9c > $PKG/usr/man/man1/host.1.gz
-cat rndc/rndc.conf.5 | gzip -9c > $PKG/usr/man/man5/rndc.conf.5.gz
-cat check/named-checkconf.8 | gzip -9c > $PKG/usr/man/man8/named-checkconf.8.gz
-cat check/named-checkzone.8 | gzip -9c > $PKG/usr/man/man8/named-checkzone.8.gz
-cat dnssec/dnssec-keygen.8 | gzip -9c > $PKG/usr/man/man8/dnssec-keygen.8.gz
-# obsolete
-#cat dnssec/dnssec-makekeyset.8 | gzip -9c > $PKG/usr/man/man8/dnssec-makekeyset.8.gz
-#cat dnssec/dnssec-signkey.8 | gzip -9c > $PKG/usr/man/man8/dnssec-signkey.8.gz
-cat dnssec/dnssec-signzone.8 | gzip -9c > $PKG/usr/man/man8/dnssec-signzone.8.gz
-cat named/lwresd.8 | gzip -9c > $PKG/usr/man/man8/lwresd.8.gz
-cat named/named.8 | gzip -9c > $PKG/usr/man/man8/named.8.gz
-cat nsupdate/nsupdate.8 | gzip -9c > $PKG/usr/man/man8/nsupdate.8.gz
-cat rndc/rndc-confgen.8 | gzip -9c > $PKG/usr/man/man8/rndc-confgen.8.gz
-cat rndc/rndc.8 | gzip -9c > $PKG/usr/man/man8/rndc.8.gz
-cd ../doc
-mkdir -p $PKG/usr/doc/bind-$VERSION
-cp -a arm misc $PKG/usr/doc/bind-$VERSION
-cd ..
-cp -a CHANGES COPYRIGHT FAQ README $PKG/usr/doc/bind-$VERSION
-( cd $PKG/usr/doc/bind-$VERSION
-  find . -type f | xargs chmod 644
-  # This one should have the correct perms of the config file:
-  chmod 600 misc/rndc.conf-sample )
-( cd $PKG
-  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
-
-# Add sample config files for a simple caching nameserver:
-
-cat $CWD/caching-example/named.conf > $PKG/etc/named.conf.new
-cat $CWD/caching-example/localhost.zone > $PKG/var/named/caching-example/localhost.zone
-cat $CWD/caching-example/named.ca > $PKG/var/named/caching-example/named.ca
-cat $CWD/caching-example/named.local > $PKG/var/named/caching-example/named.local
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-mkdir -p $PKG/service/bind
-cp $CWD/run $PKG/service/bind/run
-chmod +x $PKG/service/bind/run || exit 1
-
-rm -r $PKG/etc/rc.d
-
-# Build seperate tools package
-mkdir -p /tmp/bindtools/usr
-mv $PKG/usr/bin /tmp/bindtools/usr || exit 1
-mv $PKG/usr/lib /tmp/bindtools/usr || exit 1
-
-pushd /tmp/bindtools
-NAME=bind_tools
-makepkg -l y -c n $CWD/$NAME.pkg > /dev/null || exit 1
-echo $PVER > $CWD/$NAME.version || exit 1
-echo $ARCH > $CWD/$NAME.arch || exit 1
-popd
-
-# Build the package:
-cd $PKG
-NAME=`echo $0|cut -f2 -d'.'`
-makepkg -l y -c n $CWD/$NAME.pkg > /dev/null || exit 1
-echo $PVER > $CWD/$NAME.version || exit 1
-echo $ARCH > $CWD/$NAME.arch || exit 1
+set -e
+source ./bind.SlackBuild.orig
 
 
+############ make syn3 packages
+cd $CWD
+VERSION=`echo $VERSION|sed 's/-/_/g'`
+for PKG in /bind-*/package-bind; do
+        NAME=`echo $PKG| sed 's/.*package-//'| sed 's/-/_/g'`
 
+        #config in seperate package
+        rm -rf $PKG/etc 2>/dev/null|| true
+        
+        #seperate dev-package
+        syn3_move_dev $PKG $PKG""_dev
+        syn3_makepkg $PKG""_dev $NAME""_dev $VERSION $ARCH || exit 1
+
+        #make main package
+        syn3_makepkg $PKG $NAME $VERSION $ARCH || exit 1
+done
