--- admin/PlamoBuild-template-20170713	2017-07-13 13:07:00.000000000 +0900
+++ plamo/00_base/dhcp/PlamoBuild.dhcp-4.3.3	2018-02-02 15:10:53.000000000 +0900
@@ -1,19 +1,22 @@
 #!/bin/sh
 
 ######################################################################
-url=""
+url="http://ftp.isc.org/isc/dhcp/4.3.3/dhcp-4.3.3.tar.gz"
 verify=
 digest=
 branch=
 commitid=
-pkgbase=
-vers=
+pkgbase=dhcp
+vers=4.3.3
 arch=`uname -m`
-build=P1
+build=P6
 src=$pkgbase-$vers
 patchfiles=""
-OPT_CONFIG=""
-DOCS="README"
+OPT_CONFIG="--with-srv-lease-file=/var/db/dhcpd.leases
+    --with-srv6-lease-file=/var/db/dhcpd6.leases
+    --with-cli-lease-file=/var/db/dhclient.leases
+    --with-cli6-lease-file=/var/db/dhclient6.leases"
+DOCS="LICENSE README RELNOTES"
 template=20170713
 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin
 ######################################################################
@@ -37,6 +40,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
@@ -65,6 +77,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 \
@@ -72,9 +87,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