IGNOREPATH=/home:/dev:/boot:/root:/tmp:/usr/local:/bin:/sbin:/tmp:/mnt:/var:/usr/src STRIPLIB=y STRIPBIN=y VERSION=9.2.3 PVER=9.2.3 # Edit these library versions with each release: LIBDNSVER=11.0.2 LIBISCVER=7.0.1 LIBISCCCVER=0.1.0 LIBISCCFGVER=0.0.7 LIBLWRESVER=1.1.1 # Determine major numbers: 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 .` PROGNAME="BIND $VERSION" DESC="\ bind (DNS server and utilities) \n\ \n\ The named daemon and support utilities such as dig, host, and \n\ nslookup. Sample configuration files for running a simple caching \n\ nameserver are included. Documentation for advanced name server \n\ setup can be found in /usr/doc/bind-9.x.x/." BUILD=1 MAINTAINER="Mark Post " SOURCE=ftp://ftp.isc.org/isc/bind/src/testing/t2b PKGNAME=bind-$VERSION-s390-$BUILD TAG=REC compile() { tar -zxvf $CWD/bind-$VERSION.tar.gz 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 # Threads break '-u' on Linux (for now) CFLAGS=-O2 LDFLAGS=-s \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-libtool \ --enable-shared \ --disable-threads \ --with-openssl=/usr \ --build=s390-slackware-linux \ --host=s390-slackware-linux \ --target=s390-slackware-linux make # Another ugly hack to get around libtool's stupidity ( cd lib/isc/.libs cp -a ../libisc.la libisc.so* /usr/local/lib ) ( cd lib/isccc/.libs cp -a ../libisccc.la libisccc.so* /usr/local/lib ) ( cd lib/dns/.libs cp -a ../libdns.la libdns.so* /usr/local/lib ) } install() { make install DESTDIR=/package-bind # Get rid of the libtool workaround ( cd /usr/local/lib rm -f libisc.la libisccc.la libdns.la \ libisc.so* libisccc.so* libdns.so* ) ( cd /package-bind tar -zxvf $CWD/_bind.tar.gz etc/rc.d ) ( cd /package-bind/usr/sbin rm -rf lwresd ; ln -sf named lwresd ) cp -p isc-config.sh /package-bind/usr/bin/ cp -p contrib/named-bootconf/named-bootconf.sh \ /package-bind/usr/sbin/ mkdir -p /package-bind/usr/doc/bind-$VERSION cp -a CHANGES COPYRIGHT FAQ README doc/arm doc/misc \ /package-bind/usr/doc/bind-$VERSION cp -a bin/rndc/rndc.conf /package-bind/usr/doc/bind-$VERSION/misc/rndc.conf-sample mkdir -p /package-bind/etc \ /package-bind/var/named/caching-example \ /package-bind/var/run/named cp -p $CWD/caching-example/named.conf /package-bind/etc/named.conf.new cp -p $CWD/caching-example/localhost.zone $CWD/caching-example/named.ca \ $CWD/caching-example/named.local \ /package-bind/var/named/caching-example/ ( cd /package-bind rm -rf usr/include/* rm usr/lib/*.{a,la} rm usr/lib/*.so rm -rf usr/man/man3/* ) ( cd /package-bind/usr/man for dir in 1 5 8; do ( cd man$dir rm -f *.gz gzip -9 *.$dir ) done ) } attributes() { chown -R root.bin $PKG/package-bind/usr/bin \ $PKG/package-bind/usr/sbin chmod 600 $PKG/package-bind/usr/doc/bind-$VERSION/misc/rndc.conf-sample chmod 755 $PKG/package-bind/usr/lib/* chmod 775 $PKG/package-bind/usr/doc/bind-$VERSION/arm \ $PKG/package-bind/usr/doc/bind-$VERSION/misc } special() { cd $PKG mv package-bind/* ./ rmdir package-bind/ cd $CTL cat $CWD/slack-desc > slack-desc cat $CWD/config.sh >> doinst.sh echo config etc/named.conf.new >> doinst.sh echo config etc/rc.d/rc.bind.new >> doinst.sh cat << EOF >> doinst.sh # Add a /var/named if it doesn't exist: if [ ! -d var/named ]; then mkdir -p var/named chmod 755 var/named fi # Generate /etc/rndc.key if there's none there, # and there also no /etc/rndc.conf (the other # way to set this up). if [ ! -r etc/rndc.key -a ! -r /etc/rndc.conf ]; then chroot . /sbin/ldconfig chroot . /usr/sbin/rndc-confgen -a fi EOF sed -e 's%package-bind/%%g' doinst.sh > doinst.sh.new cat doinst.sh.new > doinst.sh rm doinst.sh.new }