--- admin/PlamoBuild-template-20170415	2017-04-15 12:25:32.000000000 +0900
+++ plamo/01_minimum/gnupg_tls.txz/gnutls/PlamoBuild.gnutls-3.5.5	2017-06-06 13:32:40.000000000 +0900
@@ -1,18 +1,29 @@
 #!/bin/sh
 
 ######################################################################
-url=""
+url="http://mirrors.dotsrc.org/gnupg/gnutls/v3.5/gnutls-3.5.5.tar.xz
+    http://mirrors.dotsrc.org/gnupg/gnutls/v2.12/gnutls-2.12.23.tar.bz2
+    ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/gnutls/cve-2014-1959.patch.gz
+    ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/gnutls/cve-2014-0092.patch.gz
+    ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/gnutls/cve-2014-3466.patch.gz
+    ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/gnutls/CVE-2015-0294.patch.gz
+    ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/gnutls/CVE-2015-0282.patch.gz"
 verify=
 digest=
 commitid=
-pkgbase=
-vers=
+pkgbase=gnutls
+vers=3.5.5
 arch=`uname -m`
-build=P1
-src=$pkgbase-$vers
+build=P3
+src[0]=$pkgbase-$vers
+src[1]=$pkgbase-2.12.23
 patchfiles=""
-OPT_CONFIG=""
-DOCS="README"
+patchfiles[1]="`echo cve-2014-{1959,0092,3466}.patch.gz`
+    `echo CVE-2015-{0294,0282}.patch.gz`"
+OPT_CONFIG[0]="--disable-guile --without-p11-kit"
+OPT_CONFIG[1]="--with-libgcrypt --without-p11-kit"
+DOCS="LICENSE ABOUT-NLS NEWS INSTALL AUTHORS README.md THANKS
+    ChangeLog INSTALL.md CONTRIBUTING.md"
 template=20170415
 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin
 ######################################################################
@@ -61,7 +72,11 @@
   for i in `seq 0 $((${#B[@]} - 1))` ; do
     cd ${B[$i]}
     if [ -f Makefile ] ; then
-      make install DESTDIR=$P
+      case $i in
+      0) make install DESTDIR=$P ;;
+      1) install lib/.libs/libgnutls.so.26.22.6 $P/usr/$libdir
+          ln -s libgnutls.so.26.22.6 $P/usr/$libdir/libgnutls.so.26 ;;
+      esac
     fi
   done
   touch $W/i.et
@@ -72,8 +87,15 @@
   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/$libdir ! -name pkgconfig | tail -n+2`
+  tar rvpf $pkg.tar -C $P usr/include/gnutls
+  tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo`
+  tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2`
   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 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