--- admin/PlamoBuild.template.common.without_comment 2016-06-15 20:51:13.000000000 +0900 +++ plamo/01_minimum/old/fortune_mod-20160712/PlamoBuild.fortune_mod-1.99.1 2016-07-12 13:05:52.000000000 +0900 @@ -1,15 +1,16 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="https://www.jabawok.net/gentoo/distfiles/fortune-mod-1.99.1.tar.gz + http://kambing.ui.ac.id/gentoo-portage/games-misc/fortune-mod/files/01_all_fortune_all-fix.patch" +pkgbase=fortune_mod +vers=1.99.1 arch=`uname -m` -build=P1 -src=$pkgbase-$vers +build=P3 +src=fortune-mod-$vers patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="ChangeLog INDEX INSTALL Notes Offensive README TODO cookie-files" ###################################################################### fscheck() { @@ -233,6 +234,23 @@ esac done done + cd $B + patch -Np0 -i $W/01_all_fortune_all-fix.patch + cp -p Makefile Makefile.orig + sed -i -e '/^FORTDIR=/s@games@bin@g' -e '/^COOKIEDIR=/s@/games@@g' \ + -e '/^LOCALDIR=/s@/games@@g' -e '/^BINDIR=/s@bin@sbin@g' \ + -e '/^FORTMANDIR=/s@man6@man1@g' -e '/^FORTMANEXT=/s@6@1@g' \ + -e '/^REGEXDEFS=/s@BSD@POSIX@g' -e 's@$(FORTDIR)@$(DESTDIR)&@g' \ + -e 's@$(BINDIR)@$(DESTDIR)&@g' -e 's@$(FORTMANDIR)@$(DESTDIR)&@g' \ + -e 's@$(BINMANDIR)@$(DESTDIR)&@g' Makefile + cat <<- "EOF" | patch Makefile + 180,181c180,181 + < cd datfiles && $(MAKE) COOKIEDIR=$(COOKIEDIR) \ + < OCOOKIEDIR=$(OCOOKIEDIR) WCOOKIEDIR=$(WCOOKIEDIR) \ + --- + > cd datfiles && $(MAKE) COOKIEDIR=$(DESTDIR)$(COOKIEDIR) \ + > OCOOKIEDIR=$(DESTDIR)$(OCOOKIEDIR) WCOOKIEDIR=$(DESTDIR)$(WCOOKIEDIR) \ + EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -255,6 +273,7 @@ make fi done + make fortune/fortune.man fi if [ $opt_package -eq 1 ] ; then if [ `id -u` -ne 0 ] ; then @@ -295,9 +314,14 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert + prune_symlink $P/usr/share/fortunes + touch -t `date '+%m%d0900'` $P/usr/share/fortunes{,/off} tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $pkg.tar -C $P usr/share/fortunes tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | 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