--- admin/PlamoBuild-template-20170323 2017-03-23 06:38:12.000000000 +0900 +++ plamo/00_base/old/dhcp-20170401/PlamoBuild.dhcp-4.3.3 2017-04-01 20:11:15.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="" +url="http://ftp.isc.org/isc/dhcp/4.3.3/dhcp-4.3.3.tar.gz" verify= commitid= -pkgbase= -vers= +pkgbase=dhcp +vers=4.3.3 arch=`uname -m` -build=P1 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="LICENSE README RELNOTES" template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -35,6 +35,15 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + cp -p client/scripts/linux{,.orig} + cat <<- "EOF" | patch client/scripts/linux + 24a25,26 + > PATH=/sbin/:$PATH + > + EOF + cp -p client/dhclient.conf.example{,.orig} + sed -i '/^script/s@etc@sbin@g' client/dhclient.conf.example for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -63,6 +72,9 @@ make install DESTDIR=$P fi done + install -d $P/sbin + install client/scripts/linux $P/sbin/dhclient-script + install -d $P/var/db touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -70,9 +82,33 @@ compress setup_docdir convert_links - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + install -d $P/install + cat <<- "EOF" > $P/install/doinst.sh + dhc_config() { + mv etc/$1.conf.example /tmp + if [ -f etc/$1.conf ] ; then + mv /tmp/$1.conf.example etc/$1.conf.dist + else + mv /tmp/$1.conf.example etc/$1.conf + fi + } + + for i in dhclient dhcpd ; do dhc_config $i ; done + 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/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find etc | tail -n+2` + tar rvpf $pkg.tar -C $P var/db tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man5 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/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