3 PKG=/tmp/package-dnsmasq
9 if [ "$ARCH" = "i386" ]; then
10 SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
11 elif [ "$ARCH" = "i486" ]; then
12 SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
13 elif [ "$ARCH" = "s390" ]; then
15 elif [ "$ARCH" = "x86_64" ]; then
22 rm -rf dnsmasq-$VERSION
23 tar xzvf $CWD/dnsmasq-$VERSION.tar.gz
25 zcat $CWD/dnsmasq.leasedir.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit
27 make install-i18n PREFIX=/usr DESTDIR=$PKG MANDIR=/usr/man
28 chmod 755 $PKG/usr/sbin/dnsmasq
29 chown -R root.bin $PKG/usr/sbin
30 gzip -9 $PKG/usr/man/man8/dnsmasq.8
31 for f in $PKG/usr/share/man/*; do
32 if [ -f $$f/man8/dnsmasq.8 ]; then
33 gzip -9 $$f/man8/dnsmasq.8 ;
36 gzip -9 $PKG/usr/man/*/man8/dnsmasq.8
37 mkdir -p $PKG/var/state/dnsmasq
39 find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
40 find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
43 cat dnsmasq.conf.example > $PKG/etc/dnsmasq.conf.new
45 zcat $CWD/rc.dnsmasq.gz > $PKG/etc/rc.d/rc.dnsmasq.new
46 mkdir -p $PKG/usr/doc/dnsmasq-$VERSION
48 CHANGELOG COPYING FAQ UPGRADING_to_2.0 doc.html setup.html \
49 $PKG/usr/doc/dnsmasq-$VERSION
51 cat $CWD/slack-desc > $PKG/install/slack-desc
52 zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
55 makepkg -l y -c n ../dnsmasq-$VERSION-$ARCH-$BUILD.tgz