--- plamo/00_base/old/groff-20160405/PlamoBuild.groff-1.18.1.1 2016-04-05 13:51:39.000000000 +0900 +++ plamo/00_base/groff/PlamoBuild.groff-1.18.1.1 2016-07-30 04:51:27.000000000 +0900 @@ -8,8 +8,9 @@ pkgbase=groff vers=1.18.1.1 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--enable-multibyte" DOCS="BUG-REPORT COPYING ChangeLog FDL INSTALL* MANIFEST MORE.STUFF NEWS PROBLEMS PROJECTS README* REVISION TODO VERSION" @@ -189,13 +190,35 @@ fi if [ $opt_download -eq 1 ] ; then for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi + if [ ! -f ${i##*/} ] ; then + wget $i ; j=${i%.*} + for sig in asc sig{,n} {sha{256,1},md5}{,sum} ; do + if wget --spider $i.$sig ; then wget $i.$sig ; break ; fi + if wget --spider $j.$sig ; then + case ${i##*.} in + gz) gunzip -c ${i##*/} > ${j##*/} ;; + bz2) bunzip2 -c ${i##*/} > ${j##*/} ;; + xz) unxz -c ${i##*/} > ${j##*/} ;; + esac + touch -r ${i##*/} ${j##*/} ; i=$j ; wget $i.$sig ; break + fi + done + if [ -f ${i##*/}.$sig ] ; then + case $sig in + asc|sig|sign) gpg2 --verify ${i##*/}.$sig ;; + sha256|sha1|md5) ${sig}sum -c ${i##*/}.$sig ;; + *) $sig -c ${i##*/}.$sig ;; + esac + if [ $? -ne 0 ] ; then echo "archive verify failed" ; exit ; fi + fi + fi done for i in $url ; do case ${i##*.} in tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -203,6 +226,17 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} + for j in ${patchfiles[$i]} ; do + case ${j##*.} in + gz) gunzip -c $W/$j | patch -Np1 -i - ;; + bz2) bunzip2 -c $W/j | patch -Np1 -i - ;; + xz) unxz -c $W/$j | patch -Np1 -i - ;; + *) patch -Np1 -i $W/$j ;; + esac + done + done cd $B gunzip -c $W/groff_1.18.1.1-20.diff.gz | patch -Np1 -i - gunzip -c $W/groff-1.18.1.1-fix-minus-char.patch.gz | patch -Np1 -i - @@ -216,8 +250,8 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ - --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -298,6 +332,7 @@ 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/man7 | 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