--- admin/PlamoBuild.template.common.without_comment 2016-06-15 20:51:13.000000000 +0900 +++ plamo/01_minimum/network.txz/old/dnsmasq-20160806/PlamoBuild.dnsmasq-2.66 2016-08-06 18:26:45.000000000 +0900 @@ -1,15 +1,17 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.66.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/dnsmasq/cve-2015-3294.patch.gz" +pkgbase=dnsmasq +vers=2.66 arch=`uname -m` -build=P1 +build=P3 src=$pkgbase-$vers -patchfiles="" +patchfiles="cve-2015-3294.patch.gz" OPT_CONFIG="" -DOCS="README" +DOCS="CHANGELOG CHANGELOG.archive COPYING COPYING-v3 FAQ VERSION + dnsmasq.conf.example doc.html setup.html" ###################################################################### fscheck() { @@ -252,7 +254,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 @@ -269,9 +271,45 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + make install-i18n PREFIX=/usr DESTDIR=$P 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 \ @@ -295,9 +333,24 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - 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 read -p "Do you want to keep work files? [y/N] " ans