#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-bind SRC=/devel/manpagesrc INFO=/devel/info-pages/usr/info TEX=/devel/texinfo-docs if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi # Explode the package framework: cd $PKG explodepkg $CWD/_bind.tar.gz # Function to handle manpage source: man2gz () { # $1 is source page name, $2 is target name for preformatted # output (full path && name) and $3 is the same, but for the # source. mkdir -p `dirname $2` groff -Tascii -mandoc $1 | gzip -9c > $2 if [ ! "$3" = "" ]; then mkdir -p `dirname $3` cat $1 > $3 fi } echo "+===============+" echo "| bind-4.9.5-P1 |" echo "+===============+" cd $TMP mkdir bind-4.9.5-P1 cd bind-4.9.5-P1 tar xzvf $CWD/bind-4.9.5-P1.tar.gz zcat $CWD/bind-4.9.5-P1.diff.gz | patch mkdir -p $PKG/usr/doc/bind-4.9.5-P1 cp -a README TODO OPTIONS INSTALL CHANGES $PKG/usr/doc/bind-4.9.5-P1 cp -a doc $PKG/usr/doc/bind-4.9.5-P1 chown -R root.root $PKG/usr/doc/bind-4.9.5-P1 find $PKG/usr/doc/bind-4.9.5-P1 -type f -exec chmod 644 {} \; # These RFCs take up a _lot_ of room, and are easy to find on the net if # need be. (IMHO, feel free to correct me :) rm -rf $PKG/usr/doc/bind-4.9.5-P1/doc/rfc # Fake this header file... bind thinks we're compiling on a Sun :^) mkdir include/rpc touch include/rpc/netdb.h make cd named strip named named-xfer cat named > $PKG/usr/sbin/named cat named-xfer > $PKG/usr/sbin/named-xfer cat named.reload > $PKG/usr/sbin/named.reload cat named.restart > $PKG/usr/sbin/named.restart cat ndc > $PKG/usr/sbin/ndc cd ../tools strip dig dnsquery host cat dig > $PKG/usr/bin/dig cat dnsquery > $PKG/usr/bin/dnsquery cat host > $PKG/usr/bin/host cd nslookup strip nslookup cat nslookup > $PKG/usr/bin/nslookup cat nslookup.help > $PKG/usr/lib/nslookup.help cd ../../man for page in *.out1 ; do cat $page | gzip -9c > $PKG/usr/man/man1/`basename $page .out1`.1.gz done for page in *.out3 ; do cat $page | gzip -9c > $PKG/usr/man/man3/`basename $page .out3`.3.gz done cat resolver.out5 | gzip -9c > $PKG/usr/man/man5/resolver.5.gz for page in *.out7 ; do cat $page | gzip -9c > $PKG/usr/man/man7/`basename $page .out7`.7.gz done for page in *.out8 ; do cat $page | gzip -9c > $PKG/usr/man/man8/`basename $page .out8`.8.gz done # Build the package: cd $PKG tar czvf $TMP/bind.tgz . # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/bind-4.9.5-P1 rm -rf $PKG fi