--- admin/PlamoBuild-template-20170415 2017-04-15 12:25:32.000000000 +0900 +++ plamo/01_minimum/network.txz/dnsmasq/PlamoBuild.dnsmasq-2.76 2017-06-14 07:09:26.000000000 +0900 @@ -1,18 +1,19 @@ #!/bin/sh ###################################################################### -url="" +url="http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.76.tar.gz" verify= digest= commitid= -pkgbase= -vers= +pkgbase=dnsmasq +vers=2.76 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="FAQ COPYING setup.html CHANGELOG COPYING-v3 CHANGELOG.archive + doc.html" template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -49,7 +50,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make + make all-i18n PREFIX=/usr fi done fi @@ -61,9 +62,45 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + make install-i18n DESTDIR=$P PREFIX=/usr fi done + install -d $P/etc + install -m 644 $B/dnsmasq.conf.example $P/etc/dnsmasq.conf.new + install -d $P/etc/rc.d/init.d + cat <<- "EOF" > $P/etc/rc.d/init.d/dnsmasq + #!/bin/sh + + start() { + if [ -x /usr/sbin/dnsmasq ] ; then + dnsmasq + fi + } + + stop() { + killall dnsmasq + } + + case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 1 + start + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 + ;; + esac + exit 0 + EOF + chmod 644 $P/etc/rc.d/init.d/dnsmasq touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -71,9 +108,24 @@ compress setup_docdir convert_links - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + install -d $P/install + cat <<- "EOF" > $P/install/doinst.sh + mv etc/dnsmasq.conf.new /tmp + if [ -f etc/dnsmasq.conf ] ; then + mv /tmp/dnsmasq.conf.new etc/dnsmasq.conf.dist + else + mv /tmp/dnsmasq.conf.new etc/dnsmasq.conf + fi + EOF + touch -t `date '+%m%d0900'` $P/install/doinst.sh + tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` + tar rvpf $pkg.tar -C $P `cd $P ; find etc -type f` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/es/man8 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/fr/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup