--- plamo/00_base/old/kernel-20160124/PlamoBuild.kernel-4.1.15_plamoRPi2 2016-01-24 09:29:53.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.1.15_plamoRPi2 2016-02-04 17:54:58.000000000 +0900 @@ -9,12 +9,11 @@ ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-morse_code_panics.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2 - https://github.com/raspberry/firmware.git" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2" pkgbase=kernel vers=4.1.15_plamoRPi2 arch=`uname -m` -build=P1 +build=P2 src=linux OPT_CONFIG="" DOCS="" @@ -208,7 +207,6 @@ git) ( cd `basename ${i##*/} .git` case `basename ${i##*/} .git` in linux) git checkout origin/rpi-4.1.y ; git reset --hard d51c7d8 ;; - firmware) git checkout origin/master ; git reset --hard 1ed8eca ;; aufs4-*) git checkout origin/aufs4.1 ; git reset --hard 2b569cf ;; esac ) ;; esac @@ -234,13 +232,16 @@ bunzip2 -c $W/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch cp -p $W/config-4.1.15-plamoRPi2 .config - cp -p $W/firmware/extra/Module7.symvers Module.symvers cp -p arch/arm/boot/install.sh{,.orig} sed -i '/INSTALLKERNEL/s@^@#@g' arch/arm/boot/install.sh cat <<- "EOF" | patch arch/arm/boot/install.sh 40a41,42 > cp .config $4/config-$1 > + 54c56 + < cat $2 > $4/$base-$1 + --- + > scripts/mkknlimg $2 $4/kernel7.img-$1 EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} @@ -279,17 +280,20 @@ cd ${B[$i]} if [ -f Makefile ] ; then install -d $P/boot - make install INSTALL_PATH=$P/boot + make zinstall INSTALL_PATH=$P/boot make modules_install INSTALL_MOD_PATH=$P fi done krel=${vers//_/-} - ln -s config-$krel $P/boot/config - ln -s vmlinuz-$krel $P/boot/vmlinuz - ln -s System.map-$krel $P/boot/System.map - rm $P/lib/modules/$krel/{source,build} - ln -s /usr/src/linux $P/lib/modules/$krel/source - ln -s /usr/src/linux $P/lib/modules/$krel/build + cp -p $P/boot/config{-$krel,} + cp -p $P/boot/kernel7.img{-$krel,} + cp -p $P/boot/System.map{-$krel,} + install -d $P/boot/overlays + install -m 644 $B/arch/arm/boot/dts/overlays/README $P/boot/overlays + install -m 644 $B/arch/arm/boot/dts/overlays/*.dtb $P/boot/overlays + install -m 644 $B/arch/arm/boot/dts/*.dtb $P/boot + ln -sf /usr/src/linux $P/lib/modules/$krel/source + ln -sf /usr/src/linux $P/lib/modules/$krel/build touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -315,10 +319,9 @@ done touch -t `date '+%m%d0900'` $docdir/$src convert - prune_symlink $P/boot prune_symlink $P/lib/modules/$krel touch -t `date '+%m%d0900'` $P/lib/modules/$krel - tar cvpf $pkg.tar -C $P `cd $P ; find boot | tail -n+2` + tar cvpf $pkg.tar -C $P `cd $P ; find boot -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P lib/modules/$krel tar rvpf $pkg.tar -C $P lib/firmware tar rvpf $pkg.tar -C $P usr/share/doc/$src --- plamo/00_base/old/grub-20160103/PlamoBuild.grub-2.02~beta2 2016-01-03 09:19:21.000000000 +0900 +++ plamo/00_base/grub/PlamoBuild.grub-2.02~beta2 2016-01-31 19:55:06.000000000 +0900 @@ -7,7 +7,7 @@ pkgbase=grub vers=2.02~beta2 arch=`uname -m` -build=P9 +build=P10 src=$pkgbase-$vers OPT_CONFIG="--sysconfdir=/etc --disable-grub-mount --disable-werror --with-platform=efi" @@ -252,6 +252,7 @@ done install -d $P/sbin install $W/plamo_grubconfig/sbin/grubconfig{,_mbr,_efi} $P/sbin + install $W/plamo_grubconfig/sbin/grub_partuuid.sh $P/sbin install -d $P/etc/default cat <<- "EOF" > $P/etc/default/grub # Default menu entry --- plamo/00_base/old/openssh-20160114/PlamoBuild.openssh-7.1p1 2016-01-14 20:51:15.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.1p2 2016-01-26 12:29:51.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.1p1.tar.gz" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.1p2.tar.gz" pkgbase=openssh -vers=7.1p1 +vers=7.1p2 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -11,9 +11,8 @@ --with-privsep-user=sshd --with-privsep-path=/var/lib/sshd --with-md5-passwords" DOCS="CREDITS INSTALL LICENCE OVERVIEW PROTOCOL PROTOCOL.agent - PROTOCOL.certkeys PROTOCOL.chacha20poly1305 PROTOCOL.key - PROTOCOL.krl PROTOCOL.mux README README.dns README.platform - README.privsep README.tun TODO ChangeLog" + `echo PROTOCOL.{certkeys,chacha20poly1305,key,krl,mux}` + README `echo README.{dns,platform,privsep,tun}` TODO ChangeLog" ###################################################################### fscheck() { --- plamo/00_base/old/openssh-20160126/PlamoBuild.openssh-7.1p2 2016-01-26 12:29:51.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.2p1 2016-03-14 18:20:09.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.1p2.tar.gz" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p1.tar.gz" pkgbase=openssh -vers=7.1p2 +vers=7.2p1 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -250,6 +250,8 @@ make install DESTDIR=$P fi done + ln -s ssh $P/usr/bin/slogin + ln -s ssh.1 $mandir/man1/slogin.1 chgrp sys $P/var/lib/sshd mv $P/etc/ssh/ssh_config{,.new} ; mv $P/etc/ssh/sshd_config{,.new} mv $P/etc/ssh/{ssh{,d}_config.new,moduli} $C --- plamo/00_base/old/grub-20160131/PlamoBuild.grub-2.02~beta2 2016-01-31 19:55:06.000000000 +0900 +++ plamo/00_base/grub/PlamoBuild.grub-2.02~beta2 2016-03-14 17:15:16.000000000 +0900 @@ -7,7 +7,7 @@ pkgbase=grub vers=2.02~beta2 arch=`uname -m` -build=P10 +build=P12 src=$pkgbase-$vers OPT_CONFIG="--sysconfdir=/etc --disable-grub-mount --disable-werror --with-platform=efi" --- plamo/00_base/old/hdsetup-20160113/PlamoBuild.hdsetup-6.0 2016-01-13 22:20:16.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-03-15 08:27:01.000000000 +0900 @@ -5,9 +5,9 @@ http://plamo.linet.gr.jp/~tamuki/src/busybox-1.24.1-config http://invisible-mirror.net/archives/dialog/dialog-1.1-20110302.tgz http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz - http://plamo.linet.gr.jp/~tamuki/src/hdsetup-6.0-plamoscripts.tar.gz" + http://plamo.linet.gr.jp/~tamuki/src/hdsetup-plamoscripts.tar.gz" pkgbase=hdsetup -vers=6.0 +vers=6.1 arch=`uname -m` build=P2 src[0]=busybox-1.24.1 @@ -275,7 +275,7 @@ mv $P/bin $P/sbin/installer cp -r $W/sbin $P install -d $P/usr/lib/setup - touch $P/usr/lib/setup/Plamo-6.0 + touch $P/usr/lib/setup/Plamo-$vers touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/00_base/old/lilo-20151222/PlamoBuild.lilo-24.1 2015-12-22 20:53:46.000000000 +0900 +++ plamo/00_base/lilo/PlamoBuild.lilo-24.2 2016-03-14 17:34:46.000000000 +0900 @@ -1,19 +1,20 @@ #!/bin/sh ###################################################################### -url="http://lilo.alioth.debian.org/ftp/sources/lilo-24.1.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/lilo-24.1-x86_64.patch.gz +url="http://lilo.alioth.debian.org/ftp/sources/lilo-24.2.tar.gz ftp://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/Dev86src-0.16.18.tar.gz http://plamo.linet.gr.jp/~tamuki/src/dev86-0.16.17-x86_64.patch.gz http://plamo.linet.gr.jp/~tamuki/src/dev86-0.16.17-copt.patch.gz http://plamo.linet.gr.jp/~tamuki/src/plamo_liloconfig.tar.gz" pkgbase=lilo -vers=24.1 +vers=24.2 arch=`uname -m` build=P2 src=$pkgbase-$vers OPT_CONFIG="" -DOCS="readme/* CHANGELOG_old TODO README COPYING CHANGELOG NEWS TOOLS" +DOCS="`echo readme/README.{bitmaps,common.problems,disk,nokeyboard}` + `echo readme/{README.{pseudo,volumeID,raid1},INCOMPAT,README}` + NEWS CHANGELOG TODO README COPYING CHANGELOG_old TOOLS" ###################################################################### fscheck() { @@ -205,7 +206,6 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done cd $B - gunzip -c $W/lilo-24.1-x86_64.patch.gz | patch -Np1 -i - cp -p checkit checkit.orig sed 's@^gcc @LANG=C gcc @g' checkit.orig > checkit cp -p diagnose/Makefile diagnose/Makefile.orig @@ -301,10 +301,10 @@ touch -r $S/sample $docdir/$src/sample cp -a $S/doc $docdir/$src chown -R root.root $docdir/$src/{sample,doc} - mv $docdir/$src/{doc,readme,sample,{CHANGELOG_old,TODO,README}.gz} $C - mv $docdir/$src/{COPYING,CHANGELOG,NEWS,TOOLS,$myname}.gz $C - mv $C/{doc,readme,sample,{CHANGELOG_old,TODO,README}.gz} $docdir/$src - mv $C/{COPYING,CHANGELOG,NEWS,TOOLS,$myname}.gz $docdir/$src + mv $docdir/$src/{readme,sample,{NEWS,CHANGELOG,TODO,README}.gz} $C + mv $docdir/$src/{{COPYING,CHANGELOG_old,TOOLS}.gz,doc,$myname.gz} $C + mv $C/{readme,sample,{NEWS,CHANGELOG,TODO,README}.gz} $docdir/$src + mv $C/{{COPYING,CHANGELOG_old,TOOLS}.gz,doc,$myname.gz} $docdir/$src touch -r $S $docdir/$src convert tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` --- plamo/00_base/old/shadow-20151222/PlamoBuild.shadow-git_20130908 2015-12-22 12:51:24.000000000 +0900 +++ plamo/00_base/shadow/PlamoBuild.shadow-git_20130908 2016-01-25 12:43:14.000000000 +0900 @@ -2,11 +2,11 @@ ###################################################################### url="https://github.com/shadow-maint/shadow.git - http://plamo.linet.gr.jp/~tamuki/src/shadow-adduser-20141229" + http://plamo.linet.gr.jp/~tamuki/src/shadow-adduser-20160122" pkgbase=shadow vers=git_20130908 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase OPT_CONFIG="--sysconfdir=/etc --enable-man --without-selinux --with-libcrack" @@ -368,7 +368,7 @@ make install DESTDIR=$P fi done - install $W/shadow-adduser-20141229 $P/usr/sbin/adduser + install $W/shadow-adduser-20160122 $P/usr/sbin/adduser install -d $mandir/ja_JP.eucJP/man{1,5,8} for i in `cd $mandir/ja ; find . -type f` ; do nkf -We $mandir/ja/$i > $mandir/ja_JP.eucJP/$i --- plamo/00_base/old/sysvinit-20151222/PlamoBuild.sysvinit-2.88dsf 2015-12-22 18:27:02.000000000 +0900 +++ plamo/00_base/sysvinit/PlamoBuild.sysvinit-2.88dsf 2016-03-14 19:15:52.000000000 +0900 @@ -2,11 +2,11 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-test/for-5.0/plamo-rc-scripts/plamo-rc-scripts-20151013.tgz" + ftp://plamo.linet.gr.jp/pub/Plamo-test/for-5.0/plamo-rc-scripts/plamo-rc-scripts-20160208.tgz" pkgbase=sysvinit vers=2.88dsf arch=`uname -m` -build=P15 +build=P16 src=$pkgbase-$vers OPT_CONFIG="" DOCS="doc/bootlogd.README doc/Install doc/Changelog doc/Propaganda @@ -245,17 +245,22 @@ #!/bin/sh root="`cat /proc/cmdline | sed -n 's@.*\=\([^ ]*\).*@\1@p'`" - if [ -n "`echo $root | grep "/dev/"`" ] ; then - # root=/dev/sdb1 (grub) - root_part=`echo $root | sed 's@/dev/@@'` + if grep -q "^PARTUUID=" <<< $root ; then + # root=PARTUUID= + root_part=`blkid | tr -d '"' | grep $root | cut -d: -f1 | sed 's@/dev/@@'` else - # root=821 (lilo) - maj=$((`printf "%d" 0x$root` / 256)) ; min=$((`printf "%d" 0x$root` % 256)) - root_part=`cat /proc/partitions | sed -n "/ $maj *$min /s@.* \([^ ]*\)@\1@p"` + if grep -q "^/dev/" <<< $root ; then + # root=/dev/sda1 (grub) + root_part=${root#/dev/} + else + # root=801 (lilo) + maj=$((`printf "%d" 0x$root` / 256)) + min=$((`printf "%d" 0x$root` % 256)) + root_part=`cat /proc/partitions \ + | sed -n "/ $maj *$min /s@.* \([^ ]*\)@\1@p"` + fi fi - ( cd /dev ; rm -rf root ) - ( cd /dev ; ln -sf $root_part root ) - exit 0 + ln -sf $root_part /dev/root EOF chmod 755 $P/sbin/link_rootdev.sh touch $W/i.et --- plamo/00_base/old/timezone-20160117/PlamoBuild.timezone-2012e 2016-01-17 10:46:09.000000000 +0900 +++ plamo/00_base/timezone/PlamoBuild.timezone-2015g 2016-01-26 13:27:41.000000000 +0900 @@ -1,16 +1,16 @@ #!/bin/sh ###################################################################### -url="http://www.iana.org/time-zones/repository/releases/tzcode2012e.tar.gz - http://www.iana.org/time-zones/repository/releases/tzdata2012e.tar.gz +url="http://www.iana.org/time-zones/repository/releases/tzcode2015g.tar.gz + http://www.iana.org/time-zones/repository/releases/tzdata2015g.tar.gz http://plamo.linet.gr.jp/~tamuki/src/plamo_timeconfig.tar.gz" pkgbase=timezone -vers=2012e +vers=2015g arch=`uname -m` build=P2 src=$pkgbase-$vers OPT_CONFIG="" -DOCS="README Theory" +DOCS="CONTRIBUTING NEWS README Theory tz-art.htm tz-link.htm" ###################################################################### fscheck() { @@ -196,9 +196,9 @@ bz2) tar xvpjf ${i##*/} ;; esac done - mkdir timezone-2012e - tar xvpzf tzcode2012e.tar.gz -C timezone-2012e - tar xvpzf tzdata2012e.tar.gz -C timezone-2012e + mkdir timezone-2015g + tar xvpzf tzcode2015g.tar.gz -C timezone-2015g + tar xvpzf tzdata2015g.tar.gz -C timezone-2015g tar xvpzf plamo_timeconfig.tar.gz fi if [ $opt_config -eq 1 ] ; then @@ -273,6 +273,7 @@ fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done + touch -t `date '+%m%d0900'` $docdir/$src convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` --- plamo/00_base/old/extipl-20151231/PlamoBuild.extipl-5.04 2015-12-31 16:31:10.000000000 +0900 +++ plamo/00_base/extipl/PlamoBuild.extipl-5.04 2016-03-20 21:41:47.000000000 +0900 @@ -2,7 +2,7 @@ ###################################################################### url="http://jaist.dl.sourceforge.jp/extipl/2166/extipl-5.04.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/extipl-5.04-syscall.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/extipl/extipl-5.04-syscall.patch.gz http://jaist.dl.sourceforge.net/sourceforge/nasm/nasm-0.98.38.tar.bz2" pkgbase=extipl vers=5.04 --- plamo/00_base/old/netkit_combo-20151222/PlamoBuild.netkit_combo-0.17 2015-12-22 11:56:17.000000000 +0900 +++ plamo/00_base/netkit_combo/PlamoBuild.netkit_combo-0.17 2016-03-23 07:42:38.000000000 +0900 @@ -2,26 +2,26 @@ ###################################################################### url="ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/netkit-combo-0.17.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/biff+comsat-0.17.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/biff+comsat.offset.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/biff+comsat.badutmp.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/bsd-finger_0.17-13.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/linux-ftpd_0.17-29.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-bootparamd_0.17-9.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-ftp_0.17-19.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-ntalk_0.17-14.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/routed.18.candidate.final.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-routed-0.17.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-rsh_0.17-14.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-rusers_0.17-7.1.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-rwall_0.17-6.2.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-rwho_0.17-12.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-telnet_0.17-36.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-tftp_0.17-17.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-timed-0.17.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netwrite-0.17.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-combo-0.17-diffs.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/netkit-combo-0.17-tirpc.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/biff+comsat-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/biff+comsat.offset.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/biff+comsat.badutmp.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/bsd-finger_0.17-13.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/linux-ftpd_0.17-29.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-bootparamd_0.17-9.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-ftp_0.17-19.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-ntalk_0.17-14.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/routed.18.candidate.final.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-routed-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rsh_0.17-14.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rusers_0.17-7.1.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rwall_0.17-6.2.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rwho_0.17-12.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-telnet_0.17-36.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-tftp_0.17-17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-timed-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netwrite-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-combo-0.17-diffs.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-combo-0.17-tirpc.patch.gz" pkgbase=netkit_combo vers=0.17 arch=`uname -m` --- plamo/00_base/old/ncurses-20160114/PlamoBuild.ncurses-5.7 2016-01-14 08:31:54.000000000 +0900 +++ plamo/00_base/ncurses/PlamoBuild.ncurses-5.7 2016-03-24 11:50:31.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=ncurses vers=5.7 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers OPT_CONFIG="--with-shared --without-debug --enable-widec --with-manpage-format=normal" @@ -204,8 +204,10 @@ done cd $B patch -Np1 -i $W/ncurses-5.7-branch_update-21.patch - cp -p misc/run_tic.in{,.orig} - sed -i 's@\@lib64@g' misc/run_tic.in + if [ $arch == x86_64 ] ; then + cp -p misc/run_tic.in{,.orig} + sed -i 's@\@lib64@g' misc/run_tic.in + fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/00_base/old/bash-20151225/PlamoBuild.bash-4.2.53 2015-12-25 20:30:44.000000000 +0900 +++ plamo/00_base/bash/PlamoBuild.bash-4.2.53 2016-04-02 17:02:57.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=bash vers=4.2.53 arch=`uname -m` -build=P2 +build=P3 src[0]=$pkgbase-$vers src[1]=${src[0]} OPT_CONFIG[0]="--bindir=/bin --without-bash-malloc --with-installed-readline" @@ -278,6 +278,7 @@ 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 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 --- plamo/00_base/old/groff-20160101/PlamoBuild.groff-1.18.1.1 2016-01-01 14:14:33.000000000 +0900 +++ plamo/00_base/groff/PlamoBuild.groff-1.18.1.1 2016-03-20 22:37:30.000000000 +0900 @@ -3,8 +3,8 @@ ###################################################################### url="http://ftp.gnu.org/gnu/groff/old/groff-1.18.1.1.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/groff_1.18.1.1-20.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/groff-1.18.1.1-fix-minus-char.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/groff-1.18.1.1-polyfill_fix.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/groff/groff-1.18.1.1-fix-minus-char.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/groff/groff-1.18.1.1-polyfill_fix.patch.gz" pkgbase=groff vers=1.18.1.1 arch=`uname -m` --- plamo/00_base/old/hdsetup-20160315/PlamoBuild.hdsetup-6.1 2016-03-15 08:27:01.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-03-20 22:53:19.000000000 +0900 @@ -2,10 +2,10 @@ ###################################################################### url="https://www.busybox.net/downloads/busybox-1.24.1.tar.bz2 - http://plamo.linet.gr.jp/~tamuki/src/busybox-1.24.1-config + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/busybox-1.24.1-config http://invisible-mirror.net/archives/dialog/dialog-1.1-20110302.tgz http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz - http://plamo.linet.gr.jp/~tamuki/src/hdsetup-plamoscripts.tar.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" pkgbase=hdsetup vers=6.1 arch=`uname -m` --- plamo/00_base/old/file-20151228/PlamoBuild.file-5.22 2015-12-28 16:05:57.000000000 +0900 +++ plamo/00_base/file/PlamoBuild.file-5.22 2016-04-02 18:30:26.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=file vers=5.22 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO MAINT" @@ -264,6 +264,7 @@ tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | 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 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 --- plamo/00_base/old/dhcp-20151228/PlamoBuild.dhcp-4.2.7 2015-12-28 02:33:19.000000000 +0900 +++ plamo/00_base/dhcp/PlamoBuild.dhcp-4.3.3 2016-01-25 13:06:29.000000000 +0900 @@ -1,11 +1,9 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/dhcp/4.2.7/dhcp-4.2.7.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/dhcp-udp_checksum_offloading.patch - http://plamo.linet.gr.jp/~tamuki/src/dhcp-ffff-checksum.patch" +url="http://ftp.isc.org/isc/dhcp/4.3.3/dhcp-4.3.3.tar.gz" pkgbase=dhcp -vers=4.2.7 +vers=4.3.3 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -202,8 +200,6 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done cd $B - patch -Np1 -i $W/dhcp-udp_checksum_offloading.patch - patch -Np1 -i $W/dhcp-ffff-checksum.patch cp -p client/scripts/linux{,.orig} cat <<- "EOF" > client/scripts/linux 24a25,26 --- plamo/00_base/old/file-20160402/PlamoBuild.file-5.22 2016-04-02 18:30:26.000000000 +0900 +++ plamo/00_base/file/PlamoBuild.file-5.22 2016-04-07 07:39:50.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=file vers=5.22 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO MAINT" @@ -262,7 +262,13 @@ done convert 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 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/misc | 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 `cd $P ; find usr/share/man/man4 | 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 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 --- plamo/00_base/old/dump-20151224/PlamoBuild.dump-0.4b44 2015-12-24 20:45:35.000000000 +0900 +++ plamo/00_base/dump/PlamoBuild.dump-0.4b44 2016-03-20 21:34:01.000000000 +0900 @@ -2,8 +2,8 @@ ###################################################################### url="http://jaist.dl.sourceforge.net/sourceforge/dump/dump-0.4b44.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/dump-0.4b41-destdir.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/dump-0.4b44-com_err.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/dump/dump-0.4b41-destdir.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/dump/dump-0.4b44-com_err.patch.gz" pkgbase=dump vers=0.4b44 arch=`uname -m` --- plamo/00_base/old/less-20151222/PlamoBuild.less-382 2015-12-22 18:45:52.000000000 +0900 +++ plamo/00_base/less/PlamoBuild.less-382 2016-03-21 18:38:07.000000000 +0900 @@ -8,7 +8,7 @@ ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/less-382-iso260-261.patch.gz ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/less-382-iso261-262.patch.gz ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/less-382-iso262.ext03.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/less-382-def_priority.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/less/less-382-def_priority.patch.gz" pkgbase=less vers=382 arch=`uname -m` --- plamo/00_base/old/netkit_combo-20160323/PlamoBuild.netkit_combo-0.17 2016-03-23 07:42:38.000000000 +0900 +++ plamo/00_base/netkit_combo/PlamoBuild.netkit_combo-0.17 2016-03-30 13:45:36.000000000 +0900 @@ -25,7 +25,7 @@ pkgbase=netkit_combo vers=0.17 arch=`uname -m` -build=P7 +build=P8 src=netkit-combo-$vers OPT_CONFIG="" DOCS="README @@ -267,6 +267,10 @@ gunzip -c $W/netkit-tftp_0.17-17.diff.gz | patch -Np1 -i - cd $B/netkit-telnet gunzip -c $W/netkit-telnet_0.17-36.diff.gz | patch -Np1 -i - + if [ $arch == x86_64 ] ; then + cp -p telnetd/Makefile{,.orig} + sed 's@/lib@/lib64@g' telnetd/Makefile.orig > telnetd/Makefile + fi cd $B/netkit-timed gunzip -c $W/netkit-timed-0.17.diff.gz | patch -Np1 -i - cd $B/netwrite --- plamo/00_base/old/nvi-20151229/PlamoBuild.nvi-1.79 2015-12-29 20:25:44.000000000 +0900 +++ plamo/00_base/nvi/PlamoBuild.nvi-1.79 2016-03-26 22:31:27.703769823 +0900 @@ -3,8 +3,8 @@ ###################################################################### url="http://pkgs.fedoraproject.org/repo/pkgs/nvi-m17n/nvi-1.79.tar.gz/765e2153f5fc4f21793f2edc2647305a/nvi-1.79.tar.gz http://pkgs.fedoraproject.org/repo/pkgs/nvi-m17n/nvi-1.79.m17n-20040401.diff.gz/851650ced51697b3b08400fa75621c97/nvi-1.79.m17n-20040401.diff.gz - http://plamo.linet.gr.jp/~tamuki/src/nvi-1.79-64bit_breakage.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/nvi-1.79-DESTDIR.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/nvi/nvi-1.79-64bit_breakage.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/nvi/nvi-1.79-DESTDIR.patch.gz" pkgbase=nvi vers=1.79 arch=`uname -m` @@ -210,10 +210,11 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done cd $B + chmod -R u+w . gunzip -c $W/nvi-1.79.m17n-20040401.diff.gz | patch -Np0 -i - gunzip -c $W/nvi-1.79-64bit_breakage.patch.gz | patch -Np1 -i - gunzip -c $W/nvi-1.79-DESTDIR.patch.gz | patch -Np1 -i - - cp -p build/configure{,.orig} ; chmod 755 build/configure + cp -p build/configure{,.orig} sed '/^LDFLAGS=/s@$LDFLAGS@${LDFLAGS-"-lncurses"}@g' build/configure.orig \ > build/configure for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -255,6 +256,52 @@ make install DESTDIR=$P fi done + install -d $P/usr/libexec + mv $P/usr/bin/{vi,ex,view} $P/usr/libexec + cat <<- "EOF" > $P/usr/bin/vi + #!/bin/sh + + optend=0 ; optarg=0 ; nargv=() + for arg in "$@" ; do + file=0 + if [ $optend -eq 1 ] ; then + file=1 + elif [ $optarg -eq 1 ] ; then + optarg=0 + elif [ "${arg:0:1}" == "-" ] ; then + if [ "$arg" == "--" ] ; then + optend=1 + elif [ `expr length "$(expr "$arg" : ".*\([ctw].*\)")"` -eq 1 ] ; then + optarg=1 + fi + elif [ "${arg:0:1}" != "+" ] ; then + file=1 + fi + if [ $file -eq 1 ] ; then + if [ -f "$arg" ] ; then + if [ `nkf -g "$arg"` == UTF-8 ] ; then + temp=`mktemp /tmp/vi.XXXXXX` + nkf -e "$arg" > $temp + touch -r "$arg" $temp + arg=$temp + fi + fi + fi + nargv=("${nargv[@]}" "$arg") + done + /usr/libexec/${0##*/} "${nargv[@]}" + i=0 + for arg in "$@" ; do + if [ "$arg" != "${nargv[$i]}" ] ; then + [ ${nargv[$i]} -nt "$arg" ] && nkf -w ${nargv[$i]} > "$arg" + rm ${nargv[$i]} + fi + let ++i + done + EOF + chmod 755 $P/usr/bin/vi + ln $P/usr/bin/{vi,ex} + ln $P/usr/bin/{vi,view} touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -289,6 +336,7 @@ touch -r $S $docdir/$src convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/libexec | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/vi tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/cat1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` --- plamo/00_base/old/tcsh-20160116/PlamoBuild.tcsh-6.17.00 2016-01-16 16:04:07.000000000 +0900 +++ plamo/00_base/tcsh/PlamoBuild.tcsh-6.19.00 2016-01-26 13:00:32.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="http://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.17.00.tar.gz" +url="http://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.19.00.tar.gz" pkgbase=tcsh -vers=6.17.00 +vers=6.19.00 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -220,7 +220,6 @@ cd ${B[$i]} if [ -f Makefile ] ; then make - make catalogs fi done fi @@ -244,33 +243,6 @@ install -d $P/bin mv $P/usr/bin/tcsh $P/bin ln -s /bin/tcsh $P/usr/bin - localedir=$P/usr/share/locale - install -d $localedir/C/LC_MESSAGES - install -m 644 tcsh.C.cat $localedir/C/LC_MESSAGES/tcsh.mo - install -d $localedir/et/LC_MESSAGES - install -m 644 tcsh.et.cat $localedir/et/LC_MESSAGES/tcsh.mo - install -d $localedir/fi/LC_MESSAGES - install -m 644 tcsh.finnish.cat $localedir/fi/LC_MESSAGES/tcsh.mo - install -d $localedir/fr/LC_MESSAGES - install -m 644 tcsh.french.cat $localedir/fr/LC_MESSAGES/tcsh.mo - install -d $localedir/de/LC_MESSAGES - install -m 644 tcsh.german.cat $localedir/de/LC_MESSAGES/tcsh.mo - install -d $localedir/gr/LC_MESSAGES - install -m 644 tcsh.greek.cat $localedir/gr/LC_MESSAGES/tcsh.mo - install -d $localedir/it/LC_MESSAGES - install -m 644 tcsh.italian.cat $localedir/it/LC_MESSAGES/tcsh.mo - install -d $localedir/ja/LC_MESSAGES - install -m 644 tcsh.ja.cat $localedir/ja/LC_MESSAGES/tcsh.mo - install -d $localedir/ja/LC_MESSAGES - install -m 644 tcsh.ja.cat $localedir/ja/LC_MESSAGES/tcsh.mo - install -d $localedir/pl/LC_MESSAGES - install -m 644 tcsh.pl.cat $localedir/pl/LC_MESSAGES/tcsh.mo - install -d $localedir/ru/LC_MESSAGES - install -m 644 tcsh.russian.cat $localedir/ru/LC_MESSAGES/tcsh.mo - install -d $localedir/es/LC_MESSAGES - install -m 644 tcsh.spanish.cat $localedir/es/LC_MESSAGES/tcsh.mo - install -d $localedir/ru_UA.koi8u/LC_MESSAGES - install -m 644 tcsh.ukrainian.cat $localedir/ru_UA.koi8u/LC_MESSAGES/tcsh.mo install -d $mandir/man3 install -m 644 glob.3 $mandir/man3 touch $W/i.et @@ -298,7 +270,7 @@ convert tar cvpf $pkg.tar -C $P `cd $P ; find bin | 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 usr/share/locale -name "*.mo"` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name "*.cat"` 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 --- plamo/00_base/old/hdsetup-20160320/PlamoBuild.hdsetup-6.1 2016-03-20 22:53:19.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-04-08 19:20:57.000000000 +0900 @@ -3,15 +3,15 @@ ###################################################################### url="https://www.busybox.net/downloads/busybox-1.24.1.tar.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/busybox-1.24.1-config - http://invisible-mirror.net/archives/dialog/dialog-1.1-20110302.tgz + ftp://invisible-island.net/dialog/dialog-1.3-20160209.tgz http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P2 +build=P3 src[0]=busybox-1.24.1 -src[1]=dialog-1.1-20110302 +src[1]=dialog-1.3-20160209 src[2]=coreutils-8.23 OPT_CONFIG[0]="" OPT_CONFIG[1]="--bindir=/bin --enable-nls --with-ncursesw --enable-widec" --- plamo/00_base/old/hdsetup-20160408/PlamoBuild.hdsetup-6.1 2016-04-08 19:20:57.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-04-15 19:48:17.000000000 +0900 @@ -5,14 +5,25 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/busybox-1.24.1-config ftp://invisible-island.net/dialog/dialog-1.3-20160209.tgz http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz + http://ftp.gnu.org/gnu/gzip/gzip-1.6.tar.gz + http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz + http://tukaani.org/xz/xz-5.2.2.tar.xz + http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-tartime.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-txz.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.26-no-gets.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P3 +build=P4 src[0]=busybox-1.24.1 src[1]=dialog-1.3-20160209 src[2]=coreutils-8.23 +src[3]=gzip-1.6 +src[4]=bzip2-1.0.6 +src[5]=xz-5.2.2 +src[6]=tar-1.26 OPT_CONFIG[0]="" OPT_CONFIG[1]="--bindir=/bin --enable-nls --with-ncursesw --enable-widec" OPT_CONFIG[2]="--bindir=/bin --enable-no-install-program=install,chroot" @@ -27,9 +38,18 @@ OPT_CONFIG[2]+=",sync,tac,tail,tee,test,timeout,touch,tr,true,truncate,tsort" OPT_CONFIG[2]+=",tty,uname,unexpand,uniq,unlink,vdir,wc,whoami,yes --without-gmp" +OPT_CONFIG[3]="--bindir=/bin" +OPT_CONFIG[4]="" +OPT_CONFIG[5]="--bindir=/bin --disable-xzdec --disable-lzmadec + --disable-lzmainfo --disable-lzma-links --disable-scripts" +OPT_CONFIG[6]="--bindir=/bin" DOCS[0]="TODO LICENSE README AUTHORS INSTALL TODO_unicode" DOCS[1]="" DOCS[2]="" +DOCS[3]="" +DOCS[4]="" +DOCS[5]="" +DOCS[6]="" ###################################################################### fscheck() { @@ -224,6 +244,10 @@ done cd ${B[0]} cp -p $W/busybox-1.24.1-config .config + cd ${B[6]} + gunzip -c $W/tar-1.23-tartime.patch.gz | patch -Np1 -i - + gunzip -c $W/tar-1.23-txz.patch.gz | patch -Np1 -i - + gunzip -c $W/tar-1.26-no-gets.patch.gz | patch -Np1 -i - for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f [Mm]akefile ] ; then @@ -246,7 +270,9 @@ case $i in 0) make ;; 1) make LIBS="-lncursesw -lm -ldl -static" ;; - 2) make LIBS="-ldl -static" ;; + 4) make LDFLAGS="-ldl -static" ;; + 5) make LIBS="-ldl -all-static" ;; + *) make LIBS="-ldl -static" ;; esac fi done @@ -266,11 +292,15 @@ if [ -f [Mm]akefile ] ; then case $i in 0) make install CONFIG_PREFIX=$P ;; + 3) make install DESTDIR=$P bin_SCRIPTS=zcat ;; + 4) make install PREFIX=$P ;; *) make install DESTDIR=$P ;; esac fi done - rm $P/bin/{\[\[,ash,cttyhack,{e,f}grep,hush,install,test,unxz} + ln -f $P/bin/xz{,cat} + rm $P/bin/{\[\[,ash,cttyhack,{e,f}grep,hush,test,install,bunzip2} + rm $P/bin/{bz{ip2recover,{,e,f}grep,more,less,diff,cmp},unxz} install -d $P/sbin mv $P/bin $P/sbin/installer cp -r $W/sbin $P @@ -301,6 +331,12 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done cp -a $S/docs $docdir/$src + for i in busybox.pod BusyBox.txt busybox.{1,net} BusyBox.html ; do + cp -a $B/docs/$i $docdir/$src/docs + touch -t `date '+%m%d0900'` $docdir/$src/docs/$i + done + touch -t `date '+%m%d0900'` $docdir/$src/docs/busybox.net/BusyBox.html + touch -r $S/docs $docdir/$src/docs chown -R root.root $docdir/$src/docs mv $docdir/$src/{docs,{TODO,LICENSE,README,AUTHORS,INSTALL}.gz} $C mv $docdir/$src/{TODO_unicode,$myname}.gz $C --- plamo/00_base/old/hdsetup-20160415/PlamoBuild.hdsetup-6.1 2016-04-15 19:48:17.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-04-19 14:50:16.000000000 +0900 @@ -16,7 +16,7 @@ pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P4 +build=P5 src[0]=busybox-1.24.1 src[1]=dialog-1.3-20160209 src[2]=coreutils-8.23 @@ -31,8 +31,8 @@ OPT_CONFIG[2]+=",basename,cat,chcon,chgrp,chmod,chown,cksum,comm,cp,csplit" OPT_CONFIG[2]+=",cut,date,dd,dir,dircolors,dirname,du,echo,env,expand,expr" OPT_CONFIG[2]+=",factor,false,fmt,fold,groups,head,id,join,kill,link,ln" -OPT_CONFIG[2]+=",logname,ls,md5sum,mkdir,mkfifo,mknod,mktemp,mv,nl,nproc" -OPT_CONFIG[2]+=",nohup,numfmt,od,pathchk,pr,printenv,printf,ptx,pwd,readlink" +OPT_CONFIG[2]+=",logname,md5sum,mkdir,mkfifo,mknod,mktemp,mv,nl,nproc,nohup" +OPT_CONFIG[2]+=",numfmt,od,pathchk,pr,printenv,printf,ptx,pwd,readlink" OPT_CONFIG[2]+=",realpath,rm,rmdir,runcon,seq,sha1sum,sha224sum,sha256sum" OPT_CONFIG[2]+=",sha384sum,sha512sum,shred,shuf,sleep,sort,split,stat,sum" OPT_CONFIG[2]+=",sync,tac,tail,tee,test,timeout,touch,tr,true,truncate,tsort" --- plamo/00_base/old/util_linux-20160120/PlamoBuild.util_linux-2.27 2016-01-20 00:37:02.000000000 +0900 +++ plamo/00_base/util_linux/PlamoBuild.util_linux-2.27 2016-04-04 14:06:11.054028811 +0900 @@ -5,7 +5,7 @@ pkgbase=util_linux vers=2.27 arch=`uname -m` -build=P2 +build=P3 src=util-linux-$vers OPT_CONFIG="--localstatedir=/var --disable-setpriv --disable-last --disable-mesg --disable-chfn-chsh --disable-login --disable-nologin @@ -224,7 +224,7 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ + ./configure --prefix=/usr --libdir=/usr/$libdir \ --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi --- plamo/00_base/old/ncurses-20160324/PlamoBuild.ncurses-5.7 2016-03-24 11:50:31.000000000 +0900 +++ plamo/00_base/ncurses/PlamoBuild.ncurses-6.0 2016-04-03 20:06:48.000000000 +0900 @@ -1,16 +1,16 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/ncurses/ncurses-5.7.tar.gz - http://ftp.clfs.org/pub/clfs/conglomeration/ncurses/ncurses-5.7-branch_update-21.patch" +url="http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz" pkgbase=ncurses -vers=5.7 +vers=6.0 arch=`uname -m` -build=P5 +build=P3 src=$pkgbase-$vers OPT_CONFIG="--with-shared --without-debug --enable-widec --with-manpage-format=normal" -DOCS="ANNOUNCE AUTHORS INSTALL NEWS README README.emx TO-DO" +DOCS="README.MinGW README README.emx NEWS ANNOUNCE COPYING INSTALL + TO-DO AUTHORS" ###################################################################### fscheck() { @@ -203,7 +203,6 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done cd $B - patch -Np1 -i $W/ncurses-5.7-branch_update-21.patch if [ $arch == x86_64 ] ; then cp -p misc/run_tic.in{,.orig} sed -i 's@\@lib64@g' misc/run_tic.in @@ -217,7 +216,7 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ + ./configure --prefix=/usr --libdir=/$libdir \ --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi @@ -247,11 +246,17 @@ make install DESTDIR=$P fi done - ln -s ncursesw5-config $P/usr/bin/ncurses5-config - ln -s libncursesw.so.5.7 $P/usr/$libdir/libncurses.so.5 - ln -s libncurses.so.5 $P/usr/$libdir/libncurses.so - ln -s libncursesw.so.5.7 $P/usr/$libdir/libcurses.so.5 - ln -s libcurses.so.5 $P/usr/$libdir/libcurses.so + ln -s ncursesw6-config $P/usr/bin/ncurses6-config + ln -s libncursesw.so.$vers $P/$libdir/libncurses.so.6 + ln -s libncurses.so.6 $P/$libdir/libncurses.so + ln -s libncursesw.so.$vers $P/$libdir/libcurses.so.6 + ln -s libcurses.so.6 $P/$libdir/libcurses.so + ln -s libncursesw.so.$vers $P/$libdir/libncursesw.so.5 + ln -s libpanelw.so.$vers $P/$libdir/libpanelw.so.5 + ln -s libmenuw.so.$vers $P/$libdir/libmenuw.so.5 + ln -s libformw.so.$vers $P/$libdir/libformw.so.5 + install -d $P/usr/$libdir + ln -s /usr/share/terminfo $P/usr/$libdir touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -276,6 +281,7 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find $libdir | 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 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/{tabset,terminfo} --- plamo/00_base/old/hdsetup-20160419/PlamoBuild.hdsetup-6.1 2016-04-19 14:50:16.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-04-25 01:24:08.000000000 +0900 @@ -4,7 +4,7 @@ url="https://www.busybox.net/downloads/busybox-1.24.1.tar.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/busybox-1.24.1-config ftp://invisible-island.net/dialog/dialog-1.3-20160209.tgz - http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz + http://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz http://ftp.gnu.org/gnu/gzip/gzip-1.6.tar.gz http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz http://tukaani.org/xz/xz-5.2.2.tar.xz @@ -16,10 +16,10 @@ pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P5 +build=P6 src[0]=busybox-1.24.1 src[1]=dialog-1.3-20160209 -src[2]=coreutils-8.23 +src[2]=coreutils-8.25 src[3]=gzip-1.6 src[4]=bzip2-1.0.6 src[5]=xz-5.2.2 @@ -28,9 +28,9 @@ OPT_CONFIG[1]="--bindir=/bin --enable-nls --with-ncursesw --enable-widec" OPT_CONFIG[2]="--bindir=/bin --enable-no-install-program=install,chroot" OPT_CONFIG[2]+=",hostid,nice,who,users,pinky,uptime,stty,df,stdbuf,[,base64" -OPT_CONFIG[2]+=",basename,cat,chcon,chgrp,chmod,chown,cksum,comm,cp,csplit" -OPT_CONFIG[2]+=",cut,date,dd,dir,dircolors,dirname,du,echo,env,expand,expr" -OPT_CONFIG[2]+=",factor,false,fmt,fold,groups,head,id,join,kill,link,ln" +OPT_CONFIG[2]+=",base32,basename,cat,chcon,chgrp,chmod,chown,cksum,comm,cp" +OPT_CONFIG[2]+=",csplit,cut,date,dd,dir,dircolors,dirname,du,echo,env,expand" +OPT_CONFIG[2]+=",expr,factor,false,fmt,fold,groups,head,id,join,kill,link,ln" OPT_CONFIG[2]+=",logname,md5sum,mkdir,mkfifo,mknod,mktemp,mv,nl,nproc,nohup" OPT_CONFIG[2]+=",numfmt,od,pathchk,pr,printenv,printf,ptx,pwd,readlink" OPT_CONFIG[2]+=",realpath,rm,rmdir,runcon,seq,sha1sum,sha224sum,sha256sum" @@ -226,13 +226,25 @@ 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 + for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + if wget --spider $i.$sig ; then wget $i.$sig ; break ; fi + done + if [ -f ${i##*/}.$sig ] ; then + case $sig in + asc|sig|sign) gpg2 --verify ${i##*/}.$sig ;; + md5|sha1|sha256) ${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##*/} ;; - tgz) tar xvpzf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; bz2) tar xvpjf ${i##*/} ;; xz) tar xvpJf ${i##*/} ;; esac --- plamo/00_base/old/openssl-20160115/PlamoBuild.openssl-1.0.1q 2016-01-15 09:54:27.000000000 +0900 +++ plamo/00_base/openssl/PlamoBuild.openssl-1.0.1s 2016-03-15 08:55:17.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://www.openssl.org/source/openssl-1.0.1q.tar.gz +url="http://www.openssl.org/source/openssl-1.0.1s.tar.gz https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/openssl/openssl-1.0.1p-fix_parallel_build-1.patch https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/openssl/mkcabundle.pl" pkgbase=openssl -vers=1.0.1q +vers=1.0.1s arch=`uname -m` -build=P3 +build=P2 src=$pkgbase-$vers OPT_CONFIG="" DOCS="ACKNOWLEDGMENTS CHANGES CHANGES.SSLeay CONTRIBUTING FAQ INSTALL @@ -193,7 +193,7 @@ if [ ! -f ${i##*/} ] ; then wget $i ; fi done if [ ! -f ca-bundle.crt ] ; then - ./mkcabundle.pl > ca-bundle.crt + ./mkcabundle.pl > ca-bundle.crt fi for i in $url ; do case ${i##*.} in @@ -229,12 +229,13 @@ armv7l) sys=armv4 ;; esac ./Configure linux-$sys --prefix=/usr --openssldir=/etc/ssl \ - zlib-dynamic shared + shared zlib-dynamic enable-ssl2 fi if [ $opt_build -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then + make depend make fi done --- plamo/00_base/old/dhcp-20160125/PlamoBuild.dhcp-4.3.3 2016-01-25 13:06:29.000000000 +0900 +++ plamo/00_base/dhcp/PlamoBuild.dhcp-4.3.3 2016-04-07 15:53:35.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=dhcp vers=4.3.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers OPT_CONFIG="--sysconfdir=/etc" DOCS="LICENSE README RELNOTES" @@ -201,7 +201,7 @@ done cd $B cp -p client/scripts/linux{,.orig} - cat <<- "EOF" > client/scripts/linux + cat <<- "EOF" | patch client/scripts/linux 24a25,26 > PATH=/sbin/:$PATH > --- plamo/00_base/old/glibc-20160110/PlamoBuild.glibc-2.20 2016-01-10 07:44:27.000000000 +0900 +++ plamo/00_base/glibc/PlamoBuild.glibc-2.20 2016-03-14 16:38:54.000000000 +0900 @@ -6,11 +6,15 @@ http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-do_ftell_wide-memleak.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-getifaddrs_internal-segfault.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-linux-3.16-additions.patch - http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz" + http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-7547.patch + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8776.patch + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8778.patch + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8779.patch" pkgbase=glibc vers=2.20 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS @@ -213,7 +217,11 @@ patch -Np1 -i $W/glibc-2.20-do_ftell_wide-memleak.patch patch -Np1 -i $W/glibc-2.20-getifaddrs_internal-segfault.patch patch -Np1 -i $W/glibc-2.20-linux-3.16-additions.patch - patch -Np1 -i $W/glibc-c-utf8-locale.patch.gz + gunzip -c $W/glibc-c-utf8-locale.patch.gz | patch -Np1 -i - + patch -Np1 -i $W/CVE-2015-7547.patch + patch -Np1 -i $W/CVE-2015-8776.patch + patch -Np1 -i $W/CVE-2015-8778.patch + patch -Np1 -i $W/CVE-2015-8779.patch cp -p localedata/Makefile{,.orig} cat <<- "EOF" | patch localedata/Makefile 235a236 --- plamo/00_base/old/kmod-20160115/PlamoBuild.kmod-13 2016-01-15 17:31:05.000000000 +0900 +++ plamo/00_base/kmod/PlamoBuild.kmod-22 2016-01-25 18:19:43.000000000 +0900 @@ -1,14 +1,14 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-13.tar.bz2" +url="https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-22.tar.xz" pkgbase=kmod -vers=13 +vers=22 arch=`uname -m` -build=P4 +build=P3 src=$pkgbase-$vers -OPT_CONFIG="--bindir=/bin --sysconfdir=/etc --disable-shared" -DOCS="README COPYING NEWS TODO" +OPT_CONFIG="--bindir=/bin --sysconfdir=/etc" +DOCS="NEWS COPYING TODO README" ###################################################################### fscheck() { @@ -192,6 +192,7 @@ tar) tar xvpf ${i##*/} ;; gz) tar xvpzf ${i##*/} ;; bz2) tar xvpjf ${i##*/} ;; + xz) tar xvpJf ${i##*/} ;; esac done fi @@ -239,20 +240,18 @@ fi done install -d $P/sbin - for i in insmod modprobe {rm,dep}mod ; do + for i in {dep,ins,rm}mod mod{probe,info} ; do ln -s /bin/kmod $P/sbin/$i done install -d $P/usr/bin - for i in lsmod modinfo ; do - ln -s /bin/kmod $P/usr/bin/$i - done + ln -s /bin/kmod $P/usr/bin/lsmod touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress install -d $P/etc/modprobe.d - cat <<- "EOF" > $P/etc/modprobe.d/plamo-default.conf + cat <<- "EOF" > $P/etc/modprobe.d/plamo-default.conf.new # sample modprobe.conf entries # # alias 定義をしておけば modprobe eth0 で必要なモジュールをロード可能 @@ -271,7 +270,7 @@ install usblp /bin/true EOF - touch -t `date '+%m%d0900'` $P/etc/modprobe.d{,/plamo-default.conf} + touch -t `date '+%m%d0900'` $P/etc/modprobe.d{,/plamo-default.conf.new} for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do @@ -290,12 +289,24 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert + cat <<- "EOF" >> $P/install/doinst.sh + + if [ -f etc/modprobe.d/plamo-default.conf ] ; then + rm etc/modprobe.d/plamo-default.conf.new + else + mv etc/modprobe.d/plamo-default.conf.new /tmp + mv /tmp/plamo-default.conf.new etc/modprobe.d/plamo-default.conf + fi + EOF + touch -t `date '+%m%d0900'` $P/install/doinst.sh tar cvpf $pkg.tar -C $P `cd $P ; find 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/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 `cd $P ; find usr/include | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/share/bash-completion/completions | tail -n+2` tar rvpf $pkg.tar -C $P etc/modprobe.d 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` --- plamo/00_base/old/openssh-20160314/PlamoBuild.openssh-7.2p1 2016-03-14 18:20:09.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.2p2 2016-03-17 19:06:05.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p1.tar.gz" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p2.tar.gz" pkgbase=openssh -vers=7.2p1 +vers=7.2p2 arch=`uname -m` build=P2 src=$pkgbase-$vers --- plamo/00_base/old/tcp_wrappers-20160121/PlamoBuild.tcp_wrappers-7.6.q 2016-01-21 20:23:46.000000000 +0900 +++ plamo/00_base/tcp_wrappers/PlamoBuild.tcp_wrappers-7.6.q 2016-04-03 08:59:16.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=tcp_wrappers vers=7.6.q arch=`uname -m` -build=P3 +build=P4 src=tcp_wrappers_7.6 OPT_CONFIG="" DOCS="README BLURB DISCLAIMER CHANGES README.IRIX README.NIS" @@ -316,7 +316,7 @@ done convert install -d $P/install - cat <<- "EOF" > $P/install/doinst.sh + cat <<- "EOF" >> $P/install/doinst.sh hosts_config() { if [ -f etc/hosts.$1 ] ; then rm etc/hosts.$1.dist --- plamo/00_base/old/timezone-20160126/PlamoBuild.timezone-2015g 2016-01-26 13:27:41.000000000 +0900 +++ plamo/00_base/timezone/PlamoBuild.timezone-2015g 2016-03-23 17:56:42.000000000 +0900 @@ -3,7 +3,7 @@ ###################################################################### url="http://www.iana.org/time-zones/repository/releases/tzcode2015g.tar.gz http://www.iana.org/time-zones/repository/releases/tzdata2015g.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/plamo_timeconfig.tar.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/timezone/plamo_timeconfig.tar.gz" pkgbase=timezone vers=2015g arch=`uname -m` --- plamo/00_base/old/grub-20160314/PlamoBuild.grub-2.02~beta2 2016-03-14 17:15:16.000000000 +0900 +++ plamo/00_base/grub/PlamoBuild.grub-2.02~beta2 2016-03-20 22:40:55.000000000 +0900 @@ -3,7 +3,7 @@ ###################################################################### url="http://http.debian.net/debian/pool/main/g/grub2/grub2_2.02~beta2.orig.tar.xz http://http.debian.net/debian/pool/main/g/grub2/grub2_2.02~beta2-32.debian.tar.xz - http://plamo.linet.gr.jp/~tamuki/src/plamo_grubconfig.tar.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/grub/plamo_grubconfig.tar.gz" pkgbase=grub vers=2.02~beta2 arch=`uname -m` --- plamo/00_base/old/coreutils-20160105/PlamoBuild.coreutils-8.23 2016-01-05 21:08:59.000000000 +0900 +++ plamo/00_base/coreutils/PlamoBuild.coreutils-8.25 2016-04-25 01:21:52.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz" +url="http://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz" pkgbase=coreutils -vers=8.23 +vers=8.25 arch=`uname -m` -build=P3 +build=P2 src=$pkgbase-$vers OPT_CONFIG="--enable-install-program=arch --enable-no-install-program=uptime,kill --without-gmp" -DOCS="ChangeLog-2005 COPYING INSTALL ABOUT-NLS ChangeLog-2007 NEWS - README ChangeLog-2006 ChangeLog-2008 THANKS-to-translators - ChangeLog AUTHORS TODO THANKS" +DOCS="COPYING TODO INSTALL THANKS ChangeLog-2006 ChangeLog-2008 NEWS + ChangeLog ChangeLog-2007 README ChangeLog-2005 AUTHORS ABOUT-NLS + THANKS-to-translators" ###################################################################### fscheck() { @@ -188,12 +188,25 @@ 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 + for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + if wget --spider $i.$sig ; then wget $i.$sig ; break ; fi + done + if [ -f ${i##*/}.$sig ] ; then + case $sig in + asc|sig|sign) gpg2 --verify ${i##*/}.$sig ;; + md5|sha1|sha256) ${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##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; bz2) tar xvpjf ${i##*/} ;; xz) tar xvpJf ${i##*/} ;; esac @@ -208,6 +221,9 @@ sed 's@EXTRA_LOCALE_CATEGORIES@#&@g' po/Makevars.orig > po/Makevars cp -p src/copy.c{,.orig} sed 's@FASTREAD@NONE@g' src/copy.c.orig > src/copy.c + if [ `id -u` -eq 0 ] ; then + export FORCE_UNSAFE_CONFIGURE=1 + fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/00_base/old/findutils-20151228/PlamoBuild.findutils-4.4.2 2015-12-28 16:20:45.000000000 +0900 +++ plamo/00_base/findutils/PlamoBuild.findutils-4.6.0 2016-01-25 17:08:38.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/pub/gnu/findutils/findutils-4.4.2.tar.gz" +url="http://ftp.gnu.org/pub/gnu/findutils/findutils-4.6.0.tar.gz" pkgbase=findutils -vers=4.4.2 +vers=4.6.0 arch=`uname -m` -build=P5 +build=P2 src=$pkgbase-$vers OPT_CONFIG="--localstatedir=/var" -DOCS="README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS THANKS - TODO tool-versions.txt README-hacking" +DOCS="ABOUT-NLS README AUTHORS README-hacking NEWS THANKS INSTALL COPYING + ChangeLog tool-versions.txt ChangeLog-2013 README-alpha TODO" ###################################################################### fscheck() { --- plamo/00_base/old/nvi-20160326/PlamoBuild.nvi-1.79 2016-03-26 22:31:27.703769823 +0900 +++ plamo/00_base/nvi/PlamoBuild.nvi-1.79 2016-04-09 21:07:22.000000000 +0900 @@ -8,7 +8,7 @@ pkgbase=nvi vers=1.79 arch=`uname -m` -build=P6 +build=P7 src=$pkgbase-$vers OPT_CONFIG="--enable-multibyte=euc-jp" DOCS="LAYOUT README FAQ --- plamo/00_base/old/openssh-20160317/PlamoBuild.openssh-7.2p2 2016-03-17 19:06:05.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.2p2 2016-06-15 21:03:13.000000000 +0900 @@ -1,15 +1,16 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p2.tar.gz" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p2.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/openssh/CVE-2015-8325.patch" pkgbase=openssh vers=7.2p2 arch=`uname -m` -build=P2 +build=P4 src=$pkgbase-$vers -OPT_CONFIG="--sysconfdir=/etc/ssh --localstatedir=/var --with-pam - --with-privsep-user=sshd --with-privsep-path=/var/lib/sshd - --with-md5-passwords" +patchfiles="CVE-2015-8325.patch" +OPT_CONFIG="--sysconfdir=/etc/ssh --with-pam --with-privsep-user=sshd + --with-privsep-path=/var/lib/sshd --with-md5-passwords" DOCS="CREDITS INSTALL LICENCE OVERVIEW PROTOCOL PROTOCOL.agent `echo PROTOCOL.{certkeys,chacha20poly1305,key,krl,mux}` README `echo README.{dns,platform,privsep,tun}` TODO ChangeLog" @@ -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,10 @@ 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 patch -Np1 -i $W/$j ; done + done cd $B cp -p sshd_config{,.orig} sed -i -e 's@^#\(UsePAM\) no$@\1 yes@g' \ @@ -220,8 +247,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 @@ -286,11 +313,11 @@ cat <<- "EOF" >> $P/install/doinst.sh ssh_config() { + mv etc/ssh/${1}_config.new /tmp if [ -f etc/ssh/${1}_config ] ; then - rm etc/${1}_config.new + mv /tmp/${1}_config.new etc/ssh/${1}_config.dist else - mv etc/${1}_config.new /tmp - mv /tmp/${1}_config.new etc/${1}_config + mv /tmp/${1}_config.new etc/ssh/${1}_config fi } --- plamo/00_base/old/openssl-20160315/PlamoBuild.openssl-1.0.1s 2016-03-15 08:55:17.000000000 +0900 +++ plamo/00_base/openssl/PlamoBuild.openssl-1.0.2g 2016-04-30 09:50:12.000000000 +0900 @@ -1,13 +1,12 @@ #!/bin/sh ###################################################################### -url="http://www.openssl.org/source/openssl-1.0.1s.tar.gz - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/openssl/openssl-1.0.1p-fix_parallel_build-1.patch - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/openssl/mkcabundle.pl" +url="http://www.openssl.org/source/openssl-1.0.2g.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/openssl/mkcabundle.pl" pkgbase=openssl -vers=1.0.1s +vers=1.0.2g arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers OPT_CONFIG="" DOCS="ACKNOWLEDGMENTS CHANGES CHANGES.SSLeay CONTRIBUTING FAQ INSTALL @@ -190,16 +189,39 @@ 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 if [ ! -f ca-bundle.crt ] ; then + chmod +x mkcabundle.pl ./mkcabundle.pl > ca-bundle.crt fi 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 @@ -207,8 +229,6 @@ 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 - cd $B - patch -Np1 -i $W/openssl-1.0.1p-fix_parallel_build-1.patch for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -218,8 +238,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 --- plamo/00_base/old/groff-20160320/PlamoBuild.groff-1.18.1.1 2016-03-20 22:37:30.000000000 +0900 +++ plamo/00_base/groff/PlamoBuild.groff-1.18.1.1 2016-04-05 13:51:39.000000000 +0900 @@ -8,7 +8,7 @@ pkgbase=groff vers=1.18.1.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="--enable-multibyte" DOCS="BUG-REPORT COPYING ChangeLog FDL INSTALL* MANIFEST MORE.STUFF @@ -247,6 +247,8 @@ make install prefix=$P/usr fi done + ln -s tbl $P/usr/bin/gtbl + ln -s eqn $P/usr/bin/geqn gdocdir=$docdir/groff/1.18.1 dt=`LANG=C date '+%a %b %e 09:00:00 %Y'` sed -i "s/\(CreationDate:\).*$/\1 $dt/g" $gdocdir/{examples/,}*.ps --- plamo/00_base/old/openssh-20160615/PlamoBuild.openssh-7.2p2 2016-06-15 21:03:13.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.2p2 2016-07-10 11:56:23.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=openssh vers=7.2p2 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="CVE-2015-8325.patch" OPT_CONFIG="--sysconfdir=/etc/ssh --with-pam --with-privsep-user=sshd @@ -228,7 +228,14 @@ done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - for j in ${patchfiles[$i]} ; do patch -Np1 -i $W/$j ; done + 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 cp -p sshd_config{,.orig} @@ -292,6 +299,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_bindir $P/usr/libexec for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do --- plamo/00_base/old/findutils-20160125/PlamoBuild.findutils-4.6.0 2016-01-25 17:08:38.000000000 +0900 +++ plamo/00_base/findutils/PlamoBuild.findutils-4.6.0 2016-07-10 11:04:09.000000000 +0900 @@ -1,12 +1,13 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/pub/gnu/findutils/findutils-4.6.0.tar.gz" +url="http://ftp.gnu.org/gnu/findutils/findutils-4.6.0.tar.gz" pkgbase=findutils vers=4.6.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--localstatedir=/var" DOCS="ABOUT-NLS README AUTHORS README-hacking NEWS THANKS INSTALL COPYING ChangeLog tool-versions.txt ChangeLog-2013 README-alpha TODO" @@ -186,13 +187,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 @@ -202,6 +225,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -209,8 +243,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 @@ -244,6 +278,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_bindir $P/usr/libexec for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do --- plamo/00_base/old/readline-20160116/PlamoBuild.readline-6.2.4 2016-01-16 01:45:35.000000000 +0900 +++ plamo/00_base/readline/PlamoBuild.readline-6.3.8 2016-04-03 13:32:45.000000000 +0900 @@ -1,17 +1,21 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz - http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-001 - http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-002 - http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-003 - http://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-004" +url="http://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-001 + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-002 + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-003 + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-004 + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-005 + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-006 + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-007 + http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-008" pkgbase=readline -vers=6.2 +vers=6.3 arch=`uname -m` build=P2 src=$pkgbase-$vers -OPT_CONFIG="" +OPT_CONFIG="--with-curses" DOCS="COPYING README MANIFEST INSTALL CHANGELOG CHANGES NEWS USAGE" ###################################################################### @@ -204,10 +208,14 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done cd $B - patch -Np0 -i $W/readline62-001 - patch -Np0 -i $W/readline62-002 - patch -Np0 -i $W/readline62-003 - patch -Np0 -i $W/readline62-004 + patch -Np0 -i $W/readline63-001 + patch -Np0 -i $W/readline63-002 + patch -Np0 -i $W/readline63-003 + patch -Np0 -i $W/readline63-004 + patch -Np0 -i $W/readline63-005 + patch -Np0 -i $W/readline63-006 + patch -Np0 -i $W/readline63-007 + patch -Np0 -i $W/readline63-008 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -227,7 +235,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make + make SHLIB_LIBS=-lncursesw fi done fi --- plamo/00_base/old/sysvinit-20160314/PlamoBuild.sysvinit-2.88dsf 2016-03-14 19:15:52.000000000 +0900 +++ plamo/00_base/sysvinit/PlamoBuild.sysvinit-2.88dsf 2016-03-23 17:48:11.000000000 +0900 @@ -2,7 +2,7 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-test/for-5.0/plamo-rc-scripts/plamo-rc-scripts-20160208.tgz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/sysvinit/plamo-rc-scripts-20160208.tgz" pkgbase=sysvinit vers=2.88dsf arch=`uname -m` --- plamo/00_base/old/hdsetup-20160425/PlamoBuild.hdsetup-6.1 2016-04-25 01:24:08.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-04-30 09:35:53.000000000 +0900 @@ -16,7 +16,7 @@ pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P6 +build=P7 src[0]=busybox-1.24.1 src[1]=dialog-1.3-20160209 src[2]=coreutils-8.25 @@ -227,14 +227,22 @@ if [ $opt_download -eq 1 ] ; then for i in $url ; do if [ ! -f ${i##*/} ] ; then - wget $i - for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + 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 ;; - md5|sha1|sha256) ${sig}sum -c ${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 @@ -245,8 +253,8 @@ case ${i##*.} in tar) tar xvpf ${i##*/} ;; gz|tgz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -269,8 +277,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 --- plamo/00_base/old/timezone-20160323/PlamoBuild.timezone-2015g 2016-03-23 17:56:42.000000000 +0900 +++ plamo/00_base/timezone/PlamoBuild.timezone-2015g 2016-06-09 08:15:41.000000000 +0900 @@ -7,7 +7,7 @@ pkgbase=timezone vers=2015g arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers OPT_CONFIG="" DOCS="CONTRIBUTING NEWS README Theory tz-art.htm tz-link.htm" @@ -187,13 +187,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 false && for i in $url ; do case ${i##*.} in tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf e ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done mkdir timezone-2015g @@ -214,8 +236,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 @@ -275,6 +297,7 @@ done touch -t `date '+%m%d0900'` $docdir/$src convert + prune_symlink $P/usr/share tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/zoneinfo{,-posix,-leaps} @@ -283,6 +306,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/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 read -p "Do you want to keep work files? [y/N] " ans --- plamo/00_base/old/openssl-20160430/PlamoBuild.openssl-1.0.2g 2016-04-30 09:50:12.000000000 +0900 +++ plamo/00_base/openssl/PlamoBuild.openssl-1.0.2h 2016-07-10 12:22:47.000000000 +0900 @@ -1,13 +1,14 @@ #!/bin/sh ###################################################################### -url="http://www.openssl.org/source/openssl-1.0.2g.tar.gz +url="http://www.openssl.org/source/openssl-1.0.2h.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/openssl/mkcabundle.pl" pkgbase=openssl -vers=1.0.2g +vers=1.0.2h arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="ACKNOWLEDGMENTS CHANGES CHANGES.SSLeay CONTRIBUTING FAQ INSTALL INSTALL.DJGPP INSTALL.MacOS INSTALL.NW INSTALL.OS2 INSTALL.VMS @@ -231,6 +232,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi --- plamo/00_base/old/gawk-20151228/PlamoBuild.gawk-4.1.3 2015-12-28 17:06:12.000000000 +0900 +++ plamo/00_base/gawk/PlamoBuild.gawk-4.1.3 2016-07-10 11:19:26.000000000 +0900 @@ -5,8 +5,9 @@ pkgbase=gawk vers=4.1.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="NEWS POSIX.STD COPYING README AUTHORS INSTALL `echo README_d/README.{VMS,mpfr,os2,bootstrap,gcc-3,zos,macosx}` @@ -189,14 +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##*/} ;; - xz) tar xvpJf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -206,6 +228,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -213,8 +246,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 @@ -248,8 +281,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_bindir $P/usr/libexec/awk strip_libdir $P/usr/$libdir/gawk - touch -t `date '+%m%d0900'` $P/usr/$libdir/gawk + touch -t `date '+%m%d0900'` $P/usr/libexec/awk $P/usr/$libdir/gawk for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do --- plamo/00_base/old/hdsetup-20160430/PlamoBuild.hdsetup-6.1 2016-04-30 09:35:53.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-09-11 12:29:12.000000000 +0900 @@ -16,7 +16,7 @@ pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P7 +build=P8 src[0]=busybox-1.24.1 src[1]=dialog-1.3-20160209 src[2]=coreutils-8.25 @@ -24,6 +24,13 @@ src[4]=bzip2-1.0.6 src[5]=xz-5.2.2 src[6]=tar-1.26 +patchfiles[0]="" +patchfiles[1]="" +patchfiles[2]="" +patchfiles[3]="" +patchfiles[4]="" +patchfiles[5]="" +patchfiles[6]="`echo tar-{1.23-{tartime,txz},1.26-no-gets}.patch.gz`" OPT_CONFIG[0]="" OPT_CONFIG[1]="--bindir=/bin --enable-nls --with-ncursesw --enable-widec" OPT_CONFIG[2]="--bindir=/bin --enable-no-install-program=install,chroot" @@ -262,12 +269,19 @@ 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[0]} cp -p $W/busybox-1.24.1-config .config - cd ${B[6]} - gunzip -c $W/tar-1.23-tartime.patch.gz | patch -Np1 -i - - gunzip -c $W/tar-1.23-txz.patch.gz | patch -Np1 -i - - gunzip -c $W/tar-1.26-no-gets.patch.gz | patch -Np1 -i - for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f [Mm]akefile ] ; then --- plamo/00_base/old/hdsetup-20160911/PlamoBuild.hdsetup-6.1 2016-09-11 12:29:12.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-11-11 06:25:05.000000000 +0900 @@ -16,7 +16,7 @@ pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P8 +build=P9 src[0]=busybox-1.24.1 src[1]=dialog-1.3-20160209 src[2]=coreutils-8.25 @@ -50,13 +50,9 @@ OPT_CONFIG[5]="--bindir=/bin --disable-xzdec --disable-lzmadec --disable-lzmainfo --disable-lzma-links --disable-scripts" OPT_CONFIG[6]="--bindir=/bin" -DOCS[0]="TODO LICENSE README AUTHORS INSTALL TODO_unicode" -DOCS[1]="" -DOCS[2]="" -DOCS[3]="" -DOCS[4]="" -DOCS[5]="" -DOCS[6]="" +DOCS="TODO LICENSE README AUTHORS INSTALL TODO_unicode" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -358,9 +354,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/dialog-20160113/PlamoBuild.dialog-1.1 2016-01-13 22:18:40.000000000 +0900 +++ plamo/00_base/dialog/PlamoBuild.dialog-1.3_20160209 2016-04-06 19:28:31.000000000 +0900 @@ -1,14 +1,15 @@ #!/bin/sh ###################################################################### -url="http://invisible-mirror.net/archives/dialog/dialog-1.1-20110302.tgz" +url="ftp://invisible-island.net/dialog/dialog-1.3-20160209.tgz" pkgbase=dialog -vers=1.1_20110302 +vers=1.3_20160209 arch=`uname -m` build=P2 -src=$pkgbase-1.1-20110302 -OPT_CONFIG="--bindir=/bin --enable-nls --with-ncursesw --enable-widec" -DOCS="README COPYING CHANGES" +src=$pkgbase-1.3-20160209 +OPT_CONFIG="--bindir=/bin --enable-nls --with-shared --with-ncursesw + --enable-widec" +DOCS="CHANGES README COPYING" ###################################################################### fscheck() { @@ -209,7 +210,7 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ + ./configure --prefix=/usr --libdir=/$libdir \ --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi @@ -263,9 +264,11 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find $libdir | tail -n+2` 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/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 --- plamo/00_base/old/util_linux-20160404/PlamoBuild.util_linux-2.27 2016-04-04 14:06:11.054028811 +0900 +++ plamo/00_base/util_linux/PlamoBuild.util_linux-2.28 2016-04-27 07:35:14.000000000 +0900 @@ -1,11 +1,11 @@ #!/bin/sh ###################################################################### -url="http://www.kernel.org/pub/linux/utils/util-linux/v2.27/util-linux-2.27.tar.xz" +url="http://www.kernel.org/pub/linux/utils/util-linux/v2.28/util-linux-2.28.tar.xz" pkgbase=util_linux -vers=2.27 +vers=2.28 arch=`uname -m` -build=P3 +build=P1 src=util-linux-$vers OPT_CONFIG="--localstatedir=/var --disable-setpriv --disable-last --disable-mesg --disable-chfn-chsh --disable-login --disable-nologin @@ -188,12 +188,25 @@ 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 + for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + if wget --spider $i.$sig ; then wget $i.$sig ; break ; fi + done + if [ -f ${i##*/}.$sig ] ; then + case $sig in + asc|sig|sign) gpg2 --verify ${i##*/}.$sig ;; + md5|sha1|sha256) ${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##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; bz2) tar xvpjf ${i##*/} ;; xz) tar xvpJf ${i##*/} ;; esac @@ -203,18 +216,6 @@ 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 - cd $B - cp -p Makefile.in{,.orig} - cat <<- "EOF" | patch Makefile.in - 4668c4668 - < @BUILD_FDISK_TRUE@ $(am__append_337) $(am__append_339) - --- - > @BUILD_FDISK_TRUE@ $(am__append_337) $(am__append_339) $(am__append_357) - 4685c4685 - < @BUILD_SFDISK_TRUE@ $(am__append_344) $(am__append_346) - --- - > @BUILD_SFDISK_TRUE@ $(am__append_344) $(am__append_346) $(am__append_357) - EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -224,7 +225,7 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir=/usr/$libdir \ + ./configure --prefix=/usr --libdir=/$libdir \ --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi @@ -251,7 +252,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + make -i install DESTDIR=$P fi done mv $P/usr/bin/logger $P/bin @@ -285,19 +286,29 @@ cp -a $S/Documentation $docdir/$src chmod -R g-w $docdir/$src/Documentation chown -R root.root $docdir/$src/Documentation - mv $docdir/$src/{Documentation,{README,NEWS,README.licensing}.gz} $C - mv $docdir/$src/{AUTHORS,$myname}.gz $C - mv $C/{Documentation,{README,NEWS,README.licensing}.gz} $docdir/$src - mv $C/{AUTHORS,$myname}.gz $docdir/$src + mv $docdir/util-linux/getopt $docdir/$src + mv $docdir/$src/{Documentation,{README,NEWS}.gz,getopt} $C + mv $docdir/$src/{README.licensing,AUTHORS,$myname}.gz $C + mv $C/{Documentation,{README,NEWS}.gz,getopt} $docdir/$src + mv $C/{README.licensing,AUTHORS,$myname}.gz $docdir/$src touch -r $S $docdir/$src convert - 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 `cd $P ; find bin | tail -n+2` + tar cvpf $pkg.tar -C $P `cd $P ; find 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/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find $libdir | 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 `cd $P ; find usr/include -maxdepth 1 | tail -n+2` 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/bash-completion/completions | tail -n+2` tar rvpf $pkg.tar -C $P var/lib/hwclock + 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 --- plamo/00_base/old/btrfs_progs-20160116/PlamoBuild.btrfs_progs-v3.19.1 2016-01-16 16:09:58.000000000 +0900 +++ plamo/00_base/btrfs_progs/PlamoBuild.btrfs_progs-v4.3.1 2016-01-25 15:45:11.000000000 +0900 @@ -1,14 +1,14 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v3.19.1.tar.gz" +url="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.3.1.tar.gz" pkgbase=btrfs_progs -vers=v3.19.1 +vers=v4.3.1 arch=`uname -m` build=P2 src=btrfs-progs-$vers OPT_CONFIG="--bindir=/sbin" -DOCS="COPYING INSTALL" +DOCS="COPYING INSTALL README.md" ###################################################################### fscheck() { --- plamo/00_base/old/tar-20151218/PlamoBuild.tar-1.26 2015-12-18 13:00:55.000000000 +0900 +++ plamo/00_base/tar/PlamoBuild.tar-1.26 2016-04-08 19:38:20.000000000 +0900 @@ -2,9 +2,9 @@ ###################################################################### url="http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/tar-1.23-tartime.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/tar-1.23-txz.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/tar-1.26-no-gets.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-tartime.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-txz.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.26-no-gets.patch.gz" pkgbase=tar vers=1.26 arch=`uname -m` --- plamo/00_base/old/kbd-20151222/PlamoBuild.kbd-1.15.5 2015-12-22 18:41:32.000000000 +0900 +++ plamo/00_base/kbd/PlamoBuild.kbd-1.15.5 2016-03-21 18:25:25.000000000 +0900 @@ -2,9 +2,9 @@ ###################################################################### url="ftp://ftp.altlinux.org/pub/people/legion/kbd/kbd-1.15.5.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/kbd-1.15-backspace-1.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/kbd-1.15-plamo-compat.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/kbd-1.15.5-revert_loadkeys_analize.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/kbd/kbd-1.15-backspace-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/kbd/kbd-1.15-plamo-compat.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/kbd/kbd-1.15.5-revert_loadkeys_analize.patch.gz" pkgbase=kbd vers=1.15.5 arch=`uname -m` --- plamo/00_base/old/e2fsprogs-20160115/PlamoBuild.e2fsprogs-1.42.12 2016-01-15 17:30:02.000000000 +0900 +++ plamo/00_base/e2fsprogs/PlamoBuild.e2fsprogs-1.43.3 2016-11-20 20:50:53.000000000 +0900 @@ -1,16 +1,19 @@ #!/bin/sh ###################################################################### -url="http://jaist.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.42.12.tar.gz" +url="http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-1.43.3.tar.gz" pkgbase=e2fsprogs -vers=1.42.12 +vers=1.43.3 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--enable-elf-shlibs --disable-libuuid --disable-libblkid - --disable-fsck --disable-uuidd --with-root-prefix=\"\"" -DOCS="RELEASE-NOTES SHLIBS SUBMITTING-PATCHES INSTALL INSTALL.elfbin - README COPYING ABOUT-NLS" + --disable-fsck --disable-uuidd --with-root-prefix=" +DOCS="INSTALL.elfbin RELEASE-NOTES README NOTICE ABOUT-NLS INSTALL + SUBMITTING-PATCHES" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -187,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 @@ -201,12 +226,23 @@ 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 if [ $arch == x86_64 ] ; then - cp -p configure configure.orig + cp -p configure{,.orig} sed '/^ root_libdir=/s@$libdir@/lib64@g' configure.orig > configure fi - cp -p misc/mke2fs.conf.in misc/mke2fs.conf.in.orig + cp -p misc/mke2fs.conf.in{,.orig} sed 's@,dir_index@@g' misc/mke2fs.conf.in.orig > misc/mke2fs.conf.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} @@ -217,8 +253,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 @@ -264,9 +300,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done @@ -278,7 +328,7 @@ tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | 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 usr/share/locale -name e2fsprogs.mo` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` tar rvpf $pkg.tar -C $P usr/share/et usr/share/ss tar rvpf $pkg.tar -C $P etc/mke2fs.conf tar rvpf $pkg.tar -C $P usr/share/info/libext2fs.info.gz --- plamo/00_base/old/ncurses-20160403/PlamoBuild.ncurses-6.0 2016-04-03 20:06:48.000000000 +0900 +++ plamo/00_base/ncurses/PlamoBuild.ncurses-6.0 2016-04-28 23:01:54.000000000 +0900 @@ -1,14 +1,15 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz" +url="http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/ncurses/ncurses-6.0-Charable.patch.gz" pkgbase=ncurses vers=6.0 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="--with-shared --without-debug --enable-widec - --with-manpage-format=normal" + --with-manpage-format=normal --disable-ext-colors" DOCS="README.MinGW README README.emx NEWS ANNOUNCE COPYING INSTALL TO-DO AUTHORS" ###################################################################### @@ -188,13 +189,27 @@ 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 + for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + if wget --spider $i.$sig ; then wget $i.$sig ; break ; fi + done + if [ -f ${i##*/}.$sig ] ; then + case $sig in + asc|sig|sign) gpg2 --verify ${i##*/}.$sig ;; + md5|sha1|sha256) ${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##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; bz2) tar xvpjf ${i##*/} ;; + xz) tar xvpJf ${i##*/} ;; esac done fi @@ -203,6 +218,7 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done cd $B + gunzip -c $W/ncurses-6.0-Charable.patch.gz | patch -Np1 -i - if [ $arch == x86_64 ] ; then cp -p misc/run_tic.in{,.orig} sed -i 's@\@lib64@g' misc/run_tic.in --- plamo/00_base/old/glibc-20160314/PlamoBuild.glibc-2.20 2016-03-14 16:38:54.000000000 +0900 +++ plamo/00_base/glibc/PlamoBuild.glibc-2.20 2016-06-07 07:52:10.000000000 +0900 @@ -7,14 +7,14 @@ http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-getifaddrs_internal-segfault.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-linux-3.16-additions.patch http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-7547.patch - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8776.patch - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8778.patch - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8779.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-7547.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8776.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8778.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8779.patch" pkgbase=glibc vers=2.20 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS @@ -196,14 +196,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##*/} ;; - xz) tar xvpJf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -252,8 +273,8 @@ EOF esac if [ -x ${S2[$i]}/configure ] ; then - ${S2[$i]}/configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ - --infodir='${prefix}'/share/info \ + ${S2[$i]}/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ --libexecdir=/usr/$libdir/glibc \ --build=$arch-pc-linux --target=$arch-pc-linux @@ -367,10 +388,10 @@ EOF cat <<- "EOF" >> $P/install/doinst.sh glibc_config() { + mv /etc/$1.conf.new /tmp if [ -f /etc/$1.conf ] ; then - rm /etc/$1.conf.new + mv /tmp/$1.conf.new /etc/$1.conf.dist else - mv /etc/$1.conf.new /tmp mv /tmp/$1.conf.new /etc/$1.conf fi } --- plamo/00_base/old/openssh-20160710/PlamoBuild.openssh-7.2p2 2016-07-10 11:56:23.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.3p1 2016-08-02 20:10:01.000000000 +0900 @@ -1,14 +1,13 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p2.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/openssh/CVE-2015-8325.patch" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.3p1.tar.gz" pkgbase=openssh -vers=7.2p2 +vers=7.3p1 arch=`uname -m` -build=P5 +build=P2 src=$pkgbase-$vers -patchfiles="CVE-2015-8325.patch" +patchfiles="" OPT_CONFIG="--sysconfdir=/etc/ssh --with-pam --with-privsep-user=sshd --with-privsep-path=/var/lib/sshd --with-md5-passwords" DOCS="CREDITS INSTALL LICENCE OVERVIEW PROTOCOL PROTOCOL.agent --- plamo/00_base/old/nkf-20151225/PlamoBuild.nkf-2.1.2 2015-12-25 06:19:54.000000000 +0900 +++ plamo/00_base/nkf/PlamoBuild.nkf-2.1.2 2016-03-24 11:52:09.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=nkf vers=2.1.2 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="" DOCS="INSTALL INSTALL.j" @@ -289,7 +289,7 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P usr/lib/perl5/{auto/NKF,NKF.pm} + tar rvpf $pkg.tar -C $P usr/$libdir/perl5/{auto/NKF,NKF.pm} 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/ja_JP.eucJP/man1 | tail -n+2` --- plamo/00_base/old/hdsetup-20161111/PlamoBuild.hdsetup-6.1 2016-11-11 06:25:05.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.1 2016-11-24 09:04:24.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh ###################################################################### -url="https://www.busybox.net/downloads/busybox-1.24.1.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/busybox-1.24.1-config - ftp://invisible-island.net/dialog/dialog-1.3-20160209.tgz +url="https://www.busybox.net/downloads/busybox-1.25.1.tar.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/hdsetup/busybox-1.25.1-config + ftp://invisible-island.net/dialog/dialog-1.3-20160828.tgz http://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz - http://ftp.gnu.org/gnu/gzip/gzip-1.6.tar.gz + http://ftp.gnu.org/gnu/gzip/gzip-1.8.tar.gz http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz http://tukaani.org/xz/xz-5.2.2.tar.xz - http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-tartime.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-txz.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.26-no-gets.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" + http://ftp.gnu.org/gnu/tar/tar-1.26.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.23-tartime.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.23-txz.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.26-no-gets.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" pkgbase=hdsetup vers=6.1 arch=`uname -m` -build=P9 -src[0]=busybox-1.24.1 -src[1]=dialog-1.3-20160209 +build=P10 +src[0]=busybox-1.25.1 +src[1]=dialog-1.3-20160828 src[2]=coreutils-8.25 -src[3]=gzip-1.6 +src[3]=gzip-1.8 src[4]=bzip2-1.0.6 src[5]=xz-5.2.2 src[6]=tar-1.26 @@ -30,14 +30,14 @@ patchfiles[3]="" patchfiles[4]="" patchfiles[5]="" -patchfiles[6]="`echo tar-{1.23-{tartime,txz},1.26-no-gets}.patch.gz`" +patchfiles[6]="`echo tar-1.2{3-{tartime,txz},6-no-gets}.patch.gz`" OPT_CONFIG[0]="" OPT_CONFIG[1]="--bindir=/bin --enable-nls --with-ncursesw --enable-widec" -OPT_CONFIG[2]="--bindir=/bin --enable-no-install-program=install,chroot" -OPT_CONFIG[2]+=",hostid,nice,who,users,pinky,uptime,stty,df,stdbuf,[,base64" -OPT_CONFIG[2]+=",base32,basename,cat,chcon,chgrp,chmod,chown,cksum,comm,cp" -OPT_CONFIG[2]+=",csplit,cut,date,dd,dir,dircolors,dirname,du,echo,env,expand" -OPT_CONFIG[2]+=",expr,factor,false,fmt,fold,groups,head,id,join,kill,link,ln" +OPT_CONFIG[2]="--bindir=/bin --enable-no-install-program=chroot,hostid,nice" +OPT_CONFIG[2]+=",who,users,pinky,uptime,stty,df,stdbuf,[,base64,base32" +OPT_CONFIG[2]+=",basename,cat,chcon,chgrp,chmod,chown,cksum,comm,cp,csplit" +OPT_CONFIG[2]+=",cut,date,dd,dir,dircolors,dirname,du,echo,env,expand,expr" +OPT_CONFIG[2]+=",factor,false,fmt,fold,groups,head,id,join,kill,link,ln" OPT_CONFIG[2]+=",logname,md5sum,mkdir,mkfifo,mknod,mktemp,mv,nl,nproc,nohup" OPT_CONFIG[2]+=",numfmt,od,pathchk,pr,printenv,printf,ptx,pwd,readlink" OPT_CONFIG[2]+=",realpath,rm,rmdir,runcon,seq,sha1sum,sha224sum,sha256sum" @@ -50,7 +50,7 @@ OPT_CONFIG[5]="--bindir=/bin --disable-xzdec --disable-lzmadec --disable-lzmainfo --disable-lzma-links --disable-scripts" OPT_CONFIG[6]="--bindir=/bin" -DOCS="TODO LICENSE README AUTHORS INSTALL TODO_unicode" +DOCS="LICENSE INSTALL TODO AUTHORS README TODO_unicode" template=20161020 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -277,7 +277,7 @@ done done cd ${B[0]} - cp -p $W/busybox-1.24.1-config .config + cp -p $W/busybox-1.25.1-config .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f [Mm]akefile ] ; then @@ -382,10 +382,10 @@ touch -t `date '+%m%d0900'` $docdir/$src/docs/busybox.net/BusyBox.html touch -r $S/docs $docdir/$src/docs chown -R root.root $docdir/$src/docs - mv $docdir/$src/{docs,{TODO,LICENSE,README,AUTHORS,INSTALL}.gz} $C - mv $docdir/$src/{TODO_unicode,$myname}.gz $C - mv $C/{docs,{TODO,LICENSE,README,AUTHORS,INSTALL}.gz} $docdir/$src - mv $C/{TODO_unicode,$myname}.gz $docdir/$src + mv $docdir/$src/{docs,{INSTALL,TODO,AUTHORS,README}.gz} $C + mv $docdir/$src/{TODO_unicode,$myname,$spec}.gz $C + mv $C/{docs,{INSTALL,TODO,AUTHORS,README}.gz} $docdir/$src + mv $C/{TODO_unicode,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src convert tar cvpf $pkg.tar -C $P `cd $P ; find sbin -maxdepth 1 | tail -n+2` --- plamo/00_base/old/lsb_release-20160113/PlamoBuild.lsb_release-1.4 2016-01-13 12:45:21.000000000 +0900 +++ plamo/00_base/lsb_release/PlamoBuild.lsb_release-1.4 2016-03-14 17:42:03.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=lsb_release vers=1.4 arch=noarch -build=P5 +build=P6 src=lsb-release-$vers OPT_CONFIG="" DOCS="ChangeLog INSTALL README lsb-release.template lsb_release.examples" @@ -245,7 +245,7 @@ done install -d $P/etc cat <<- "EOF" > $P/etc/plamo-release - Plamo Linux release 6.0 + Plamo Linux release 6.1 EOF touch $W/i.et cd $W --- plamo/00_base/old/shadow-20160125/PlamoBuild.shadow-git_20130908 2016-01-25 12:43:14.000000000 +0900 +++ plamo/00_base/shadow/PlamoBuild.shadow-git_20130908 2016-03-23 16:42:56.000000000 +0900 @@ -2,7 +2,7 @@ ###################################################################### url="https://github.com/shadow-maint/shadow.git - http://plamo.linet.gr.jp/~tamuki/src/shadow-adduser-20160122" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/shadow/shadow-adduser-20160122" pkgbase=shadow vers=git_20130908 arch=`uname -m` --- plamo/00_base/old/openssl-20160710/PlamoBuild.openssl-1.0.2h 2016-07-10 12:22:47.000000000 +0900 +++ plamo/00_base/openssl/PlamoBuild.openssl-1.0.2j 2016-11-08 13:00:42.000000000 +0900 @@ -1,10 +1,10 @@ #!/bin/sh ###################################################################### -url="http://www.openssl.org/source/openssl-1.0.2h.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/openssl/mkcabundle.pl" +url="http://www.openssl.org/source/openssl-1.0.2j.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/openssl/mkcabundle.pl" pkgbase=openssl -vers=1.0.2h +vers=1.0.2j arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -14,6 +14,8 @@ INSTALL.DJGPP INSTALL.MacOS INSTALL.NW INSTALL.OS2 INSTALL.VMS INSTALL.W32 INSTALL.W64 INSTALL.WCE LICENSE NEWS PROBLEMS README README.ASN1 README.ENGINE" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -310,9 +312,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/ncurses-20160428/PlamoBuild.ncurses-6.0 2016-04-28 23:01:54.000000000 +0900 +++ plamo/00_base/ncurses/PlamoBuild.ncurses-6.0 2016-12-08 12:47:34.000000000 +0900 @@ -2,16 +2,19 @@ ###################################################################### url="http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/ncurses/ncurses-6.0-Charable.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/ncurses/ncurses-6.0-Charable.patch.gz" pkgbase=ncurses vers=6.0 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="ncurses-6.0-Charable.patch.gz" OPT_CONFIG="--with-shared --without-debug --enable-widec --with-manpage-format=normal --disable-ext-colors" DOCS="README.MinGW README README.emx NEWS ANNOUNCE COPYING INSTALL TO-DO AUTHORS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -190,14 +193,22 @@ if [ $opt_download -eq 1 ] ; then for i in $url ; do if [ ! -f ${i##*/} ] ; then - wget $i - for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + 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 ;; - md5|sha1|sha256) ${sig}sum -c ${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 @@ -208,8 +219,8 @@ case ${i##*.} in tar) tar xvpf ${i##*/} ;; gz|tgz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -217,8 +228,18 @@ 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/ncurses-6.0-Charable.patch.gz | patch -Np1 -i - if [ $arch == x86_64 ] ; then cp -p misc/run_tic.in{,.orig} sed -i 's@\@lib64@g' misc/run_tic.in @@ -232,8 +253,8 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir=/$libdir \ - --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir=/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -289,9 +310,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/bash-20160402/PlamoBuild.bash-4.2.53 2016-04-02 17:02:57.000000000 +0900 +++ plamo/00_base/bash/PlamoBuild.bash-4.3.30 2016-04-03 09:46:50.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/bash/bash-4.2.53.tar.gz" +url="http://ftp.gnu.org/gnu/bash/bash-4.3.30.tar.gz" pkgbase=bash -vers=4.2.53 +vers=4.3.30 arch=`uname -m` -build=P3 +build=P2 src[0]=$pkgbase-$vers src[1]=${src[0]} OPT_CONFIG[0]="--bindir=/bin --without-bash-malloc --with-installed-readline" OPT_CONFIG[1]="${OPT_CONFIG[0]} --enable-static-link" -DOCS[0]="ABOUT-NLS ChangeLog CHANGES COMPAT COPYING INSTALL NEWS NOTES - POSIX README RBASH AUTHORS Y2K" +DOCS[0]="ABOUT-NLS AUTHORS ChangeLog CHANGES COMPAT COPYING INSTALL + NEWS NOTES POSIX RBASH README Y2K" DOCS[1]="" ###################################################################### --- plamo/00_base/old/btrfs_progs-20160125/PlamoBuild.btrfs_progs-v4.3.1 2016-01-25 15:45:11.000000000 +0900 +++ plamo/00_base/btrfs_progs/PlamoBuild.btrfs_progs-v4.8.3 2016-11-21 00:25:25.000000000 +0900 @@ -1,14 +1,17 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.3.1.tar.gz" +url="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.8.3.tar.gz" pkgbase=btrfs_progs -vers=v4.3.1 +vers=v4.8.3 arch=`uname -m` -build=P2 +build=P1 src=btrfs-progs-$vers +patchfiles="" OPT_CONFIG="--bindir=/sbin" -DOCS="COPYING INSTALL README.md" +DOCS="CHANGES COPYING INSTALL README.md" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -185,13 +188,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 @@ -201,6 +226,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -208,8 +244,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 @@ -254,9 +290,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/bzip2-20151226/PlamoBuild.bzip2-1.0.6 2015-12-26 13:19:56.000000000 +0900 +++ plamo/00_base/bzip2/PlamoBuild.bzip2-1.0.6 2016-03-20 21:14:04.000000000 +0900 @@ -204,8 +204,6 @@ cp -p Makefile{,.orig} sed -i -e 's@\@$(LIBDIR)@g' -e 's@\@share/&@g' \ -e '/ln/s@$(PREFIX)/bin/@@' Makefile - cp -p Makefile-libbz2_so{,.orig} - sed -i 's@ -shared@ $(CFLAGS)&@g' Makefile-libbz2_so for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/00_base/old/coreutils-20160425/PlamoBuild.coreutils-8.25 2016-04-25 01:21:52.000000000 +0900 +++ plamo/00_base/coreutils/PlamoBuild.coreutils-8.25 2016-07-10 10:52:28.000000000 +0900 @@ -5,8 +5,9 @@ pkgbase=coreutils vers=8.25 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--enable-install-program=arch --enable-no-install-program=uptime,kill --without-gmp" DOCS="COPYING TODO INSTALL THANKS ChangeLog-2006 ChangeLog-2008 NEWS @@ -189,14 +190,22 @@ if [ $opt_download -eq 1 ] ; then for i in $url ; do if [ ! -f ${i##*/} ] ; then - wget $i - for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + 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 ;; - md5|sha1|sha256) ${sig}sum -c ${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 @@ -207,8 +216,8 @@ case ${i##*.} in tar) tar xvpf ${i##*/} ;; gz|tgz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -216,6 +225,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 cp -p po/Makevars{,.orig} sed 's@EXTRA_LOCALE_CATEGORIES@#&@g' po/Makevars.orig > po/Makevars @@ -233,8 +253,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 @@ -275,6 +295,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_libdir $P/usr/libexec/coreutils + touch -t `date '+%m%d0900'` $P/usr/libexec/coreutils for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do --- plamo/00_base/old/cracklib-20160105/PlamoBuild.cracklib-2.8.18 2016-01-05 23:45:57.000000000 +0900 +++ plamo/00_base/cracklib/PlamoBuild.cracklib-2.8.18 2016-03-20 21:22:29.000000000 +0900 @@ -3,7 +3,7 @@ ###################################################################### url="http://downloads.sourceforge.net/cracklib/cracklib-2.8.18.tar.gz http://downloads.sourceforge.net/cracklib/cracklib-words-20080507.gz - http://plamo.linet.gr.jp/~tamuki/src/cracklib-2.8.15-heimdal-1.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/cracklib/cracklib-2.8.15-heimdal-1.patch" pkgbase=cracklib vers=2.8.18 arch=`uname -m` --- plamo/00_base/old/dhcp-20160407/PlamoBuild.dhcp-4.3.3 2016-04-07 15:53:35.000000000 +0900 +++ plamo/00_base/dhcp/PlamoBuild.dhcp-4.3.3 2016-06-06 06:43:26.000000000 +0900 @@ -5,9 +5,9 @@ pkgbase=dhcp vers=4.3.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers -OPT_CONFIG="--sysconfdir=/etc" +OPT_CONFIG="" DOCS="LICENSE README RELNOTES" ###################################################################### @@ -185,13 +185,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 @@ -217,8 +239,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 @@ -276,10 +298,10 @@ install -d $P/install cat <<- "EOF" > $P/install/doinst.sh dhc_config() { + mv etc/$1.conf.example /tmp if [ -f etc/$1.conf ] ; then - rm etc/$1.conf.example + mv /tmp/$1.conf.example etc/$1.conf.dist else - mv etc/$1.conf.example /tmp mv /tmp/$1.conf.example etc/$1.conf fi } --- plamo/00_base/old/dialog-20160406/PlamoBuild.dialog-1.3_20160209 2016-04-06 19:28:31.000000000 +0900 +++ plamo/00_base/dialog/PlamoBuild.dialog-1.3_20160828 2016-11-20 12:36:09.000000000 +0900 @@ -1,15 +1,18 @@ #!/bin/sh ###################################################################### -url="ftp://invisible-island.net/dialog/dialog-1.3-20160209.tgz" +url="ftp://invisible-island.net/dialog/dialog-1.3-20160828.tgz" pkgbase=dialog -vers=1.3_20160209 +vers=1.3_20160828 arch=`uname -m` -build=P2 -src=$pkgbase-1.3-20160209 +build=P1 +src=$pkgbase-1.3-20160828 +patchfiles="" OPT_CONFIG="--bindir=/bin --enable-nls --with-shared --with-ncursesw --enable-widec" DOCS="CHANGES README COPYING" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -186,14 +189,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##*/} ;; - tgz) 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 +227,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f makefile ] ; then make clean fi @@ -210,8 +245,8 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir=/$libdir \ - --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir=/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -256,9 +291,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/dosfstools-20151229/PlamoBuild.dosfstools-3.0.26 2015-12-29 20:34:59.000000000 +0900 +++ plamo/00_base/dosfstools/PlamoBuild.dosfstools-3.0.26 2016-12-04 12:56:09.000000000 +0900 @@ -1,17 +1,20 @@ #!/bin/sh ###################################################################### -url="http://pkgs.fedoraproject.org/lookaside/pkgs/dosfstools/dosfstools-3.0.26.tar.xz/45012f5f56f2aae3afcd62120b9e5a08/dosfstools-3.0.26.tar.xz" +url="http://mirror.opencompute.org/onie/dosfstools-3.0.26.tar.xz" pkgbase=dosfstools vers=3.0.26 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="`echo doc/{TODO.dosfstools-2.x,README.dosfsck,ChangeLog.dosfstools-2.x}` `echo doc/{ChangeLog.mkdosfs,ChangeLog.dosfsck,README.mkdosfs}` `echo doc/{ANNOUNCE.mkdosfs,README.dosfstools-2.x}` COPYING VERSION ChangeLog" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -188,14 +191,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##*/} ;; - xz) tar xvpJf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -205,6 +229,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -212,8 +247,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 @@ -247,6 +282,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + gzip_dir $mandir/de/man8 for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do @@ -258,9 +294,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/dump-20160320/PlamoBuild.dump-0.4b44 2016-03-20 21:34:01.000000000 +0900 +++ plamo/00_base/dump/PlamoBuild.dump-0.4b44 2016-04-09 21:37:03.000000000 +0900 @@ -7,7 +7,7 @@ pkgbase=dump vers=0.4b44 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers OPT_CONFIG="--disable-transselinux" DOCS="COPYRIGHT TODO KNOWNBUGS REPORTING-BUGS README THANKS CHANGES @@ -205,8 +205,6 @@ cd $B gunzip -c $W/dump-0.4b41-destdir.patch.gz | patch -Np1 -i - gunzip -c $W/dump-0.4b44-com_err.patch.gz | patch -Np1 -i - - cp -p dump/Makefile.in{,.orig} - sed -i '/^LIBS=/s@$@ -lpthread@' dump/Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/00_base/old/e2fsprogs-20161120/PlamoBuild.e2fsprogs-1.43.3 2016-11-20 20:50:53.000000000 +0900 +++ plamo/00_base/e2fsprogs/PlamoBuild.e2fsprogs-1.43.3 2016-12-06 05:39:01.000000000 +0900 @@ -5,11 +5,12 @@ pkgbase=e2fsprogs vers=1.43.3 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-elf-shlibs --disable-libuuid --disable-libblkid - --disable-fsck --disable-uuidd --with-root-prefix=" + --disable-fsck --disable-e2initrd-helper --disable-uuidd + --with-root-prefix=" DOCS="INSTALL.elfbin RELEASE-NOTES README NOTICE ABOUT-NLS INSTALL SUBMITTING-PATCHES" template=20161020 @@ -240,10 +241,10 @@ cd $B if [ $arch == x86_64 ] ; then cp -p configure{,.orig} - sed '/^ root_libdir=/s@$libdir@/lib64@g' configure.orig > configure + sed -i '/^ root_libdir=/s@$libdir@/lib64@g' configure fi cp -p misc/mke2fs.conf.in{,.orig} - sed 's@,dir_index@@g' misc/mke2fs.conf.in.orig > misc/mke2fs.conf.in + sed -i 's@,dir_index@@g' misc/mke2fs.conf.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/00_base/old/eject-20151228/PlamoBuild.eject-2.1.5 2015-12-28 16:00:08.000000000 +0900 +++ plamo/00_base/eject/PlamoBuild.eject-2.1.5 2016-08-23 13:14:54.000000000 +0900 @@ -1,14 +1,16 @@ #!/bin/sh ###################################################################### -url="http://pkgs.fedoraproject.org/repo/pkgs/eject/eject-2.1.5.tar.gz/b96a6d4263122f1711db12701d79f738/eject-2.1.5.tar.gz" +url="http://ftp.caixamagica.pt/anvil/pool/main/e/eject/eject_2.1.5+deb1+cvs20081104.orig.tar.gz + http://ftp.caixamagica.pt/anvil/pool/main/e/eject/eject_2.1.5+deb1+cvs20081104-8.diff.gz" pkgbase=eject vers=2.1.5 arch=`uname -m` -build=P2 -src=$pkgbase +build=P3 +src=$pkgbase-$vers+deb1+cvs20081104 +patchfiles="eject_2.1.5+deb1+cvs20081104-8.diff.gz" OPT_CONFIG="" -DOCS="NEWS TODO README PROBLEMS AUTHORS INSTALL PORTING ChangeLog COPYING" +DOCS="TODO NEWS PORTING COPYING INSTALL README AUTHORS PROBLEMS ChangeLog" ###################################################################### fscheck() { @@ -185,13 +187,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 @@ -201,6 +225,19 @@ 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 + ./bootstrap + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -208,8 +245,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 @@ -262,7 +299,7 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - 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/locale -name *.mo` 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 touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz --- plamo/00_base/old/extipl-20160320/PlamoBuild.extipl-5.04 2016-03-20 21:41:47.000000000 +0900 +++ plamo/00_base/extipl/PlamoBuild.extipl-5.04 2016-03-29 13:21:20.000000000 +0900 @@ -3,11 +3,12 @@ ###################################################################### url="http://jaist.dl.sourceforge.jp/extipl/2166/extipl-5.04.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/extipl/extipl-5.04-syscall.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/extipl/extipl-5.04-x86_64.patch.gz http://jaist.dl.sourceforge.net/sourceforge/nasm/nasm-0.98.38.tar.bz2" pkgbase=extipl vers=5.04 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="" DOCS="`echo doc/{English,Japanese}/{extipl,scorpius,techical}.txt` @@ -203,7 +204,11 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done cd $B - gunzip -c $W/extipl-5.04-syscall.patch.gz | patch -Np1 -i - + if [ $arch != x86_64 ] ; then + gunzip -c $W/extipl-5.04-syscall.patch.gz | patch -Np1 -i - + else + gunzip -c $W/extipl-5.04-x86_64.patch.gz | patch -Np1 -i - + fi mkdir -p $W/nasm/{bin,man/man1} cd $W/nasm-0.98.38 ./configure --prefix=$W/nasm --- plamo/00_base/old/file-20160407~/PlamoBuild.file-5.22 2016-04-07 07:39:50.000000000 +0900 +++ plamo/00_base/file/PlamoBuild.file-5.22 2016-04-07 16:06:48.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=file vers=5.22 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO MAINT" @@ -264,7 +264,7 @@ 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/misc | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/misc | 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 `cd $P ; find usr/share/man/man4 | tail -n+2` --- plamo/00_base/old/findutils-20160710/PlamoBuild.findutils-4.6.0 2016-07-10 11:04:09.000000000 +0900 +++ plamo/00_base/findutils/PlamoBuild.findutils-4.6.0 2016-08-24 14:34:06.000000000 +0900 @@ -5,10 +5,10 @@ pkgbase=findutils vers=4.6.0 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="--localstatedir=/var" +OPT_CONFIG="" DOCS="ABOUT-NLS README AUTHORS README-hacking NEWS THANKS INSTALL COPYING ChangeLog tool-versions.txt ChangeLog-2013 README-alpha TODO" ###################################################################### @@ -273,12 +273,13 @@ make install DESTDIR=$P fi done + rm -rf $P/usr/{bin/{locate,updatedb},libexec} + rm -rf $mandir/{man1/{locate,updatedb}.1,man5} touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_bindir $P/usr/libexec for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do @@ -298,11 +299,9 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/libexec | tail -n+2` - 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/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/man5 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz --- plamo/00_base/old/gawk-20160710/PlamoBuild.gawk-4.1.3 2016-07-10 11:19:26.000000000 +0900 +++ plamo/00_base/gawk/PlamoBuild.gawk-4.1.4 2016-11-09 23:31:23.000000000 +0900 @@ -1,19 +1,21 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gawk/gawk-4.1.3.tar.xz" +url="http://ftp.gnu.org/gnu/gawk/gawk-4.1.4.tar.xz" pkgbase=gawk -vers=4.1.3 +vers=4.1.4 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" -DOCS="NEWS POSIX.STD COPYING README AUTHORS INSTALL - `echo README_d/README.{VMS,mpfr,os2,bootstrap,gcc-3,zos,macosx}` - `echo README_d/{ChangeLog,README.{multibyte,hacking,tests}}` - `echo README_d/{ChangeLog.0,README.{solaris,pc}}` - ChangeLog ABOUT-NLS NEWS.0" +OPT_CONFIG="--without-mpfr" +DOCS="POSIX.STD NEWS `echo README_d/{README.zos,ChangeLog{,.0}}` + `echo README_d/README.{hacking,VMS,os2,multibyte,pc,zLinux,tests}` + `echo README_d/README.{solaris,bootstrap,macosx,gcc-3,mpfr}` + ChangeLog ChangeLog.0 ABOUT-NLS README NEWS.0 COPYING INSTALL + AUTHORS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -295,9 +297,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/glibc-20160607/PlamoBuild.glibc-2.20 2016-06-07 07:52:10.000000000 +0900 +++ plamo/00_base/glibc/PlamoBuild.glibc-2.20 2016-12-09 19:27:29.000000000 +0900 @@ -7,18 +7,24 @@ http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-getifaddrs_internal-segfault.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-linux-3.16-additions.patch http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-7547.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8776.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8778.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8779.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-7547.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8776.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8778.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8779.patch" pkgbase=glibc vers=2.20 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch + glibc-2.20-getifaddrs_internal-segfault.patch + glibc-2.20-linux-3.16-additions.patch glibc-c-utf8-locale.patch.gz + `echo CVE-2015-{7547,877{6,8,9}}.patch`" OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS PROJECTS README" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -233,16 +239,17 @@ if [ -d ${S2[$i]} ] ; then rm -rf ${S2[$i]} ; fi ; cp -a ${S[$i]} ${S2[$i]} if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; mkdir ${B[$i]} done - cd $S2 - patch -Np1 -i $W/glibc-2.19-fhs-1.patch - patch -Np1 -i $W/glibc-2.20-do_ftell_wide-memleak.patch - patch -Np1 -i $W/glibc-2.20-getifaddrs_internal-segfault.patch - patch -Np1 -i $W/glibc-2.20-linux-3.16-additions.patch - gunzip -c $W/glibc-c-utf8-locale.patch.gz | patch -Np1 -i - - patch -Np1 -i $W/CVE-2015-7547.patch - patch -Np1 -i $W/CVE-2015-8776.patch - patch -Np1 -i $W/CVE-2015-8778.patch - patch -Np1 -i $W/CVE-2015-8779.patch + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${S2[$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 cp -p localedata/Makefile{,.orig} cat <<- "EOF" | patch localedata/Makefile 235a236 @@ -374,9 +381,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- 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 --- plamo/00_base/old/grub-20160320/PlamoBuild.grub-2.02~beta2 2016-03-20 22:40:55.000000000 +0900 +++ plamo/00_base/grub/PlamoBuild.grub-2.02~beta2 2016-06-21 22:41:23.000000000 +0900 @@ -7,12 +7,16 @@ pkgbase=grub vers=2.02~beta2 arch=`uname -m` -build=P12 -src=$pkgbase-$vers -OPT_CONFIG="--sysconfdir=/etc --disable-grub-mount --disable-werror - --with-platform=efi" -DOCS="BUGS TODO THANKS COPYING ABOUT-NLS ChangeLog AUTHORS README +build=P13 +src[0]=$pkgbase-$vers +src[1]=${src[0]} +patchfiles[0]="" +patchfiles[1]="" +OPT_CONFIG[0]="--disable-grub-mount --disable-werror" +OPT_CONFIG[1]="${OPT_CONFIG[0]} --with-platform=efi" +DOCS[0]="BUGS TODO THANKS COPYING ABOUT-NLS ChangeLog AUTHORS README NEWS INSTALL" +DOCS[1]="" ###################################################################### fscheck() { @@ -189,14 +193,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##*/} ;; - xz) tar xvpJf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -204,13 +229,26 @@ 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 - cd $B - for i in `cat $W/debian/patches/series` ; do - if [ $i != dpkg_version_comparison.patch ] ; then - patch -Np1 -i $W/debian/patches/$i - fi + 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} + for j in `cat $W/debian/patches/series` ; do + if [ $j != dpkg_version_comparison.patch ] ; then + patch -Np1 -i $W/debian/patches/$j + fi + done + ./autogen.sh done - ./autogen.sh for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -220,8 +258,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 @@ -292,7 +330,7 @@ touch -t `date '+%m%d0900'` $docdir/$src/$myname gzip_one $docdir/$src/$myname else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} + false && ln $docdir/$src/$myname.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/gzip-20160105/PlamoBuild.gzip-1.6 2016-01-05 21:07:54.000000000 +0900 +++ plamo/00_base/gzip/PlamoBuild.gzip-1.8 2016-11-20 13:16:18.000000000 +0900 @@ -1,15 +1,18 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gzip/gzip-1.6.tar.gz" +url="http://ftp.gnu.org/gnu/gzip/gzip-1.8.tar.gz" pkgbase=gzip -vers=1.6 +vers=1.8 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--bindir=/bin" -DOCS="INSTALL NEWS README AUTHORS COPYING THANKS TODO ChangeLog-2007 - README-release ChangeLog" +DOCS="NEWS INSTALL COPYING README AUTHORS ChangeLog algorithm.doc + README-release ChangeLog-2007 TODO THANKS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -186,13 +189,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 @@ -202,6 +227,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -209,8 +245,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 @@ -257,9 +293,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/hdsetup-20161124/PlamoBuild.hdsetup-6.1 2016-11-24 09:04:24.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.2 2017-02-20 15:05:53.000000000 +0900 @@ -14,9 +14,9 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.26-no-gets.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" pkgbase=hdsetup -vers=6.1 +vers=6.2 arch=`uname -m` -build=P10 +build=P1 src[0]=busybox-1.25.1 src[1]=dialog-1.3-20160828 src[2]=coreutils-8.25 @@ -51,7 +51,7 @@ --disable-lzmainfo --disable-lzma-links --disable-scripts" OPT_CONFIG[6]="--bindir=/bin" DOCS="LICENSE INSTALL TODO AUTHORS README TODO_unicode" -template=20161020 +template=20170204 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -270,7 +270,7 @@ 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 - ;; + bz2) bunzip2 -c $W/$j | patch -Np1 -i - ;; xz) unxz -c $W/$j | patch -Np1 -i - ;; *) patch -Np1 -i $W/$j ;; esac --- plamo/00_base/old/iputils-20160107/PlamoBuild.iputils-s20101006 2016-01-07 08:53:27.000000000 +0900 +++ plamo/00_base/iputils/PlamoBuild.iputils-s20101006 2016-03-21 18:20:06.000000000 +0900 @@ -2,9 +2,9 @@ ###################################################################### url="http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2 - http://plamo.linet.gr.jp/~tamuki/src/iputils-s20101006-fixes-1.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/iputils-s20100418-doc-1.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/iputils-s20101006-Makefile.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/iputils/iputils-s20101006-fixes-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/iputils/iputils-s20100418-doc-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/iputils/iputils-s20101006-Makefile.patch.gz" pkgbase=iputils vers=s20101006 arch=`uname -m` --- plamo/00_base/old/kbd-20160321/PlamoBuild.kbd-1.15.5 2016-03-21 18:25:25.000000000 +0900 +++ plamo/00_base/kbd/PlamoBuild.kbd-1.15.5 2016-11-24 09:12:52.000000000 +0900 @@ -1,17 +1,21 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.altlinux.org/pub/people/legion/kbd/kbd-1.15.5.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/kbd/kbd-1.15-backspace-1.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/kbd/kbd-1.15-plamo-compat.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/kbd/kbd-1.15.5-revert_loadkeys_analize.patch.gz" +url="https://www.kernel.org/pub/linux/utils/kbd/kbd-1.15.5.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15-backspace-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15-plamo-compat.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15.5-revert_loadkeys_analize.patch.gz" pkgbase=kbd vers=1.15.5 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="`echo kbd-1.15-{backspace-1,plamo-compat}.patch.gz` + kbd-1.15.5-revert_loadkeys_analize.patch.gz" OPT_CONFIG="" DOCS="INSTALL ChangeLog NEWS AUTHORS CREDITS COPYING ABOUT-NLS README" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -188,13 +192,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 @@ -202,10 +228,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 - cd $B - gunzip -c $W/kbd-1.15-backspace-1.patch.gz | patch -Np1 -i - - gunzip -c $W/kbd-1.15-plamo-compat.patch.gz | patch -Np1 -i - - gunzip -c $W/kbd-1.15.5-revert_loadkeys_analize.patch.gz | patch -Np1 -i - + 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 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -215,8 +248,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 @@ -266,9 +299,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done @@ -279,7 +326,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/console{fonts,trans} tar rvpf $pkg.tar -C $P usr/share/{uni,key}maps - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name kbd.mo` + 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/man/man1 | 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` --- plamo/00_base/old/kmod-20160125/PlamoBuild.kmod-22 2016-01-25 18:19:43.000000000 +0900 +++ plamo/00_base/kmod/PlamoBuild.kmod-22 2016-06-06 08:18:11.000000000 +0900 @@ -5,9 +5,9 @@ pkgbase=kmod vers=22 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers -OPT_CONFIG="--bindir=/bin --sysconfdir=/etc" +OPT_CONFIG="--bindir=/bin" DOCS="NEWS COPYING TODO README" ###################################################################### @@ -185,14 +185,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##*/} ;; - xz) tar xvpJf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -209,8 +230,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 @@ -291,10 +312,10 @@ convert cat <<- "EOF" >> $P/install/doinst.sh + mv etc/modprobe.d/plamo-default.conf.new /tmp if [ -f etc/modprobe.d/plamo-default.conf ] ; then - rm etc/modprobe.d/plamo-default.conf.new + mv /tmp/plamo-default.conf.new etc/modprobe.d/plamo-default.conf.dist else - mv etc/modprobe.d/plamo-default.conf.new /tmp mv /tmp/plamo-default.conf.new etc/modprobe.d/plamo-default.conf fi EOF --- plamo/00_base/old/less-20160321/PlamoBuild.less-382 2016-03-21 18:38:07.000000000 +0900 +++ plamo/00_base/less/PlamoBuild.less-382 2016-04-09 20:52:10.000000000 +0900 @@ -12,7 +12,7 @@ pkgbase=less vers=382 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="" DOCS="COPYING INSTALL LICENSE NEWS README" --- plamo/00_base/old/libgcc-20160112/PlamoBuild.libgcc-4.8.4 2016-01-12 07:56:45.000000000 +0900 +++ plamo/00_base/libgcc/PlamoBuild.libgcc-4.8.5 2016-01-28 13:05:06.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2 +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 https://patchwork.ozlabs.org/patch/342434/mbox" pkgbase=libgcc -vers=4.8.4 +vers=4.8.5 arch=`uname -m` -build=P3 +build=P2 src=gcc-$vers OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object --enable-linker-build-id --enable-plugin --with-system-zlib --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" -DOCS="COPYING.LIB MAINTAINERS ABOUT-NLS README COPYING3.LIB COPYING - COPYING.RUNTIME NEWS COPYING3 ChangeLog" +DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa + COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" ###################################################################### fscheck() { --- plamo/00_base/old/libtirpc-20160105/PlamoBuild.libtirpc-0.2.3 2016-01-05 23:34:04.000000000 +0900 +++ plamo/00_base/libtirpc/PlamoBuild.libtirpc-0.2.3 2016-08-26 13:45:34.000000000 +0900 @@ -7,9 +7,10 @@ pkgbase=libtirpc vers=0.2.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers -OPT_CONFIG="--sysconfdir=/etc" +patchfiles="" +OPT_CONFIG="" DOCS="VERSION TODO THANKS README NEWS INSTALL ChangeLog COPYING AUTHORS" ###################################################################### @@ -191,14 +192,34 @@ if [ ${i##*/} == 1 ] ; then [ ! -f $alt ] && wget $i -O $alt elif [ ! -f ${i##*/} ] ; then - wget $i + 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 @@ -206,6 +227,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 patch -Np1 -i $W/libtirpc-0.2.3-remove_nis-1.patch patch -Np1 -i $W/0001-Switch-to-use-standard-GSSAPI-by-default.patch @@ -219,8 +251,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 @@ -249,6 +281,10 @@ make install DESTDIR=$P fi done + install -d $P/$libdir + cp -p $P/usr/$libdir/libtirpc.so.1.0.10 $P/$libdir + ln -sf /$libdir/libtirpc.so.1.0.10 $P/usr/$libdir/libtirpc.so.1 + ln -sf /$libdir/libtirpc.so.1.0.10 $P/usr/$libdir/libtirpc.so touch $P/etc/netconfig chown root.root $P/etc/netconfig touch $W/i.et @@ -274,7 +310,9 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - tar cvpf $pkg.tar -C $P \ + rm $P/usr/$libdir/libtirpc.so.1.0.10 + tar cvpf $pkg.tar -C $P `cd $P ; find $libdir | 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/tirpc tar rvpf $pkg.tar -C $P etc/netconfig --- plamo/00_base/old/lilo-20160314/PlamoBuild.lilo-24.2 2016-03-14 17:34:46.000000000 +0900 +++ plamo/00_base/lilo/PlamoBuild.lilo-24.2 2016-03-23 07:18:35.000000000 +0900 @@ -3,9 +3,9 @@ ###################################################################### url="http://lilo.alioth.debian.org/ftp/sources/lilo-24.2.tar.gz ftp://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/Dev86src-0.16.18.tar.gz - http://plamo.linet.gr.jp/~tamuki/src/dev86-0.16.17-x86_64.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/dev86-0.16.17-copt.patch.gz - http://plamo.linet.gr.jp/~tamuki/src/plamo_liloconfig.tar.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/lilo/dev86-0.16.17-x86_64.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/lilo/dev86-0.16.17-copt.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/lilo/plamo_liloconfig.tar.gz" pkgbase=lilo vers=24.2 arch=`uname -m` --- plamo/00_base/old/linux_firmware-20160113/PlamoBuild.linux_firmware-git_20141217 2016-01-13 08:59:46.000000000 +0900 +++ plamo/00_base/linux_firmware/PlamoBuild.linux_firmware-git_20160112 2016-01-26 12:06:22.000000000 +0900 @@ -3,22 +3,26 @@ ###################################################################### url="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" pkgbase=linux_firmware -vers=git_20141217 +vers=git_20160112 arch=noarch build=P2 src=linux-firmware OPT_CONFIG="" DOCS="GPL-3 `echo LICENCE.{Abilis,IntcSST2,Marvell,OLPC}` LICENSE.radeon `echo LICENCE.{agere,atheros_firmware,broadcom_bcm43xx,ca0132}` - `echo LICENCE.{chelsio_firmware,cw1200}` README - `echo LICENCE.{ene_firmware,fw_sst_0f28,go7007,i2400m,ibt_firmware}` - `echo LICENCE.{it913x,iwlwifi_firmware,qat_dh895xcc_firmware,mwl8335}` - LICENCE.myri10ge_firmware WHENCE `echo LICENCE.{qla2xxx,r8a779x_usb3}` + `echo LICENCE.{chelsio_firmware,cw1200}` README LICENCE.ene_firmware + `echo LICENCE.{fw_sst_0f28,go7007,i2400m,ibt_firmware,it913x}` + `echo LICENCE.{iwlwifi_firmware,adsp_sst}` WHENCE LICENCE.mwl8335 + `echo LICENCE.{myri10ge_firmware,phanfw,qla2xxx,r8a779x_usb3}` `echo LICENCE.{ralink-firmware.txt,ralink_a_mediatek_company_firmware}` `echo LICENCE.{rtlwifi_firmware.txt,siano,tda7706-firmware.txt}` `echo LICENCE.{ti-connectivity,ueagle-atm4-firmware,via_vt6656,wl1251}` `echo LICENCE.{xc4000,xc5000,xc5000c}` `echo LICENSE.{amd-ucode,dib0700}` - TDA7706_OM_v2.5.1_boot.txt TDA7706_OM_v3.0.2_boot.txt" + `echo TDA7706_OM_{v2.5.1,v3.0.2}_boot.txt` `echo LICENCE.{cavium,e100}` + `echo LICENCE.{kaweth,moxa,nvidia,open-ath9k-htc-firmware,qat_firmware}` + `echo LICENCE.{qla1280,ti-keystone}` + `echo LICENSE.{QualcommAtheros_{ar3k,ath10k},amdgpu,atmel,hfi1_firmware}` + LICENSE.i915" ###################################################################### fscheck() { @@ -207,7 +211,7 @@ gz) tar xvpzf ${i##*/} ;; bz2) tar xvpjf ${i##*/} ;; git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard d547ba7 + git checkout origin/master ; git reset --hard 40e9ae8 git set-file-times ) ;; esac done --- plamo/00_base/old/linux_pam-20151225/PlamoBuild.linux_pam-1.1.8 2015-12-25 10:59:46.000000000 +0900 +++ plamo/00_base/linux_pam/PlamoBuild.linux_pam-1.1.8 2016-11-21 18:30:32.000000000 +0900 @@ -2,16 +2,19 @@ ###################################################################### url="https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-1.1.8.tar.bz2 - https://raw.githubusercontent.com/willysr/csb/master/pam/pam-1.1.8-cve-2013-7041.patch - https://raw.githubusercontent.com/willysr/csb/master/pam/pam-1.1.8-cve-2014-2583.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/linux_pam/pam-1.1.8-cve-2013-7041.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/linux_pam/pam-1.1.8-cve-2014-2583.patch" pkgbase=linux_pam vers=1.1.8 arch=`uname -m` -build=P2 +build=P3 src=Linux-PAM-$vers -OPT_CONFIG="--enable-shared --enable-read-both-confs --disable-nis" +patchfiles="`echo pam-1.1.8-cve-{2013-7041,2014-2583}.patch`" +OPT_CONFIG="--enable-static --enable-read-both-confs --disable-nis" DOCS="NEWS ABOUT-NLS Copyright README COPYING AUTHORS CHANGELOG ChangeLog INSTALL ChangeLog-CVS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -188,13 +191,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 @@ -202,9 +227,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 - cd $B - patch -Np1 -i $W/pam-1.1.8-cve-2013-7041.patch - patch -Np1 -i $W/pam-1.1.8-cve-2014-2583.patch + 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 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -214,8 +247,8 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir=/usr/$libdir \ - --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir=/usr/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ --sbindir=/$libdir/security --enable-securedir=/$libdir/security fi @@ -332,17 +365,33 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done mv $docdir/Linux-PAM $docdir/$src/doc mv $docdir/$src/{doc,{ABOUT-NLS,Copyright,README,COPYING,AUTHORS}.gz} $C - mv $docdir/$src/{CHANGELOG,ChangeLog,INSTALL,ChangeLog-CVS,$myname}.gz $C + mv $docdir/$src/{CHANGELOG,ChangeLog,INSTALL,ChangeLog-CVS}.gz $C + mv $docdir/$src/{$myname,$spec}.gz $C mv $C/{doc,{ABOUT-NLS,Copyright,README,COPYING,AUTHORS}.gz} $docdir/$src - mv $C/{CHANGELOG,ChangeLog,INSTALL,ChangeLog-CVS,$myname}.gz $docdir/$src + mv $C/{CHANGELOG,ChangeLog,INSTALL,ChangeLog-CVS}.gz $docdir/$src + mv $C/{$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src convert prune_symlink $P/etc/pam.d --- plamo/00_base/old/logrotate-20160116/PlamoBuild.logrotate-3.8.1 2016-01-16 07:32:10.000000000 +0900 +++ plamo/00_base/logrotate/PlamoBuild.logrotate-3.8.1 2016-06-06 08:26:47.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=logrotate vers=3.8.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="" DOCS="README.HPUX README.Solaris CHANGES COPYING" @@ -185,13 +185,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 @@ -208,8 +230,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 @@ -309,10 +331,10 @@ convert install -d $P/install cat <<- "EOF" > $P/install/doinst.sh + mv etc/logrotate.conf.new /tmp if [ -f etc/logrotate.conf ] ; then - rm etc/logrotate.conf.new + mv /tmp/logrotate.conf.new etc/logrotate.conf.dist else - mv etc/logrotate.conf.new /tmp mv /tmp/logrotate.conf.new etc/logrotate.conf fi EOF --- plamo/00_base/old/lsb_release-20160314/PlamoBuild.lsb_release-1.4 2016-03-14 17:42:03.000000000 +0900 +++ plamo/00_base/lsb_release/PlamoBuild.lsb_release-1.4 2017-02-20 19:21:26.000000000 +0900 @@ -5,10 +5,13 @@ pkgbase=lsb_release vers=1.4 arch=noarch -build=P6 +build=P7 src=lsb-release-$vers +patchfiles="" OPT_CONFIG="" DOCS="ChangeLog INSTALL README lsb-release.template lsb_release.examples" +template=20170204 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -185,13 +188,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 @@ -199,6 +224,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 cp -p Makefile{,.orig} sed -i -e '/^prefix=/s@/local@@g' -e '/^mandir=/s@/man@/share/man@g' \ @@ -213,8 +249,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 @@ -245,7 +281,7 @@ done install -d $P/etc cat <<- "EOF" > $P/etc/plamo-release - Plamo Linux release 6.1 + Plamo Linux release 6.2 EOF touch $W/i.et cd $W @@ -263,9 +299,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/lvm2-20151223/PlamoBuild.lvm2-2.02.90 2015-12-23 09:50:40.000000000 +0900 +++ plamo/00_base/lvm2/PlamoBuild.lvm2-2.02.90 2016-12-03 15:49:01.000000000 +0900 @@ -5,13 +5,16 @@ pkgbase=lvm2 vers=2.02.90 arch=`uname -m` -build=P3 +build=P4 src=LVM2.$vers +patchfiles="" OPT_CONFIG="--exec-prefix= --enable-static_link --enable-applib --enable-cmdlib --enable-pkgconfig --enable-dmeventd --with-thin=internal" DOCS="COPYING.LIB COPYING INSTALL VERSION_DM README VERSION WHATS_NEW WHATS_NEW_DM" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -188,14 +191,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##*/} ;; - tgz) 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 +227,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 cp -p daemons/dmeventd/Makefile.in{,.orig} sed -i 's@$(ELDFLAGS) @@' daemons/dmeventd/Makefile.in @@ -215,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]} \ --with-usrlibdir=/usr/$libdir fi @@ -249,6 +284,7 @@ touch $P/usr/$libdir/*.a touch $P/usr/$libdir/pkgconfig/*.pc touch $P/etc/lvm/lvm.conf + touch $mandir/man[58]/* touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -267,9 +303,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/netkit_combo-20160330/PlamoBuild.netkit_combo-0.17 2016-03-30 13:45:36.000000000 +0900 +++ plamo/00_base/netkit_combo/PlamoBuild.netkit_combo-0.17 2016-04-09 20:56:43.000000000 +0900 @@ -25,7 +25,7 @@ pkgbase=netkit_combo vers=0.17 arch=`uname -m` -build=P8 +build=P9 src=netkit-combo-$vers OPT_CONFIG="" DOCS="README --- plamo/00_base/old/nkf-20160324/PlamoBuild.nkf-2.1.2 2016-03-24 11:52:09.000000000 +0900 +++ plamo/00_base/nkf/PlamoBuild.nkf-2.1.2 2016-03-24 12:26:46.000000000 +0900 @@ -267,8 +267,10 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_libdir $P/usr/$libdir/perl5/auto/NKF - touch -t `date '+%m%d0900'` $P/usr/$libdir/perl5/auto/NKF + strip_libdir \ + $P/usr/$libdir/perl5/site_perl/*/$arch-linux-thread-multi/auto/NKF + touch -t `date '+%m%d0900'` \ + $P/usr/$libdir/perl5/site_perl/*/$arch-linux-thread-multi/auto/NKF gzip_dir $mandir/ja_JP.eucJP/man1 for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do @@ -289,7 +291,8 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P usr/$libdir/perl5/{auto/NKF,NKF.pm} + tar rvpf $pkg.tar -C $P \ + usr/$libdir/perl5/site_perl/5.14.2/$arch-linux-thread-multi/{auto/NKF,NKF.pm} 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/ja_JP.eucJP/man1 | tail -n+2` --- plamo/00_base/old/nvi-20160409/PlamoBuild.nvi-1.79 2016-04-09 21:07:22.000000000 +0900 +++ plamo/00_base/nvi/PlamoBuild.nvi-1.79 2016-07-10 11:39:09.000000000 +0900 @@ -8,8 +8,9 @@ pkgbase=nvi vers=1.79 arch=`uname -m` -build=P7 +build=P8 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--enable-multibyte=euc-jp" DOCS="LAYOUT README FAQ `echo docs/USD.doc/{edit/edittut,vi.ref/vi.ref}.ps` @@ -195,13 +196,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 @@ -209,6 +232,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 chmod -R u+w . gunzip -c $W/nvi-1.79.m17n-20040401.diff.gz | patch -Np0 -i - @@ -226,8 +260,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 @@ -307,6 +341,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_bindir $P/usr/libexec gzip_dir $mandir/cat1 for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do --- plamo/00_base/old/openssh-20160802/PlamoBuild.openssh-7.3p1 2016-08-02 20:10:01.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.4p1 2017-01-16 19:36:28.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.3p1.tar.gz" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz" pkgbase=openssh -vers=7.3p1 +vers=7.4p1 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -13,6 +13,8 @@ DOCS="CREDITS INSTALL LICENCE OVERVIEW PROTOCOL PROTOCOL.agent `echo PROTOCOL.{certkeys,chacha20poly1305,key,krl,mux}` README `echo README.{dns,platform,privsep,tun}` TODO ChangeLog" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -310,9 +312,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/openssl-20161108/PlamoBuild.openssl-1.0.2j 2016-11-08 13:00:42.000000000 +0900 +++ plamo/00_base/openssl/PlamoBuild.openssl-1.0.2k 2017-03-01 08:00:25.000000000 +0900 @@ -1,20 +1,19 @@ #!/bin/sh ###################################################################### -url="http://www.openssl.org/source/openssl-1.0.2j.tar.gz +url="http://www.openssl.org/source/openssl-1.0.2k.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/openssl/mkcabundle.pl" pkgbase=openssl -vers=1.0.2j +vers=1.0.2k arch=`uname -m` build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ACKNOWLEDGMENTS CHANGES CHANGES.SSLeay CONTRIBUTING FAQ INSTALL - INSTALL.DJGPP INSTALL.MacOS INSTALL.NW INSTALL.OS2 INSTALL.VMS - INSTALL.W32 INSTALL.W64 INSTALL.WCE LICENSE NEWS PROBLEMS README - README.ASN1 README.ENGINE" -template=20161020 + `echo INSTALL.{DJGPP,MacOS,NW,OS2,VMS,W32,W64,WCE}` LICENSE NEWS + PROBLEMS README README.ASN1 README.ENGINE" +template=20170204 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -237,7 +236,7 @@ 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 - ;; + bz2) bunzip2 -c $W/$j | patch -Np1 -i - ;; xz) unxz -c $W/$j | patch -Np1 -i - ;; *) patch -Np1 -i $W/$j ;; esac --- plamo/00_base/old/mlocate-20160113/PlamoBuild.mlocate-0.24 2016-01-13 22:53:23.000000000 +0900 +++ plamo/00_base/mlocate/PlamoBuild.mlocate-0.24 2017-04-24 20:04:59.000000000 +0900 @@ -1,216 +1,46 @@ #!/bin/sh ###################################################################### -url="https://fedorahosted.org/releases/m/l/mlocate/mlocate-0.24.tar.xz" +url="http://downloads.sourceforge.net/kongoni/mlocate-0.24.tar.xz" +verify= +digest= +commitid= pkgbase=mlocate vers=0.24 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers -OPT_CONFIG="--localstatedir=/var" +patchfiles="" +OPT_CONFIG="" DOCS="README ChangeLog NEWS INSTALL AUTHORS ABOUT-NLS COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -224,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -258,24 +83,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/locale -name "*.mo"` tar rvpf $pkg.tar -C $P var/mlocate @@ -287,6 +96,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/pciutils-20160115/PlamoBuild.pciutils-3.1.8 2016-01-15 17:27:48.000000000 +0900 +++ plamo/00_base/pciutils/PlamoBuild.pciutils-3.1.8 2016-04-02 18:33:35.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=pciutils vers=3.1.8 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers OPT_CONFIG="" DOCS="TODO README ChangeLog README.Windows COPYING" @@ -277,6 +277,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man7 | 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 read -p "Do you want to keep work files? [y/N] " ans --- plamo/00_base/old/procinfo_ng-20160115/PlamoBuild.procinfo_ng-2.0.304 2016-01-15 15:40:01.000000000 +0900 +++ plamo/00_base/procinfo_ng/PlamoBuild.procinfo_ng-2.0.304 2016-04-09 21:10:53.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=procinfo_ng vers=2.0.304 arch=`uname -m` -build=P2 +build=P3 src=procinfo-ng-$vers OPT_CONFIG="" DOCS="GPL-2.txt LICENSE.txt LGPL-2.1.txt" --- plamo/00_base/old/procps_ng-20160115/PlamoBuild.procps_ng-3.3.7 2016-01-15 17:25:11.000000000 +0900 +++ plamo/00_base/procps_ng/PlamoBuild.procps_ng-3.3.11 2016-04-08 15:09:37.000000000 +0900 @@ -1,16 +1,15 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/procps-ng/procps-ng-3.3.7.tar.xz" +url="http://downloads.sourceforge.net/procps-ng/procps-ng-3.3.11.tar.xz" pkgbase=procps_ng -vers=3.3.7 +vers=3.3.11 arch=`uname -m` build=P2 src=procps-ng-$vers OPT_CONFIG="--exec-prefix= --disable-kill --enable-skill" -DOCS="README NEWS `echo Documentation/{CodingStyle,FAQ,BUGS,TODO}` - AUTHORS COPYING ChangeLog top/README.top ABOUT-NLS INSTALL - COPYING.LIB" +DOCS="AUTHORS NEWS COPYING ABOUT-NLS ChangeLog COPYING.LIB + `echo Documentation/{CodingStyle.md,FAQ,TODO,bugs.md}`" ###################################################################### fscheck() { @@ -264,13 +263,14 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` + tar cvpf $pkg.tar -C $P `cd $P ; find 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 ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/proc + 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/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 --- plamo/00_base/old/readline-20160403/PlamoBuild.readline-6.3.8 2016-04-03 13:32:45.000000000 +0900 +++ plamo/00_base/readline/PlamoBuild.readline-6.3.8 2016-08-27 18:10:21.000000000 +0900 @@ -13,8 +13,9 @@ pkgbase=readline vers=6.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--with-curses" DOCS="COPYING README MANIFEST INSTALL CHANGELOG CHANGES NEWS USAGE" ###################################################################### @@ -193,13 +194,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 @@ -207,6 +230,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 patch -Np0 -i $W/readline63-001 patch -Np0 -i $W/readline63-002 @@ -225,8 +259,8 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir=/$libdir \ - --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir=/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -257,6 +291,7 @@ done install -d $P/usr/$libdir rm $P/$libdir/lib{history,readline}.so + touch $P/$libdir/lib{history,readline}.so ln -s /$libdir/libhistory.so.6 $P/usr/$libdir/libhistory.so ln -s /$libdir/libreadline.so.6 $P/usr/$libdir/libreadline.so touch $W/i.et @@ -282,6 +317,7 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert + rm $P/$libdir/lib{history,readline}.so tar cvpf $pkg.tar -C $P `cd $P ; find $libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/readline --- plamo/00_base/old/sed-20160116/PlamoBuild.sed-4.2.1 2016-01-16 08:11:04.000000000 +0900 +++ plamo/00_base/sed/PlamoBuild.sed-4.2.2 2016-03-17 15:20:12.000000000 +0900 @@ -1,16 +1,15 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.gz - http://sources.debian.net/data/main/s/sed/4.2.1-7/debian/patches/debian-changes-4.2.1-7" +url="http://ftp.gnu.org/gnu/sed/sed-4.2.2.tar.gz" pkgbase=sed -vers=4.2.1 +vers=4.2.2 arch=`uname -m` -build=P4 +build=P2 src=$pkgbase-$vers OPT_CONFIG="--bindir=/bin" -DOCS="COPYING.DOC INSTALL README README-alpha README.boot THANKS - AUTHORS COPYING ChangeLog ABOUT-NLS BUGS NEWS" +DOCS="COPYING.DOC INSTALL README README-alpha THANKS AUTHORS COPYING + ChangeLog ABOUT-NLS BUGS NEWS" ###################################################################### fscheck() { @@ -201,8 +200,6 @@ 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 - cd $B - patch -Np1 -i $W/debian-changes-4.2.1-7 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/00_base/old/shadow-20160323/PlamoBuild.shadow-git_20130908 2016-03-23 16:42:56.000000000 +0900 +++ plamo/00_base/shadow/PlamoBuild.shadow-git_20130908 2017-02-27 13:11:05.000000000 +0900 @@ -2,15 +2,18 @@ ###################################################################### url="https://github.com/shadow-maint/shadow.git - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/shadow/shadow-adduser-20160122" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/shadow/CVE-2017-2616.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/shadow/shadow-adduser-20160122" pkgbase=shadow vers=git_20130908 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase -OPT_CONFIG="--sysconfdir=/etc --enable-man --without-selinux - --with-libcrack" +patchfiles="CVE-2017-2616.patch.gz" +OPT_CONFIG="--enable-man --without-selinux --with-libcrack" DOCS="COPYING ChangeLog NEWS README TODO" +template=20170204 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -190,14 +193,38 @@ case ${i##*.} in git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; else ( cd `basename ${i##*/} .git` ; git pull origin master ) ; fi ;; - *) 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 + ;; esac 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##*/} ;; git) ( cd `basename ${i##*/} .git` git checkout origin/master ; git reset --hard 578947e git set-file-times ) ;; @@ -208,6 +235,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 cp -p etc/pam.d/chfn etc/pam.d/chfn.orig cat <<- "EOF" | patch etc/pam.d/chfn @@ -338,8 +376,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 @@ -396,9 +434,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/sudo-20160116/PlamoBuild.sudo-1.8.15 2016-01-16 11:11:57.000000000 +0900 +++ plamo/00_base/sudo/PlamoBuild.sudo-1.8.15 2016-06-07 14:15:45.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=sudo vers=1.8.15 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers OPT_CONFIG="--with-pam --without-sendmail --with-env-editor --with-all-insults --with-hal-insults --with-secure-path" @@ -188,13 +188,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 @@ -211,8 +233,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 @@ -281,10 +303,11 @@ convert touch -t `date '+%m%d0900'` $P/usr/libexec/sudo cat <<- "EOF" >> $P/install/doinst.sh + + mv etc/sudoers.new /tmp if [ -f etc/sudoers ] ; then - rm etc/sudoers.new + mv /tmp/sudoers.new etc/sudoers.dist else - mv etc/sudoers.new /tmp mv /tmp/sudoers.new etc/sudoers fi EOF --- plamo/00_base/old/sysfsutils-20160116/PlamoBuild.sysfsutils-2.1.0 2016-01-16 16:05:05.000000000 +0900 +++ plamo/00_base/sysfsutils/PlamoBuild.sysfsutils-2.1.0 2016-08-27 20:08:51.000000000 +0900 @@ -1,12 +1,14 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/linux-diag/sysfsutils-2.1.0.tar.gz" +url="http://downloads.sourceforge.net/linux-diag/sysfsutils-2.1.0.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/sysfsutils/sysfs_get_link.patch" pkgbase=sysfsutils vers=2.1.0 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="sysfs_get_link.patch" OPT_CONFIG="" DOCS="TODO NEWS INSTALL README COPYING CREDITS AUTHORS docs/libsysfs.txt ChangeLog" @@ -186,13 +188,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 @@ -202,6 +226,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -209,8 +244,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 --- plamo/00_base/old/syslinux-20160119/PlamoBuild.syslinux-6.03 2016-01-19 20:02:32.000000000 +0900 +++ plamo/00_base/syslinux/PlamoBuild.syslinux-6.03 2016-03-23 20:36:22.000000000 +0900 @@ -2,6 +2,9 @@ ###################################################################### url="https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz + http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch + http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch + http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch http://www.nasm.us/pub/nasm/releasebuilds/2.11.08/nasm-2.11.08.tar.xz" pkgbase=syslinux vers=6.03 @@ -205,6 +208,14 @@ ./configure --prefix=$W/nasm make install PATH="$W/nasm/bin:$PATH" + cd $B + patch -Np1 -i $W/syslinux-fix-parallel-building-issue.patch + patch -Np1 -i $W/syslinux-libupload-depend-lib.patch + patch -Np1 -i $W/syslinux-remove-clean-script.patch + if [ $arch == i686 ] ; then + cp -p Makefile{,.orig} + sed -i '/^all_firmware/s@ efi64@@' Makefile + fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/00_base/old/sysvinit-20160323/PlamoBuild.sysvinit-2.88dsf 2016-03-23 17:48:11.000000000 +0900 +++ plamo/00_base/sysvinit/PlamoBuild.sysvinit-2.88dsf 2016-09-08 21:00:03.000000000 +0900 @@ -2,12 +2,13 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/sysvinit/plamo-rc-scripts-20160208.tgz" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/sysvinit/plamo-rc-scripts-20160908.tgz" pkgbase=sysvinit vers=2.88dsf arch=`uname -m` -build=P16 +build=P18 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="doc/bootlogd.README doc/Install doc/Changelog doc/Propaganda COPYING COPYRIGHT Makefile README" @@ -187,14 +188,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##*/} ;; - tgz) 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 @@ -204,6 +226,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -211,8 +244,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 --- plamo/00_base/old/tar-20160408/PlamoBuild.tar-1.26 2016-04-08 19:38:20.000000000 +0900 +++ plamo/00_base/tar/PlamoBuild.tar-1.26 2016-11-24 09:05:00.000000000 +0900 @@ -1,18 +1,21 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-tartime.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.23-txz.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/tar/tar-1.26-no-gets.patch.gz" +url="http://ftp.gnu.org/gnu/tar/tar-1.26.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.23-tartime.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.23-txz.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.26-no-gets.patch.gz" pkgbase=tar vers=1.26 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="`echo tar-1.2{3-{tartime,txz},6-no-gets}.patch.gz`" OPT_CONFIG="" DOCS="NEWS TODO README THANKS ChangeLog.1 AUTHORS INSTALL ABOUT-NLS ChangeLog COPYING" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -189,13 +192,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,10 +228,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 - cd $B - gunzip -c $W/tar-1.23-tartime.patch.gz | patch -Np1 -i - - gunzip -c $W/tar-1.23-txz.patch.gz | patch -Np1 -i - - gunzip -c $W/tar-1.26-no-gets.patch.gz | patch -Np1 -i - + 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 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -216,8 +248,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 @@ -263,16 +295,30 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/libexec | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name tar.mo` + 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 usr/share/doc/$src touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz --- plamo/00_base/old/tcp_wrappers-20160403/PlamoBuild.tcp_wrappers-7.6.q 2016-04-03 08:59:16.000000000 +0900 +++ plamo/00_base/tcp_wrappers/PlamoBuild.tcp_wrappers-7.6.q 2016-06-07 14:34:48.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=tcp_wrappers vers=7.6.q arch=`uname -m` -build=P4 +build=P5 src=tcp_wrappers_7.6 OPT_CONFIG="" DOCS="README BLURB DISCLAIMER CHANGES README.IRIX README.NIS" @@ -186,13 +186,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 @@ -214,8 +236,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 @@ -264,7 +286,7 @@ install -m 644 $i.8 $mandir/man8 done install -d $P/etc - cat <<- "EOF" > $P/etc/hosts.allow.dist + cat <<- "EOF" > $P/etc/hosts.allow.new # # hosts.allow This file describes the names of the hosts which are # allowed to use the local INET services, as decided by @@ -278,7 +300,7 @@ ALL : LOCAL # End of hosts.allow. EOF - cat <<- "EOF" > $P/etc/hosts.deny.dist + cat <<- "EOF" > $P/etc/hosts.deny.new # # hosts.deny This file describes the names of the hosts which are # *not* allowed to use the local INET services, as decided @@ -315,14 +337,14 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - install -d $P/install cat <<- "EOF" >> $P/install/doinst.sh + hosts_config() { + mv etc/hosts.$1.new /tmp if [ -f etc/hosts.$1 ] ; then - rm etc/hosts.$1.dist + mv /tmp/hosts.$1.new etc/hosts.$1.dist else - mv etc/hosts.$1.dist /tmp - mv /tmp/hosts.$1.dist etc/hosts.$1 + mv /tmp/hosts.$1.new etc/hosts.$1 fi } --- plamo/00_base/old/tcsh-20160126/PlamoBuild.tcsh-6.19.00 2016-01-26 13:00:32.000000000 +0900 +++ plamo/00_base/tcsh/PlamoBuild.tcsh-6.19.00 2016-04-09 21:13:31.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=tcsh vers=6.19.00 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers OPT_CONFIG="" DOCS="BUGS Copyright FAQ Fixes NewThings Ported README README.imake --- plamo/00_base/old/timezone-20160609/PlamoBuild.timezone-2015g 2016-06-09 08:15:41.000000000 +0900 +++ plamo/00_base/timezone/PlamoBuild.timezone-2016f 2016-09-10 23:56:28.000000000 +0900 @@ -1,16 +1,18 @@ #!/bin/sh ###################################################################### -url="http://www.iana.org/time-zones/repository/releases/tzcode2015g.tar.gz - http://www.iana.org/time-zones/repository/releases/tzdata2015g.tar.gz +url="http://www.iana.org/time-zones/repository/releases/tzcode2016f.tar.gz + http://www.iana.org/time-zones/repository/releases/tzdata2016f.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/timezone/plamo_timeconfig.tar.gz" pkgbase=timezone -vers=2015g +vers=2016f arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" -DOCS="CONTRIBUTING NEWS README Theory tz-art.htm tz-link.htm" +DOCS="CONTRIBUTING LICENSE NEWS README Theory tz-art.htm + tz-how-to.html tz-link.htm" ###################################################################### fscheck() { @@ -218,9 +220,9 @@ xz|txz) tar xvpJf ${i##*/} ;; esac done - mkdir timezone-2015g - tar xvpzf tzcode2015g.tar.gz -C timezone-2015g - tar xvpzf tzdata2015g.tar.gz -C timezone-2015g + mkdir timezone-2016f + tar xvpzf tzcode2016f.tar.gz -C timezone-2016f + tar xvpzf tzdata2016f.tar.gz -C timezone-2016f tar xvpzf plamo_timeconfig.tar.gz fi if [ $opt_config -eq 1 ] ; then @@ -229,6 +231,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -269,6 +282,7 @@ done install -d $P/usr/sbin install $W/plamo_timeconfig/usr/sbin/timeconfig $P/usr/sbin + mv $P/usr/share/zoneinfo{,.new} install -d $P/var/log/setup for i in {,e}setup.timeconfig ; do install $W/plamo_timeconfig/var/log/setup/$i $P/var/log/setup @@ -298,9 +312,22 @@ touch -t `date '+%m%d0900'` $docdir/$src convert prune_symlink $P/usr/share + cat <<- "EOF" >> $P/install/doinst.sh + + if [ -h usr/share/zoneinfo/localtime ] ; then + ln -sf `readlink usr/share/zoneinfo/localtime` \ + usr/share/zoneinfo.new/localtime + fi + mkdir usr/share/zoneinfo.tmp + mv usr/share/zoneinfo.new usr/share/zoneinfo.tmp + rm -rf usr/share/zoneinfo + mv usr/share/zoneinfo.tmp/zoneinfo.new usr/share/zoneinfo + rmdir usr/share/zoneinfo.tmp + 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/$libdir | tail -n+2` - tar rvpf $pkg.tar -C $P usr/share/zoneinfo{,-posix,-leaps} + tar rvpf $pkg.tar -C $P usr/share/zoneinfo{.new,-posix,-leaps} tar rvpf $pkg.tar -C $P var/log/setup 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` --- plamo/00_base/old/udev-20160119/PlamoBuild.udev-175 2016-01-19 08:49:58.000000000 +0900 +++ plamo/00_base/udev/PlamoBuild.udev-175 2016-11-20 17:07:07.000000000 +0900 @@ -1,16 +1,19 @@ #!/bin/sh ###################################################################### -url="http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/udev-175.tar.bz2" +url="https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-175.tar.xz" pkgbase=udev vers=175 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers -OPT_CONFIG="--libexecdir=/lib/udev --sysconfdir=/etc +patchfiles="" +OPT_CONFIG="--libexecdir=/lib/udev --enable-static --disable-introspection --enable-rule_generator" DOCS="README extras/keymap/README.keymap.txt INSTALL ChangeLog NEWS TODO COPYING" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -187,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 +228,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -210,8 +246,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]} \ --with-rootlibdir=/$libdir fi @@ -264,9 +300,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/00_base/old/util_linux-21060427/PlamoBuild.util_linux-2.28 2016-04-27 07:35:14.000000000 +0900 +++ plamo/00_base/util_linux/PlamoBuild.util_linux-2.29 2016-11-21 17:39:19.000000000 +0900 @@ -1,17 +1,20 @@ #!/bin/sh ###################################################################### -url="http://www.kernel.org/pub/linux/utils/util-linux/v2.28/util-linux-2.28.tar.xz" +url="https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-2.29.tar.xz" pkgbase=util_linux -vers=2.28 +vers=2.29 arch=`uname -m` build=P1 src=util-linux-$vers -OPT_CONFIG="--localstatedir=/var --disable-setpriv --disable-last - --disable-mesg --disable-chfn-chsh --disable-login --disable-nologin +patchfiles="" +OPT_CONFIG="--disable-setpriv --disable-last --disable-mesg + --disable-chfn-chsh --disable-login --disable-nologin --disable-sulogin --disable-su --enable-write --disable-pylibmount --without-user --without-python" DOCS="COPYING ABOUT-NLS ChangeLog README NEWS README.licensing AUTHORS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -189,14 +192,22 @@ if [ $opt_download -eq 1 ] ; then for i in $url ; do if [ ! -f ${i##*/} ] ; then - wget $i - for sig in asc sig{,n} {md5,sha{1,256}}{,sum} ; do + 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 ;; - md5|sha1|sha256) ${sig}sum -c ${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 @@ -207,8 +218,8 @@ case ${i##*.} in tar) tar xvpf ${i##*/} ;; gz|tgz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -218,6 +229,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -225,8 +247,8 @@ rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir=/$libdir \ - --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir=/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -277,9 +299,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done @@ -288,9 +324,9 @@ chown -R root.root $docdir/$src/Documentation mv $docdir/util-linux/getopt $docdir/$src mv $docdir/$src/{Documentation,{README,NEWS}.gz,getopt} $C - mv $docdir/$src/{README.licensing,AUTHORS,$myname}.gz $C + mv $docdir/$src/{README.licensing,AUTHORS,$myname,$spec}.gz $C mv $C/{Documentation,{README,NEWS}.gz,getopt} $docdir/$src - mv $C/{README.licensing,AUTHORS,$myname}.gz $docdir/$src + mv $C/{README.licensing,AUTHORS,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src convert tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` --- plamo/00_base/old/xz-20160105/PlamoBuild.xz-5.0.3 2016-01-05 23:30:07.000000000 +0900 +++ plamo/00_base/xz/PlamoBuild.xz-5.2.2 2016-01-26 13:46:29.000000000 +0900 @@ -1,16 +1,16 @@ #!/bin/sh ###################################################################### -url="http://tukaani.org/xz/xz-5.0.3.tar.xz" +url="http://tukaani.org/xz/xz-5.2.2.tar.xz" pkgbase=xz -vers=5.0.3 +vers=5.2.2 arch=`uname -m` -build=P5 +build=P2 src=$pkgbase-$vers OPT_CONFIG="" DOCS="PACKAGERS INSTALL.generic COPYING.LGPLv2.1 COPYING.GPLv3 INSTALL - ChangeLog ABOUT-NLS TODO THANKS NEWS COPYING.GPLv2 COPYING AUTHORS - README" + ChangeLog ABOUT-NLS TODO THANKS README NEWS COPYING.GPLv2 COPYING + AUTHORS" ###################################################################### fscheck() { @@ -265,10 +265,11 @@ fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done - mv $docdir/xz/{{faq,history,{xz,lzma}-file-format}.txt,examples} $docdir/$src - mv $docdir/$src/{{faq,history,{xz,lzma}-file-format}.txt,examples} $C + mv $docdir/xz/{{faq,history,{xz,lzma}-file-format}.txt,examples*} \ + $docdir/$src + mv $docdir/$src/{{faq,history,{xz,lzma}-file-format}.txt,examples*} $C mv $docdir/$src/$myname.gz $C - mv $C/{{faq,history,{xz,lzma}-file-format}.txt,examples} $docdir/$src + mv $C/{{faq,history,{xz,lzma}-file-format}.txt,examples*} $docdir/$src mv $C/$myname.gz $docdir/$src touch -r $S $docdir/$src convert --- plamo/00_base/old/sysvinit-20160908/PlamoBuild.sysvinit-2.88dsf 2016-09-08 21:00:03.000000000 +0900 +++ plamo/00_base/sysvinit/PlamoBuild.sysvinit-2.88dsf 2017-05-02 11:05:13.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/sysvinit/plamo-rc-scripts-20160908.tgz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/sysvinit/plamo-rc-scripts-20160908.tgz" +verify= +digest= +commitid= pkgbase=sysvinit vers=2.88dsf arch=`uname -m` -build=P18 +build=P19 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="doc/bootlogd.README doc/Install doc/Changelog doc/Propaganda +DOCS="`echo doc/{bootlogd.README,Install,Changelog,Propaganda}` COPYING COPYRIGHT Makefile README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -303,29 +95,13 @@ compress cp -a etc $P chown -R root.root $P/etc - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/etc/rc.d touch -r etc/rc.d $P/etc/rc.d cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $src - EOF + EOF cat <<- "EOF" >> $P/install/doinst.sh vers=`ls /usr/lib/setup/Plamo* | tail -n1 | cut -d"/" -f5` echo "%s %r ($vers) %v" > /etc/motd.in @@ -344,6 +120,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/less-20160409/PlamoBuild.less-382 2016-04-09 20:52:10.000000000 +0900 +++ plamo/00_base/less/PlamoBuild.less-382 2017-04-07 16:07:12.000000000 +0900 @@ -8,204 +8,40 @@ ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/less-382-iso260-261.patch.gz ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/less-382-iso261-262.patch.gz ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/less-382-iso262.ext03.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/less/less-382-def_priority.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/less/less-382-def_priority.patch.gz" +verify= +commitid= pkgbase=less vers=382 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="COPYING INSTALL LICENSE NEWS README" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B gunzip -c $W/less-382-iso258.patch.gz | patch -Np1 -fT -i - gunzip -c $W/less-382-iso258-259.patch.gz | patch -Np1 -i - @@ -221,15 +57,9 @@ -e '/\/mkinstalldirs/s@\${mandir@$(DESTDIR)&@g' Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -243,12 +73,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -321,23 +146,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -p $B/{LICENSE,README.{iso{,.jp},ext.jp}} $docdir/$src chmod 644 $docdir/$src/LICENSE chown root.root $docdir/$src/{LICENSE,README.{iso{,.jp},ext.jp}} @@ -347,15 +156,16 @@ for i in LICENSE README.{iso{,.jp},ext.jp} ; do gzip_one $docdir/$src/$i done - mv $docdir/$src/{README.{iso{,.jp},ext.jp},$myname}.gz $C - mv $C/{README.{iso{,.jp},ext.jp},$myname}.gz $docdir/$src + mv $docdir/$src/README.{iso{,.jp},ext.jp}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C + mv $C/README.{iso{,.jp},ext.jp}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/shadow-20170227/PlamoBuild.shadow-git_20130908 2017-02-27 13:11:05.000000000 +0900 +++ plamo/00_base/shadow/PlamoBuild.shadow-git_20130908 2017-04-30 17:46:49.000000000 +0900 @@ -4,248 +4,40 @@ url="https://github.com/shadow-maint/shadow.git ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/shadow/CVE-2017-2616.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/shadow/shadow-adduser-20160122" +verify= +digest= +commitid[0]=578947e pkgbase=shadow vers=git_20130908 arch=`uname -m` -build=P6 +build=P7 src=$pkgbase patchfiles="CVE-2017-2616.patch.gz" OPT_CONFIG="--enable-man --without-selinux --with-libcrack" DOCS="COPYING ChangeLog NEWS README TODO" -template=20170204 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; else - ( cd `basename ${i##*/} .git` ; git pull origin master ) ; 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 - ;; - esac - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard 578947e - git set-file-times ) ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p etc/pam.d/chfn etc/pam.d/chfn.orig cat <<- "EOF" | patch etc/pam.d/chfn @@ -369,12 +161,6 @@ ./autogen.sh for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -391,12 +177,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -423,39 +204,9 @@ gzip_dir $P/usr/share/man/$loc/man5 gzip_dir $P/usr/share/man/$loc/man8 done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg EOF @@ -477,7 +228,7 @@ tar rvpf $pkg.tar -C $P etc/pam.d tar rvpf $pkg.tar -C $P etc/login.defs tar rvpf $pkg.tar -C $P etc/default - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name shadow.mo` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` for loc in cs da de fi fr hu id it ja_JP.eucJP ko pl pt_BR ru sv tr \ zh_CN zh_TW ; do [ -d $P/usr/share/man/$loc/man1 ] && tar rvpf $pkg.tar -C $P \ @@ -497,6 +248,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/kernel-20160204/PlamoBuild.kernel-4.1.15_plamoRPi2 2016-02-04 17:54:58.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.1.15_plamoRPi2 2016-02-19 08:11:19.000000000 +0900 @@ -13,7 +13,7 @@ pkgbase=kernel vers=4.1.15_plamoRPi2 arch=`uname -m` -build=P2 +build=P3 src=linux OPT_CONFIG="" DOCS="" @@ -292,8 +292,8 @@ install -m 644 $B/arch/arm/boot/dts/overlays/README $P/boot/overlays install -m 644 $B/arch/arm/boot/dts/overlays/*.dtb $P/boot/overlays install -m 644 $B/arch/arm/boot/dts/*.dtb $P/boot - ln -sf /usr/src/linux $P/lib/modules/$krel/source - ln -sf /usr/src/linux $P/lib/modules/$krel/build + ln -snf /usr/src/linux $P/lib/modules/$krel/source + ln -snf /usr/src/linux $P/lib/modules/$krel/build touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/00_base/old/kernel-20160219/PlamoBuild.kernel-4.1.15_plamoRPi2 2016-02-19 08:11:19.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.9.36_plamoRPi2 2017-07-27 11:35:43.000000000 +0900 @@ -1,224 +1,55 @@ #!/bin/sh -x ###################################################################### -url="https://github.com/raspberry/linux.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20150627-4.1.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.36.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20161217-4.9.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.9.36-20170705-3ecb1db.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.9.36-plamo@LV@" +verify= +digest= +branch[3]=aufs4.9 +commitid[3]=c8baf66 pkgbase=kernel -vers=4.1.15_plamoRPi2 +vers=4.9.36_plamo@LV@ arch=`uname -m` -build=P3 -src=linux +build=P1 +src=linux-4.9.36 +patchfiles="" OPT_CONFIG="" DOCS="" +template=20170713 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +case `uname -m` in i686) lv=SMP ;; x86_64) lv=64 ;; armv7l) lv=RPi2 ;; esac +url=${url/@LV@/$lv} ; vers=${vers/@LV@/$lv} +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; fi ;; - *) if [ ! -f ${i##*/} ] ; then wget $i ; fi ;; - esac - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - case `basename ${i##*/} .git` in - linux) git checkout origin/rpi-4.1.y ; git reset --hard d51c7d8 ;; - aufs4-*) git checkout origin/aufs4.1 ; git reset --hard 2b569cf ;; - esac ) ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - rm -rf .git ; touch .git - patch -Np1 -i $W/vd_unicon-kernel-20150627-4.1.patch + patch -Np1 -i $W/vd_unicon-kernel-20161217-4.9.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -227,14 +58,30 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.1-panic_beep.patch - patch -Np1 -i $W/4.1-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.9-panic_beep.patch + patch -Np1 -i $W/4.9-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 | patch -Np1 -i - + chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - cp -p $W/config-4.1.15-plamoRPi2 .config - cp -p arch/arm/boot/install.sh{,.orig} - sed -i '/INSTALLKERNEL/s@^@#@g' arch/arm/boot/install.sh - cat <<- "EOF" | patch arch/arm/boot/install.sh + if [ `uname -m` == armv7l ] ; then + unxz -c $W/rpi-4.9.36-20170705-3ecb1db.patch.xz | patch -Np1 -i - + chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} + chmod 755 scripts/{knlinfo,mkknlimg} + fi + cp -p $W/config-4.9.36-plamo$lv .config + if [ $arch == i686 -o $arch == x86_64 ] ; then + cp -p arch/x86/boot/install.sh{,.orig} + head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh + sed -i '/INSTALLKERNEL/s@^@#@g' arch/x86/boot/install.sh + cat <<- "EOF" | patch arch/x86/boot/install.sh + 48a49 + > cp .config $4/config-$1 + EOF + sed -i '/\(vmlinuz\|System.map\)$/s@$@-\$1@g' arch/x86/boot/install.sh + else + cp -p arch/arm/boot/install.sh{,.orig} + sed -i '/INSTALLKERNEL/s@^@#@g' arch/arm/boot/install.sh + cat <<- "EOF" | patch arch/arm/boot/install.sh 40a41,42 > cp .config $4/config-$1 > @@ -243,17 +90,12 @@ --- > scripts/mkknlimg $2 $4/kernel7.img-$1 EOF + fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -267,12 +109,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,45 +117,36 @@ cd ${B[$i]} if [ -f Makefile ] ; then install -d $P/boot - make zinstall INSTALL_PATH=$P/boot + make `[ $arch == armv7l ] && echo z`install INSTALL_PATH=$P/boot make modules_install INSTALL_MOD_PATH=$P fi done krel=${vers//_/-} - cp -p $P/boot/config{-$krel,} - cp -p $P/boot/kernel7.img{-$krel,} - cp -p $P/boot/System.map{-$krel,} - install -d $P/boot/overlays - install -m 644 $B/arch/arm/boot/dts/overlays/README $P/boot/overlays - install -m 644 $B/arch/arm/boot/dts/overlays/*.dtb $P/boot/overlays - install -m 644 $B/arch/arm/boot/dts/*.dtb $P/boot - ln -snf /usr/src/linux $P/lib/modules/$krel/source - ln -snf /usr/src/linux $P/lib/modules/$krel/build + if [ $arch == i686 -o $arch == x86_64 ] ; then + ln -s config-$krel $P/boot/config + ln -s vmlinuz-$krel $P/boot/vmlinuz + ln -s System.map-$krel $P/boot/System.map + else + cp -p $P/boot/config{-$krel,} + cp -p $P/boot/kernel7.img{-$krel,} + cp -p $P/boot/System.map{-$krel,} + install -m 644 $B/arch/arm/boot/Image $P/boot/Image-$krel + install -m 644 $B/arch/arm/boot/dts/*.dtb $P/boot + install -d $P/boot/overlays + install -m 644 $B/arch/arm/boot/dts/overlays/README $P/boot/overlays + install -m 644 $B/arch/arm/boot/dts/overlays/*.dtbo $P/boot/overlays + fi + ln -sfn /usr/src/linux $P/lib/modules/$krel/source + ln -sfn /usr/src/linux $P/lib/modules/$krel/build touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - install -d $docdir/$src - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - touch -t `date '+%m%d0900'` $docdir/$src - convert + install -d $docdir/$src + setup_docdir + convert_links + prune_symlink $P/boot prune_symlink $P/lib/modules/$krel touch -t `date '+%m%d0900'` $P/lib/modules/$krel tar cvpf $pkg.tar -C $P `cd $P ; find boot -maxdepth 1 | tail -n+2` @@ -328,6 +156,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/kernel-20170727/PlamoBuild.kernel-4.9.36_plamoRPi2 2017-07-27 11:35:43.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.10.17_plamoRPi2 2017-08-13 17:43:47.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.36.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20161217-4.9.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.17.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170225-4.10.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.9.36-20170705-3ecb1db.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.9.36-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.10.17-20170521-78cfe36.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.10.17-plamo@LV@" verify= digest= -branch[3]=aufs4.9 -commitid[3]=c8baf66 +branch[3]=aufs4.10 +commitid[3]=a19543b pkgbase=kernel -vers=4.9.36_plamo@LV@ +vers=4.10.17_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.9.36 +src=linux-4.10.17 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20161217-4.9.patch + patch -Np1 -i $W/vd_unicon-kernel-20170225-4.10.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.9-panic_beep.patch - patch -Np1 -i $W/4.9-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.10-panic_beep.patch + patch -Np1 -i $W/4.10-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.9.36-20170705-3ecb1db.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.10.17-20170521-78cfe36.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.9.36-plamo$lv .config + cp -p $W/config-4.10.17-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh @@ -85,10 +85,11 @@ 40a41,42 > cp .config $4/config-$1 > - 54c56 + 54c56,57 < cat $2 > $4/$base-$1 --- > scripts/mkknlimg $2 $4/kernel7.img-$1 + > cat ${2/zImage/Image} > $4/Image-$1 EOF fi for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -130,7 +131,6 @@ cp -p $P/boot/config{-$krel,} cp -p $P/boot/kernel7.img{-$krel,} cp -p $P/boot/System.map{-$krel,} - install -m 644 $B/arch/arm/boot/Image $P/boot/Image-$krel install -m 644 $B/arch/arm/boot/dts/*.dtb $P/boot install -d $P/boot/overlays install -m 644 $B/arch/arm/boot/dts/overlays/README $P/boot/overlays --- plamo/00_base/old/libgcc-20160128/PlamoBuild.libgcc-4.8.5 2016-01-28 13:05:06.000000000 +0900 +++ plamo/00_base/libgcc/PlamoBuild.libgcc-4.8.5 2017-04-08 16:45:17.000000000 +0900 @@ -2,12 +2,15 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - https://patchwork.ozlabs.org/patch/342434/mbox" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +verify= +commitid= pkgbase=libgcc vers=4.8.5 arch=`uname -m` -build=P2 +build=P3 src=gcc-$vers +patchfiles="gcc-4.8-filename-output.patch" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -15,214 +18,34 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s extglob nullglob - cd $1 - for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=gcc-4.8-filename-output.patch - for i in $url ; do - if [ ${i##*/} == mbox ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -f ${i##*/} ] ; then - wget $i - fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np0 -i $W/gcc-4.8-filename-output.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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]} \ --libexecdir=/usr/$libdir \ --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ @@ -239,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -266,29 +84,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/glibc-20161209/PlamoBuild.glibc-2.20 2016-12-09 19:27:29.000000000 +0900 +++ plamo/00_base/glibc/PlamoBuild.glibc-2.20 2017-04-05 20:52:20.000000000 +0900 @@ -11,10 +11,12 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8776.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8778.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8779.patch" +verify= +commitid= pkgbase=glibc vers=2.20 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch @@ -23,232 +25,37 @@ OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS PROJECTS README" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` - S2[$i]=$W/source`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" +S2=$W/source if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do if [ -d ${S2[$i]} ] ; then rm -rf ${S2[$i]} ; fi ; cp -a ${S[$i]} ${S2[$i]} if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; mkdir ${B[$i]} done - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${S2[$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 + false && apply_patches + cd $S2 + for j in $patchfiles ; do + case ${j##*.} in + gz) gunzip -c $W/$j | patch -Np1 -i - ;; + *) patch -Np1 -i $W/$j ;; + esac done cp -p localedata/Makefile{,.orig} cat <<- "EOF" | patch localedata/Makefile @@ -256,13 +63,6 @@ > --no-archive \ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${S2[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi cd ${B[$i]} case $arch in i686) @@ -297,12 +97,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -370,38 +165,8 @@ strip_bindir $P/usr/$libdir/glibc/getconf strip_libdir $P/usr/$libdir/audit touch -t `date '+%m%d0900'` $P/usr/$libdir/{gconv,glibc/getconf,audit} - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/usr/share/locale touch -t `date '+%m%d0900'` $P/usr/share/locale cat <<- EOF >> $P/install/doinst.sh @@ -453,6 +218,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/coreutils-20160710/PlamoBuild.coreutils-8.25 2016-07-10 10:52:28.000000000 +0900 +++ plamo/00_base/coreutils/PlamoBuild.coreutils-8.25 2017-04-01 19:22:35.000000000 +0900 @@ -2,10 +2,12 @@ ###################################################################### url="http://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz" +verify= +commitid= pkgbase=coreutils vers=8.25 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-install-program=arch @@ -13,229 +15,29 @@ DOCS="COPYING TODO INSTALL THANKS ChangeLog-2006 ChangeLog-2008 NEWS ChangeLog ChangeLog-2007 README ChangeLog-2005 AUTHORS ABOUT-NLS THANKS-to-translators" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p po/Makevars{,.orig} sed 's@EXTRA_LOCALE_CATEGORIES@#&@g' po/Makevars.orig > po/Makevars @@ -246,12 +48,6 @@ fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -268,12 +64,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -297,24 +88,8 @@ compress strip_libdir $P/usr/libexec/coreutils touch -t `date '+%m%d0900'` $P/usr/libexec/coreutils - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/usr/share/locale tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` @@ -327,6 +102,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/tar-20161124/PlamoBuild.tar-1.26 2016-11-24 09:05:00.000000000 +0900 +++ plamo/00_base/tar/PlamoBuild.tar-1.26 2017-05-02 11:16:38.000000000 +0900 @@ -5,248 +5,43 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.23-tartime.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.23-txz.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.26-no-gets.patch.gz" +verify= +digest= +commitid= pkgbase=tar vers=1.26 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="`echo tar-1.2{3-{tartime,txz},6-no-gets}.patch.gz`" OPT_CONFIG="" DOCS="NEWS TODO README THANKS ChangeLog.1 AUTHORS INSTALL ABOUT-NLS ChangeLog COPYING" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -284,38 +74,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_bindir $P/usr/libexec - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/libexec | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -323,6 +83,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/glibc-20170405/PlamoBuild.glibc-2.20 2017-04-05 20:52:20.000000000 +0900 +++ plamo/00_base/glibc/PlamoBuild.glibc-2.20 2017-11-01 10:21:04.000000000 +0900 @@ -12,11 +12,13 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8778.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8779.patch" verify= +digest= +branch= commitid= pkgbase=glibc vers=2.20 arch=`uname -m` -build=P6 +build=P7 src=$pkgbase-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch @@ -25,7 +27,7 @@ OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS PROJECTS README" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/00_base/old/hdsetup-20170220/PlamoBuild.hdsetup-6.2 2017-02-20 15:05:53.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.2 2017-04-07 13:06:40.000000000 +0900 @@ -13,10 +13,12 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.23-txz.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.26-no-gets.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" +verify= +commitid= pkgbase=hdsetup vers=6.2 arch=`uname -m` -build=P1 +build=P2 src[0]=busybox-1.25.1 src[1]=dialog-1.3-20160828 src[2]=coreutils-8.25 @@ -24,14 +26,9 @@ src[4]=bzip2-1.0.6 src[5]=xz-5.2.2 src[6]=tar-1.26 -patchfiles[0]="" -patchfiles[1]="" -patchfiles[2]="" -patchfiles[3]="" -patchfiles[4]="" -patchfiles[5]="" +patchfiles="" patchfiles[6]="`echo tar-1.2{3-{tartime,txz},6-no-gets}.patch.gz`" -OPT_CONFIG[0]="" +OPT_CONFIG="" OPT_CONFIG[1]="--bindir=/bin --enable-nls --with-ncursesw --enable-widec" OPT_CONFIG[2]="--bindir=/bin --enable-no-install-program=chroot,hostid,nice" OPT_CONFIG[2]+=",who,users,pinky,uptime,stty,df,stdbuf,[,base64,base32" @@ -46,246 +43,37 @@ OPT_CONFIG[2]+=",tty,uname,unexpand,uniq,unlink,vdir,wc,whoami,yes --without-gmp" OPT_CONFIG[3]="--bindir=/bin" -OPT_CONFIG[4]="" OPT_CONFIG[5]="--bindir=/bin --disable-xzdec --disable-lzmadec --disable-lzmainfo --disable-lzma-links --disable-scripts" OPT_CONFIG[6]="--bindir=/bin" DOCS="LICENSE INSTALL TODO AUTHORS README TODO_unicode" -template=20170204 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd ${B[0]} cp -p $W/busybox-1.25.1-config .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f [Mm]akefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -308,12 +96,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -343,37 +126,7 @@ compress strip_bindir $P/sbin/installer touch -t `date '+%m%d0900'` $P/sbin/installer - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/docs $docdir/$src for i in busybox.pod BusyBox.txt busybox.{1,net} BusyBox.html ; do cp -a $B/docs/$i $docdir/$src/docs @@ -383,16 +136,15 @@ touch -r $S/docs $docdir/$src/docs chown -R root.root $docdir/$src/docs mv $docdir/$src/{docs,{INSTALL,TODO,AUTHORS,README}.gz} $C - mv $docdir/$src/{TODO_unicode,$myname,$spec}.gz $C + mv $docdir/$src/{TODO_unicode,$func,$myname,$spec}.gz $C mv $C/{docs,{INSTALL,TODO,AUTHORS,README}.gz} $docdir/$src - mv $C/{TODO_unicode,$myname,$spec}.gz $docdir/$src + mv $C/{TODO_unicode,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/lib/setup tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/sysvinit-20170502/PlamoBuild.sysvinit-2.88dsf 2017-05-02 11:05:13.000000000 +0900 +++ plamo/00_base/sysvinit/PlamoBuild.sysvinit-2.88dsf 2017-05-07 23:16:02.000000000 +0900 @@ -9,7 +9,7 @@ pkgbase=sysvinit vers=2.88dsf arch=`uname -m` -build=P19 +build=P20 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -101,7 +101,7 @@ touch -r etc/rc.d $P/etc/rc.d cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $src - EOF + EOF cat <<- "EOF" >> $P/install/doinst.sh vers=`ls /usr/lib/setup/Plamo* | tail -n1 | cut -d"/" -f5` echo "%s %r ($vers) %v" > /etc/motd.in --- plamo/00_base/old/shadow-20170430/PlamoBuild.shadow-git_20130908 2017-04-30 17:46:49.000000000 +0900 +++ plamo/00_base/shadow/PlamoBuild.shadow-git_20130908 2017-06-24 14:34:20.000000000 +0900 @@ -39,17 +39,17 @@ done apply_patches cd $B - cp -p etc/pam.d/chfn etc/pam.d/chfn.orig + cp -p etc/pam.d/chfn{,.orig} cat <<- "EOF" | patch etc/pam.d/chfn 2a3 > auth include system-auth EOF - cp -p etc/pam.d/chsh etc/pam.d/chsh.orig + cp -p etc/pam.d/chsh{,.orig} cat <<- "EOF" | patch etc/pam.d/chsh 2a3 > auth include system-auth EOF - cp -p etc/pam.d/login etc/pam.d/login.orig + cp -p etc/pam.d/login{,.orig} cat <<- "EOF" | patch etc/pam.d/login 7c7 < session required pam_selinux.so close @@ -64,7 +64,7 @@ > session required pam_lastlog.so > session optional pam_ck_connector.so nox11 EOF - cp -p etc/pam.d/su etc/pam.d/su.orig + cp -p etc/pam.d/su{,.orig} cat <<- "EOF" | patch etc/pam.d/su 6c6 < auth required pam_wheel.so use_uid @@ -79,15 +79,15 @@ --- > #session required pam_selinux.so open multiple EOF - cp -p etc/pam.d/chage etc/pam.d/chage.orig + cp -p etc/pam.d/chage{,.orig} cat <<- "EOF" | patch etc/pam.d/chage 2a3 > auth include system-auth EOF - cp -p etc/useradd etc/useradd.orig + cp -p etc/useradd{,.orig} sed '/^GROUP=/s@1000@100@g' etc/useradd.orig \ | sed '/^CREATE_MAIL_SPOOL=/s@yes@no@g' > etc/useradd - cp -p etc/login.defs etc/login.defs.orig + cp -p etc/login.defs{,.orig} cat <<- "EOF" | patch etc/login.defs 17c17 < FAILLOG_ENAB yes @@ -231,13 +231,13 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` for loc in cs da de fi fr hu id it ja_JP.eucJP ko pl pt_BR ru sv tr \ zh_CN zh_TW ; do - [ -d $P/usr/share/man/$loc/man1 ] && tar rvpf $pkg.tar -C $P \ + [ -d $mandir/$loc/man1 ] && tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/man/$loc/man1 | tail -n+2` - [ -d $P/usr/share/man/$loc/man3 ] && tar rvpf $pkg.tar -C $P \ + [ -d $mandir/$loc/man3 ] && tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/man/$loc/man3 | tail -n+2` - [ -d $P/usr/share/man/$loc/man5 ] && tar rvpf $pkg.tar -C $P \ + [ -d $mandir/$loc/man5 ] && tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/man/$loc/man5 | tail -n+2` - [ -d $P/usr/share/man/$loc/man8 ] && tar rvpf $pkg.tar -C $P \ + [ -d $mandir/$loc/man8 ] && tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/man/$loc/man8 | tail -n+2` done tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` --- plamo/00_base/old/sudo-20160607/PlamoBuild.sudo-1.8.15 2016-06-07 14:15:45.000000000 +0900 +++ plamo/00_base/sudo/PlamoBuild.sudo-1.8.15 2017-05-02 09:58:11.000000000 +0900 @@ -2,236 +2,47 @@ ###################################################################### url="http://www.sudo.ws/sudo/dist/sudo-1.8.15.tar.gz" +verify= +digest= +commitid= pkgbase=sudo vers=1.8.15 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--with-pam --without-sendmail --with-env-editor --with-all-insults --with-hal-insults --with-secure-path" DOCS="ABOUT-NLS ChangeLog INSTALL* MANIFEST NEWS README* `echo doc/{CONTRIBUTORS,HISTORY,LICENSE,TROUBLESHOOTING,UPGRADE}`" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $P/usr/libexec/sudo - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches + cd $B + cp -p plugins/sudoers/sudoers.in{,.orig} + sed -i 's/ *$//' plugins/sudoers/sudoers.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -248,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,28 +85,14 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/libexec/sudo - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/sudo/examples $docdir/$src - mv $docdir/$src/{examples,$myname.gz} $C - mv $C/{examples,$myname.gz} $docdir/$src + mv $docdir/$src/{examples,{$func,$myname,$spec}.gz} $C + mv $C/{examples,{$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src{,/doc} - convert + false && convert_links + for i in $P/usr/{sbin,bin,libexec/sudo} ; do prune_symlink $i ; done + for i in 5 8 ; do prune_symlink $mandir/man$i ; done touch -t `date '+%m%d0900'` $P/usr/libexec/sudo cat <<- "EOF" >> $P/install/doinst.sh @@ -316,7 +108,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/libexec/sudo tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` - 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/locale -name *.mo` tar rvpf $pkg.tar -C $P `cd $P ; find etc -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P var/{run,db}/sudo tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man5 | tail -n+2` @@ -325,6 +117,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/dhcp-20160606/PlamoBuild.dhcp-4.3.3 2016-06-06 06:43:26.000000000 +0900 +++ plamo/00_base/dhcp/PlamoBuild.dhcp-4.3.3 2017-04-01 20:11:15.000000000 +0900 @@ -2,225 +2,39 @@ ###################################################################### url="http://ftp.isc.org/isc/dhcp/4.3.3/dhcp-4.3.3.tar.gz" +verify= +commitid= pkgbase=dhcp vers=4.3.3 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="LICENSE README RELNOTES" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p client/scripts/linux{,.orig} cat <<- "EOF" | patch client/scripts/linux @@ -232,12 +46,6 @@ sed -i '/^script/s@etc@sbin@g' client/dhclient.conf.example for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -254,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +80,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh dhc_config() { @@ -324,6 +111,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/glibc-20171101/PlamoBuild.glibc-2.20 2017-11-01 10:21:04.000000000 +0900 +++ plamo/00_base/glibc/PlamoBuild.glibc-2.20 2018-01-08 06:18:13.000000000 +0900 @@ -18,7 +18,7 @@ pkgbase=glibc vers=2.20 arch=`uname -m` -build=P7 +build=P8 src=$pkgbase-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch @@ -86,7 +86,8 @@ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ --libexecdir=/usr/$libdir/glibc \ - --build=$arch-pc-linux --target=$arch-pc-linux + --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ + --target=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` fi done fi --- plamo/00_base/old/nvi-20160710/PlamoBuild.nvi-1.79 2016-07-10 11:39:09.000000000 +0900 +++ plamo/00_base/nvi/PlamoBuild.nvi-1.79 2017-04-26 06:54:18.000000000 +0900 @@ -3,12 +3,16 @@ ###################################################################### url="http://pkgs.fedoraproject.org/repo/pkgs/nvi-m17n/nvi-1.79.tar.gz/765e2153f5fc4f21793f2edc2647305a/nvi-1.79.tar.gz http://pkgs.fedoraproject.org/repo/pkgs/nvi-m17n/nvi-1.79.m17n-20040401.diff.gz/851650ced51697b3b08400fa75621c97/nvi-1.79.m17n-20040401.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/nvi/nvi-1.79-64bit_breakage.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/nvi/nvi-1.79-DESTDIR.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/nvi/nvi-1.79-64bit_breakage.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/nvi/nvi-1.79-DESTDIR.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/nvi/nvi-cmdwrapper.gz" +verify= +digest= +commitid= pkgbase=nvi vers=1.79 arch=`uname -m` -build=P8 +build=P9 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-multibyte=euc-jp" @@ -20,245 +24,38 @@ `echo docs/internals/{gdb.script,structures,autowrite,quoting}` `echo docs/internals/{input,context,openmode,cscope.NOTES}` docs/changelog docs/tutorial/* `echo build/README{,.LynxOS}` LICENSE" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B chmod -R u+w . gunzip -c $W/nvi-1.79.m17n-20040401.diff.gz | patch -Np0 -i - gunzip -c $W/nvi-1.79-64bit_breakage.patch.gz | patch -Np1 -i - gunzip -c $W/nvi-1.79-DESTDIR.patch.gz | patch -Np1 -i - cp -p build/configure{,.orig} - sed '/^LDFLAGS=/s@$LDFLAGS@${LDFLAGS-"-lncurses"}@g' build/configure.orig \ - > build/configure + sed -i '/^LDFLAGS=/s@$LDFLAGS@${LDFLAGS-"-lncurses"}@g' build/configure for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/build - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -275,12 +72,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,47 +84,7 @@ done install -d $P/usr/libexec mv $P/usr/bin/{vi,ex,view} $P/usr/libexec - cat <<- "EOF" > $P/usr/bin/vi - #!/bin/sh - - optend=0 ; optarg=0 ; nargv=() - for arg in "$@" ; do - file=0 - if [ $optend -eq 1 ] ; then - file=1 - elif [ $optarg -eq 1 ] ; then - optarg=0 - elif [ "${arg:0:1}" == "-" ] ; then - if [ "$arg" == "--" ] ; then - optend=1 - elif [ `expr length "$(expr "$arg" : ".*\([ctw].*\)")"` -eq 1 ] ; then - optarg=1 - fi - elif [ "${arg:0:1}" != "+" ] ; then - file=1 - fi - if [ $file -eq 1 ] ; then - if [ -f "$arg" ] ; then - if [ `nkf -g "$arg"` == UTF-8 ] ; then - temp=`mktemp /tmp/vi.XXXXXX` - nkf -e "$arg" > $temp - touch -r "$arg" $temp - arg=$temp - fi - fi - fi - nargv=("${nargv[@]}" "$arg") - done - /usr/libexec/${0##*/} "${nargv[@]}" - i=0 - for arg in "$@" ; do - if [ "$arg" != "${nargv[$i]}" ] ; then - [ ${nargv[$i]} -nt "$arg" ] && nkf -w ${nargv[$i]} > "$arg" - rm ${nargv[$i]} - fi - let ++i - done - EOF + gunzip -c $W/nvi-cmdwrapper.gz > $P/usr/bin/vi chmod 755 $P/usr/bin/vi ln $P/usr/bin/{vi,ex} ln $P/usr/bin/{vi,view} @@ -343,33 +95,17 @@ compress strip_bindir $P/usr/libexec gzip_dir $mandir/cat1 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir chmod 755 $docdir/$src/docs/tutorial/vi.tut.csh.gz cp -a $B/docs.m17n $docdir/$src chown -R root.root $docdir/$src/docs.m17n find $docdir/$src/docs.m17n -exec touch -t `date '+%m%d0900'` {} \; gzip_dir $docdir/$src/docs.m17n touch -t `date '+%m%d0900'` $docdir/$src/docs.m17n - mv $docdir/$src/{docs.m17n,$myname.gz} $C - mv $C/{docs.m17n,$myname.gz} $docdir/$src + mv $docdir/$src/{docs.m17n,{$func,$myname,$spec}.gz} $C + mv $C/{docs.m17n,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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/libexec | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/vi @@ -378,6 +114,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/kernel-20170813/PlamoBuild.kernel-4.10.17_plamoRPi2 2017-08-13 17:43:47.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.11.12_plamo@LV@ 2017-08-29 16:03:40.000000000 +0900 @@ -1,25 +1,27 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.17.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170225-4.10.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.11.12.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170506-4.11.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/aufs/4.11.12-aufs_fix.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/4.11.12-tuxonice_fix.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.10.17-20170521-78cfe36.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.10.17-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.11.12-20170719-d5c0e92.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.11.12-plamo@LV@" verify= digest= -branch[3]=aufs4.10 -commitid[3]=a19543b +branch[3]=aufs4.11.7+ +commitid[3]=71715aa pkgbase=kernel -vers=4.10.17_plamo@LV@ +vers=4.11.12_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.10.17 +src=linux-4.11.12 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170225-4.10.patch + patch -Np1 -i $W/vd_unicon-kernel-20170506-4.11.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +60,19 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.10-panic_beep.patch - patch -Np1 -i $W/4.10-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.11.12-aufs_fix.patch + patch -Np1 -i $W/4.11-panic_beep.patch + patch -Np1 -i $W/4.11-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.11.12-tuxonice_fix.patch chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.10.17-20170521-78cfe36.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.11.12-20170719-d5c0e92.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.10.17-plamo$lv .config + cp -p $W/config-4.11.12-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh @@ -85,11 +89,10 @@ 40a41,42 > cp .config $4/config-$1 > - 54c56,57 + 54c56 < cat $2 > $4/$base-$1 --- > scripts/mkknlimg $2 $4/kernel7.img-$1 - > cat ${2/zImage/Image} > $4/Image-$1 EOF fi for i in `seq 0 $((${#B[@]} - 1))` ; do --- plamo/00_base/old/kernel-20170829/PlamoBuild.kernel-4.11.12_plamo@LV@ 2017-08-29 16:03:40.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.12.14_plamo@LV@ 2018-12-01 09:43:44.000000000 +0900 @@ -1,31 +1,29 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.11.12.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170506-4.11.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.12.14.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170708-4.12.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/aufs/4.11.12-aufs_fix.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/4.11.12-tuxonice_fix.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.11.12-20170719-d5c0e92.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.11.12-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.12.14-20170906-6fe4193.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.12.14-plamo@LV@" verify= digest= -branch[3]=aufs4.11.7+ -commitid[3]=71715aa +branch[3]=aufs4.12 +commitid[3]=31266c0 pkgbase=kernel -vers=4.11.12_plamo@LV@ +vers=4.12.14_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.11.12 +src=linux-4.12.14 patchfiles="" OPT_CONFIG="" DOCS="" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -51,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170506-4.11.patch + patch -Np1 -i $W/vd_unicon-kernel-20170708-4.12.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -60,19 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.11.12-aufs_fix.patch - patch -Np1 -i $W/4.11-panic_beep.patch - patch -Np1 -i $W/4.11-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/4.11.12-tuxonice_fix.patch + patch -Np1 -i $W/4.12-panic_beep.patch + patch -Np1 -i $W/4.12-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.11.12-20170719-d5c0e92.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.12.14-20170906-6fe4193.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.11.12-plamo$lv .config + cp -p $W/config-4.12.14-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh @@ -143,21 +139,21 @@ ln -sfn /usr/src/linux $P/lib/modules/$krel/build touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress install -d $docdir/$src setup_docdir convert_links prune_symlink $P/boot prune_symlink $P/lib/modules/$krel - touch -t `date '+%m%d0900'` $P/lib/modules/$krel + TZ=UTC touch -t `date -u '+%m%d0000'` $P/lib/modules/$krel tar cvpf $pkg.tar -C $P `cd $P ; find boot -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P lib/modules/$krel tar rvpf $pkg.tar -C $P lib/firmware 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/kernel-20181201/PlamoBuild.kernel-4.12.14_plamo@LV@ 2018-12-01 09:43:44.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.13.16_plamo@LV@ 2018-12-04 17:39:11.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.12.14.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170708-4.12.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.16.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170909-4.13.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.12.14-20170906-6fe4193.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.12.14-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.13.16-20171117-c9b4367.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.13.16-plamo@LV@" verify= digest= -branch[3]=aufs4.12 -commitid[3]=31266c0 +branch[3]=aufs4.13 +commitid[3]=78cbc7f pkgbase=kernel -vers=4.12.14_plamo@LV@ +vers=4.13.16_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.12.14 +src=linux-4.13.16 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170708-4.12.patch + patch -Np1 -i $W/vd_unicon-kernel-20170909-4.13.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.12-panic_beep.patch - patch -Np1 -i $W/4.12-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.13-panic_beep.patch + patch -Np1 -i $W/4.13-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.12.14-20170906-6fe4193.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.13.16-20171117-c9b4367.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.12.14-plamo$lv .config + cp -p $W/config-4.13.16-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20181204/PlamoBuild.kernel-4.13.16_plamo@LV@ 2018-12-04 17:39:11.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.14.85_plamo@LV@ 2018-12-16 11:37:38.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.16.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170909-4.13.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.85.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20171118-4.14.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.13.16-20171117-c9b4367.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.13.16-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.14.85-20181205-802d877.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.14.85-plamo@LV@" verify= digest= -branch[3]=aufs4.13 -commitid[3]=78cbc7f +branch[3]=aufs4.14.73+ +commitid[3]=df6d0ef pkgbase=kernel -vers=4.13.16_plamo@LV@ +vers=4.14.85_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.13.16 +src=linux-4.14.85 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170909-4.13.patch + patch -Np1 -i $W/vd_unicon-kernel-20171118-4.14.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.13-panic_beep.patch - patch -Np1 -i $W/4.13-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.14-panic_beep.patch + patch -Np1 -i $W/4.14-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.13.16-20171117-c9b4367.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.14.85-20181205-802d877.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.13.16-plamo$lv .config + cp -p $W/config-4.14.85-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh @@ -150,7 +150,6 @@ TZ=UTC touch -t `date -u '+%m%d0000'` $P/lib/modules/$krel tar cvpf $pkg.tar -C $P `cd $P ; find boot -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P lib/modules/$krel - tar rvpf $pkg.tar -C $P lib/firmware tar rvpf $pkg.tar -C $P usr/share/doc/$src tar rvpf $pkg.tar -C $P install/doinst.sh TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar --- plamo/00_base/old/kernel-20181216/PlamoBuild.kernel-4.14.85_plamo@LV@ 2018-12-16 11:37:38.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.15.18_plamo@LV@ 2018-12-19 08:35:29.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.85.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20171118-4.14.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180203-4.15.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.14.85-20181205-802d877.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.14.85-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.15.18-20180521-1b75d3e.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.15.18-plamo@LV@" verify= digest= -branch[3]=aufs4.14.73+ -commitid[3]=df6d0ef +branch[3]=aufs4.15 +commitid[3]=8289398 pkgbase=kernel -vers=4.14.85_plamo@LV@ +vers=4.15.18_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.14.85 +src=linux-4.15.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20171118-4.14.patch + patch -Np1 -i $W/vd_unicon-kernel-20180203-4.15.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.14-panic_beep.patch - patch -Np1 -i $W/4.14-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.15-panic_beep.patch + patch -Np1 -i $W/4.15-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.14.85-20181205-802d877.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.15.18-20180521-1b75d3e.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.14.85-plamo$lv .config + cp -p $W/config-4.15.18-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/btrfs_progs-20161121/PlamoBuild.btrfs_progs-v4.8.3 2016-11-21 00:25:25.000000000 +0900 +++ plamo/00_base/btrfs_progs/PlamoBuild.btrfs_progs-v4.8.3 2017-04-01 19:01:50.000000000 +0900 @@ -2,247 +2,41 @@ ###################################################################### url="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.8.3.tar.gz" +verify= +commitid= pkgbase=btrfs_progs vers=v4.8.3 arch=`uname -m` -build=P1 +build=P2 src=btrfs-progs-$vers patchfiles="" OPT_CONFIG="--bindir=/sbin" DOCS="CHANGES COPYING INSTALL README.md" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +68,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $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 usr/include/btrfs @@ -320,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/openssh-20170116/PlamoBuild.openssh-7.4p1 2017-01-16 19:36:28.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.5p1 2017-04-26 08:39:21.000000000 +0900 @@ -1,9 +1,12 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz" +verify= +digest= +commitid= pkgbase=openssh -vers=7.4p1 +vers=7.5p1 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -13,231 +16,29 @@ DOCS="CREDITS INSTALL LICENCE OVERVIEW PROTOCOL PROTOCOL.agent `echo PROTOCOL.{certkeys,chacha20poly1305,key,krl,mux}` README `echo README.{dns,platform,privsep,tun}` TODO ChangeLog" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p sshd_config{,.orig} sed -i -e 's@^#\(UsePAM\) no$@\1 yes@g' \ @@ -248,12 +49,6 @@ fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -270,12 +65,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -301,38 +91,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_bindir $P/usr/libexec - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- "EOF" >> $P/install/doinst.sh ssh_config() { @@ -360,6 +120,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/microcode_ctl-20160121/PlamoBuild.microcode_ctl-2.1_6 2016-01-21 20:12:32.000000000 +0900 +++ plamo/00_base/microcode_ctl/PlamoBuild.microcode_ctl-2.1_6 2017-04-24 19:55:56.000000000 +0900 @@ -1,217 +1,47 @@ #!/bin/sh ###################################################################### -url="https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-6.tar.xz +url="http://ftp.jaist.ac.jp/pub/Linux/Momonga/development/source/SOURCES/microcode_ctl-2.1-6.tar.xz http://downloadmirror.intel.com/24616/eng/microcode-20150107.tgz" +verify= +digest= +commitid= pkgbase=microcode_ctl vers=2.1_6 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-2.1-6 +patchfiles="" OPT_CONFIG="" DOCS="README Changelog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -225,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -245,29 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P lib/firmware/intel-ucode tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/openssl-20170301/PlamoBuild.openssl-1.0.2k 2017-03-01 08:00:25.000000000 +0900 +++ plamo/00_base/openssl/PlamoBuild.openssl-1.0.2k 2017-04-26 08:58:22.000000000 +0900 @@ -3,253 +3,48 @@ ###################################################################### url="http://www.openssl.org/source/openssl-1.0.2k.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/openssl/mkcabundle.pl" +verify= +digest= +commitid= pkgbase=openssl vers=1.0.2k arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ACKNOWLEDGMENTS CHANGES CHANGES.SSLeay CONTRIBUTING FAQ INSTALL `echo INSTALL.{DJGPP,MacOS,NW,OS2,VMS,W32,W64,WCE}` LICENSE NEWS PROBLEMS README README.ASN1 README.ENGINE" -template=20170204 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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 + download_sources if [ ! -f ca-bundle.crt ] ; then chmod +x mkcabundle.pl ./mkcabundle.pl > ca-bundle.crt fi - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -274,12 +69,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -300,39 +90,9 @@ compress strip_libdir $P/usr/$libdir/engines touch -t `date '+%m%d0900'` $P/usr/$libdir/engines - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links prune_symlink $P/etc/ssl/certs/demo prune_symlink $P/usr/share touch -t `date '+%m%d0900'` $P/etc/ssl/certs/demo @@ -351,6 +111,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/acl-20160105/PlamoBuild.acl-2.2.51 2016-01-05 23:39:45.000000000 +0900 +++ plamo/00_base/acl/PlamoBuild.acl-2.2.51 2017-04-09 13:28:38.000000000 +0900 @@ -2,215 +2,45 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/acl/acl-2.2.51.src.tar.gz" +verify= +commitid= pkgbase=acl vers=2.2.51 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="README `echo doc/{{extensions,libacl}.txt,TODO,PORTING,CHANGES}` `echo doc/{COPYING,COPYING.LGPL,INSTALL,old-acl.5}`" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -224,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -245,23 +70,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/examples $docdir/$src rm $docdir/$src/examples/Makefile chmod -R o+r $docdir/$src/examples @@ -269,14 +78,14 @@ mv $docdir/$src/{examples,$myname.gz} $C mv $C/{examples,$myname.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src{,/doc,/examples} - convert + convert_links prune_symlink $P/usr/libexec tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/libexec | 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/sys | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/acl - 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/locale -name *.mo` 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` @@ -284,6 +93,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/iputils-20160321/PlamoBuild.iputils-s20101006 2016-03-21 18:20:06.000000000 +0900 +++ plamo/00_base/iputils/PlamoBuild.iputils-s20101006 2017-04-07 16:26:40.000000000 +0900 @@ -2,223 +2,50 @@ ###################################################################### url="http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/iputils/iputils-s20101006-fixes-1.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/iputils/iputils-s20100418-doc-1.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/iputils/iputils-s20101006-Makefile.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/iputils/iputils-s20101006-fixes-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/iputils/iputils-s20100418-doc-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/iputils/iputils-s20101006-Makefile.patch.gz" +verify= +commitid= pkgbase=iputils vers=s20101006 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="`echo iputils-s2010{{1006-fixes,0418-doc}-1,1006-Makefile}.patch.gz`" OPT_CONFIG="" DOCS="INSTALL RELNOTES" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - gunzip -c $W/iputils-s20101006-fixes-1.patch.gz | patch -Np1 -i - - gunzip -c $W/iputils-s20100418-doc-1.patch.gz | patch -Np1 -i - - gunzip -c $W/iputils-s20101006-Makefile.patch.gz | patch -Np1 -i - cp -p Makefile{,.orig} sed -i "s|@LIBDIR@|/usr/$libdir|" Makefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -233,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -261,24 +83,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` tar rvpf $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` @@ -286,6 +92,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/linux_firmware-20160126/PlamoBuild.linux_firmware-git_20160112 2016-01-26 12:06:22.000000000 +0900 +++ plamo/00_base/linux_firmware/PlamoBuild.linux_firmware-git_20160112 2017-04-17 15:47:29.000000000 +0900 @@ -2,11 +2,15 @@ ###################################################################### url="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" +verify= +digest= +commitid=40e9ae8 pkgbase=linux_firmware vers=git_20160112 arch=noarch -build=P2 +build=P3 src=linux-firmware +patchfiles="" OPT_CONFIG="" DOCS="GPL-3 `echo LICENCE.{Abilis,IntcSST2,Marvell,OLPC}` LICENSE.radeon `echo LICENCE.{agere,atheros_firmware,broadcom_bcm43xx,ca0132}` @@ -22,215 +26,36 @@ `echo LICENCE.{kaweth,moxa,nvidia,open-ath9k-htc-firmware,qat_firmware}` `echo LICENCE.{qla1280,ti-keystone}` `echo LICENSE.{QualcommAtheros_{ar3k,ath10k},amdgpu,atmel,hfi1_firmware}` - LICENSE.i915" + LICENSE.i915 ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; else - ( cd `basename ${i##*/} .git` ; git pull origin master ) ; fi ;; - *) if [ ! -f ${i##*/} ] ; then wget $i ; fi ;; - esac - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard 40e9ae8 - git set-file-times ) ;; - esac - done + download_sources + nkf -e --overwrite linux-firmware/ChangeLog fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -244,12 +69,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -264,25 +84,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links for i in . cxgb4 libertas ti-connectivity ; do touch -t `date '+%m%d0900'` $P/lib/firmware/$i done @@ -291,6 +95,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/kernel-20181219/PlamoBuild.kernel-4.15.18_plamo@LV@ 2018-12-19 08:35:29.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.16.18_plamo@LV@ 2018-12-23 18:07:52.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180203-4.15.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180407-4.16.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.15.18-20180521-1b75d3e.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.15.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.16.18-20180614-fd4f278.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.16.18-plamo@LV@" verify= digest= -branch[3]=aufs4.15 -commitid[3]=8289398 +branch[3]=aufs4.16 +commitid[3]=e0f5222 pkgbase=kernel -vers=4.15.18_plamo@LV@ +vers=4.16.18_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.15.18 +src=linux-4.16.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180203-4.15.patch + patch -Np1 -i $W/vd_unicon-kernel-20180407-4.16.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.15-panic_beep.patch - patch -Np1 -i $W/4.15-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.16-panic_beep.patch + patch -Np1 -i $W/4.16-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.15.18-20180521-1b75d3e.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.16.18-20180614-fd4f278.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.15.18-plamo$lv .config + cp -p $W/config-4.16.18-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20181223/PlamoBuild.kernel-4.16.18_plamo@LV@ 2018-12-23 18:07:52.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.17.19_plamo@LV@ 2020-10-23 06:04:22.000000000 +0900 @@ -1,25 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180407-4.16.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.17.19.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180609-4.17.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.16.18-20180614-fd4f278.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.16.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.17.19-20180630-b0b5a34.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.17.19-plamo@LV@" verify= digest= -branch[3]=aufs4.16 -commitid[3]=e0f5222 +branch[4]=aufs4.17 +commitid[4]=4662af5 pkgbase=kernel -vers=4.16.18_plamo@LV@ +vers=4.17.19_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.16.18 +src=linux-4.17.19 patchfiles="" OPT_CONFIG="" DOCS="" @@ -42,6 +43,12 @@ prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources + cat <<- "EOF" | patch aufs4-standalone/aufs4-mmap.patch + 304c304 + < kmem_cache_free(vm_area_cachep, vma); + --- + > vm_area_free(vma); + EOF fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -49,7 +56,8 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180407-4.16.patch + patch -Np1 -i $W/vd_unicon-kernel-20180609-4.17.patch + patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +66,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.16-panic_beep.patch - patch -Np1 -i $W/4.16-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.17-panic_beep.patch + patch -Np1 -i $W/4.17-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.16.18-20180614-fd4f278.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.17.19-20180630-b0b5a34.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.16.18-plamo$lv .config + cp -p $W/config-4.17.19-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20201023/PlamoBuild.kernel-4.17.19_plamo@LV@ 2020-10-23 06:04:22.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.18.20_plamo@LV@ 2021-02-18 19:53:49.000000000 +0900 @@ -1,26 +1,27 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.17.19.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180609-4.17.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.18.20.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180818-4.18.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.17.19-20180630-b0b5a34.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.17.19-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/4.18.20-revert-drm-i915-ringbuffer.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.18.20-20181023-d58c595.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.18.20-plamo@LV@" verify= digest= -branch[4]=aufs4.17 -commitid[4]=4662af5 +branch[4]=aufs4.18 +commitid[4]=c0cdacc pkgbase=kernel -vers=4.17.19_plamo@LV@ +vers=4.18.20_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.17.19 +src=linux-4.18.20 patchfiles="" OPT_CONFIG="" DOCS="" @@ -43,12 +44,6 @@ prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources - cat <<- "EOF" | patch aufs4-standalone/aufs4-mmap.patch - 304c304 - < kmem_cache_free(vm_area_cachep, vma); - --- - > vm_area_free(vma); - EOF fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -56,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180609-4.17.patch + patch -Np1 -i $W/vd_unicon-kernel-20180818-4.18.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -66,17 +61,18 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.17-panic_beep.patch - patch -Np1 -i $W/4.17-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.18-panic_beep.patch + patch -Np1 -i $W/4.18-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/4.18.20-revert-drm-i915-ringbuffer.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.17.19-20180630-b0b5a34.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.18.20-20181023-d58c595.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.17.19-plamo$lv .config + cp -p $W/config-4.18.20-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh @@ -143,8 +139,8 @@ install -m 644 $B/arch/arm/boot/dts/overlays/README $P/boot/overlays install -m 644 $B/arch/arm/boot/dts/overlays/*.dtbo $P/boot/overlays fi - ln -sfn /usr/src/linux $P/lib/modules/$krel/source - ln -sfn /usr/src/linux $P/lib/modules/$krel/build + ln -sfn /usr/src/$src $P/lib/modules/$krel/source + ln -sfn /usr/src/$src $P/lib/modules/$krel/build touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/00_base/old/kernel-20210218/PlamoBuild.kernel-4.18.20_plamo@LV@ 2021-02-18 19:53:49.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.19.127_plamo@LV@ 2021-02-21 12:59:07.000000000 +0900 @@ -1,27 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.18.20.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180818-4.18.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.127.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181027-4.19.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/4.18.20-revert-drm-i915-ringbuffer.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.18.20-20181023-d58c595.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.18.20-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.19.127-20200717-cc39f1c.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.19.127-plamo@LV@" verify= digest= -branch[4]=aufs4.18 -commitid[4]=c0cdacc +branch[4]=aufs4.19.63+ +commitid[4]=1bb4caf pkgbase=kernel -vers=4.18.20_plamo@LV@ +vers=4.19.127_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.18.20 +src=linux-4.19.127 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180818-4.18.patch + patch -Np1 -i $W/vd_unicon-kernel-20181027-4.19.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -61,18 +60,21 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.18-panic_beep.patch - patch -Np1 -i $W/4.18-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.19-panic_beep.patch + patch -Np1 -i $W/4.19-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 | patch -Np1 -i - + cp -p kernel/power/snapshot.c{,.orig} + sed -i 's@indx@index@g' kernel/power/snapshot.c chmod 755 scripts/tuxonice_output_to_csv.sh + rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - patch -Np1 -i $W/4.18.20-revert-drm-i915-ringbuffer.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.18.20-20181023-d58c595.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.19.127-20200717-cc39f1c.patch.xz | patch -Np1 -i - + rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.18.20-plamo$lv .config + cp -p $W/config-4.19.127-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20210221/PlamoBuild.kernel-4.19.127_plamo@LV@ 2021-02-21 12:59:07.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-4.20.17_plamo@LV@ 2021-06-27 15:33:44.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.127.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181027-4.19.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181229-4.20.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.19.127-20200717-cc39f1c.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.19.127-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.20.17-20190923-41f5d37.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.20.17-plamo@LV@" verify= digest= -branch[4]=aufs4.19.63+ -commitid[4]=1bb4caf +branch[4]=aufs4.20.4+ +commitid[4]=51f87f2 pkgbase=kernel -vers=4.19.127_plamo@LV@ +vers=4.20.17_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.19.127 +src=linux-4.20.17 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20181027-4.19.patch + patch -Np1 -i $W/vd_unicon-kernel-20181229-4.20.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -60,21 +60,19 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.19-panic_beep.patch - patch -Np1 -i $W/4.19-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 | patch -Np1 -i - - cp -p kernel/power/snapshot.c{,.orig} - sed -i 's@indx@index@g' kernel/power/snapshot.c + patch -Np1 -i $W/4.20-panic_beep.patch + patch -Np1 -i $W/4.20-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.19.127-20200717-cc39f1c.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.20.17-20190923-41f5d37.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.19.127-plamo$lv .config + cp -p $W/config-4.20.17-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20210627/PlamoBuild.kernel-4.20.17_plamo@LV@ 2021-06-27 15:33:44.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-5.0.21_plamo@LV@ 2021-07-01 09:23:32.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181229-4.20.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190309-5.0.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 - https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 + https://github.com/sfjro/aufs5-standalone.git + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.20.17-20190923-41f5d37.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.20.17-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.0.21-20190923-0222b82.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.0.21-plamo@LV@" verify= digest= -branch[4]=aufs4.20.4+ -commitid[4]=51f87f2 +branch[4]=aufs5.0 +commitid[4]=25f304c pkgbase=kernel -vers=4.20.17_plamo@LV@ +vers=5.0.21_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.20.17 +src=linux-5.0.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,29 +50,28 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20181229-4.20.patch + patch -Np1 -i $W/vd_unicon-kernel-20190309-5.0.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-mmap.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-standalone.patch - cp -av $W/aufs4-standalone/Documentation . - cp -av $W/aufs4-standalone/fs . - cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.20-panic_beep.patch - patch -Np1 -i $W/4.20-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch + cp -av $W/aufs5-standalone/Documentation . + cp -av $W/aufs5-standalone/fs . + cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux + patch -Np1 -i $W/5.0-panic_beep.patch + patch -Np1 -i $W/5.0-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh - rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.20.17-20190923-41f5d37.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.0.21-20190923-0222b82.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.20.17-plamo$lv .config + cp -p $W/config-5.0.21-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20210701/PlamoBuild.kernel-5.0.21_plamo@LV@ 2021-07-01 09:23:32.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-5.1.21_plamo@LV@ 2021-07-06 07:55:41.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190309-5.0.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190511-5.1.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.0.21-20190923-0222b82.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.0.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.1.21-20190923-29ee73a.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.1.21-plamo@LV@" verify= digest= -branch[4]=aufs5.0 -commitid[4]=25f304c +branch[4]=aufs5.1 +commitid[4]=d051ff3 pkgbase=kernel -vers=5.0.21_plamo@LV@ +vers=5.1.21_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.0.21 +src=linux-5.1.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190309-5.0.patch + patch -Np1 -i $W/vd_unicon-kernel-20190511-5.1.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,18 +60,18 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.0-panic_beep.patch - patch -Np1 -i $W/5.0-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.1-panic_beep.patch + patch -Np1 -i $W/5.1-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.0.21-20190923-0222b82.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.1.21-20190923-29ee73a.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.0.21-plamo$lv .config + cp -p $W/config-5.1.21-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20210706/PlamoBuild.kernel-5.1.21_plamo@LV@ 2021-07-06 07:55:41.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-5.2.21_plamo@LV@ 2021-07-13 10:49:25.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190511-5.1.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190713-5.2.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.1.21-20190923-29ee73a.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.1.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.2.21-20191029-94dbfa7.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.2.21-plamo@LV@" verify= digest= -branch[4]=aufs5.1 -commitid[4]=d051ff3 +branch[4]=aufs5.2.5+ +commitid[4]=40a8029 pkgbase=kernel -vers=5.1.21_plamo@LV@ +vers=5.2.21_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.1.21 +src=linux-5.2.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190511-5.1.patch + patch -Np1 -i $W/vd_unicon-kernel-20190713-5.2.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,18 +60,18 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.1-panic_beep.patch - patch -Np1 -i $W/5.1-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.2-panic_beep.patch + patch -Np1 -i $W/5.2-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.1.21-20190923-29ee73a.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.2.21-20191029-94dbfa7.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.1.21-plamo$lv .config + cp -p $W/config-5.2.21-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/kernel-20210713/PlamoBuild.kernel-5.2.21_plamo@LV@ 2021-07-13 10:49:25.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-5.3.18_plamo@LV@ 2021-07-21 13:28:24.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190713-5.2.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.3.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190921-5.3.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.2.21-20191029-94dbfa7.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.2.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.3.18-20191201-32ba05a.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.3.18-plamo@LV@" verify= digest= -branch[4]=aufs5.2.5+ -commitid[4]=40a8029 +branch[4]=aufs5.3.16 +commitid[4]=28e5d4e pkgbase=kernel -vers=5.2.21_plamo@LV@ +vers=5.3.18_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.2.21 +src=linux-5.3.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190713-5.2.patch + patch -Np1 -i $W/vd_unicon-kernel-20190921-5.3.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,18 +60,17 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.2-panic_beep.patch - patch -Np1 -i $W/5.2-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.3-panic_beep.patch + patch -Np1 -i $W/5.3-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.2.21-20191029-94dbfa7.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.3.18-20191201-32ba05a.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} - chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.2.21-plamo$lv .config + cp -p $W/config-5.3.18-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh @@ -91,7 +90,7 @@ 54c56 < cat $2 > $4/$base-$1 --- - > scripts/mkknlimg $2 $4/kernel7.img-$1 + > cat $2 > $4/kernel7.img-$1 EOF fi for i in `seq 0 $((${#B[@]} - 1))` ; do --- plamo/00_base/old/kernel-20210721/PlamoBuild.kernel-5.3.18_plamo@LV@ 2021-07-21 13:28:24.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-5.4.51_plamo@LV@ 2021-07-24 07:39:12.000000000 +0900 @@ -1,26 +1,28 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.3.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190921-5.3.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.51.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20191130-5.4.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.4-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.4-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.3.18-20191201-32ba05a.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.3.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/5.4-mt7615-define-to_rssi-macro.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.4.51-20200715-7d9a391.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/5.4-CLK_BCM2835-RESET_CONTROLLER.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.4.51-plamo@LV@" verify= digest= -branch[4]=aufs5.3.16 -commitid[4]=28e5d4e +branch[4]=aufs5.4.3 +commitid[4]=1d622ad pkgbase=kernel -vers=5.3.18_plamo@LV@ +vers=5.4.51_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.3.18 +src=linux-5.4.51 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +52,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190921-5.3.patch + patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,17 +62,19 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.3-panic_beep.patch - patch -Np1 -i $W/5.3-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.4-panic_beep.patch + patch -Np1 -i $W/5.4-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.3.18-20191201-32ba05a.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - + patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} fi - cp -p $W/config-5.3.18-plamo$lv .config + cp -p $W/config-5.4.51-plamo$lv .config if [ $arch == i686 -o $arch == x86_64 ] ; then cp -p arch/x86/boot/install.sh{,.orig} head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh --- plamo/00_base/old/acl-20170409/PlamoBuild.acl-2.2.51 2017-04-09 13:28:38.000000000 +0900 +++ plamo/00_base/acl/PlamoBuild.acl-2.2.51 2019-10-14 07:58:40.000000000 +0900 @@ -75,8 +75,8 @@ rm $docdir/$src/examples/Makefile chmod -R o+r $docdir/$src/examples chown -R root.root $docdir/$src/examples - mv $docdir/$src/{examples,$myname.gz} $C - mv $C/{examples,$myname.gz} $docdir/$src + mv $docdir/$src/{examples,{$func,$myname,$spec}.gz} $C + mv $C/{examples,{$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src{,/doc,/examples} convert_links prune_symlink $P/usr/libexec --- plamo/00_base/old/at-20151225/PlamoBuild.at-3.1.13 2015-12-25 10:57:46.000000000 +0900 +++ plamo/00_base/at/PlamoBuild.at-3.1.13 2017-04-01 18:24:42.000000000 +0900 @@ -2,214 +2,44 @@ ###################################################################### url="http://repository.timesys.com/buildsources/a/at/at-3.1.13/at-3.1.13.tar.gz" +verify= +commitid= pkgbase=at vers=3.1.13 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog Copyright Problems README timespec" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -251,24 +76,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/sbin | tail -n+2` tar rvpf $pkg.tar -C $P etc/at.deny @@ -281,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/attr-20160105/PlamoBuild.attr-2.4.44 2016-01-05 23:43:17.000000000 +0900 +++ plamo/00_base/attr/PlamoBuild.attr-2.4.44 2017-04-09 13:29:21.000000000 +0900 @@ -2,214 +2,44 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/attr/attr-2.4.44.src.tar.gz" +verify= +commitid= pkgbase=attr vers=2.4.44 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="README `echo doc/{INSTALL,PORTING,CHANGES,COPYING}`" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -244,37 +69,21 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/examples $docdir/$src rm $docdir/$src/examples/Makefile chmod -R o+r $docdir/$src/examples chown -R root.root $docdir/$src/examples - mv $docdir/$src/{examples,doc,$myname.gz} $C - mv $C/{examples,doc,$myname.gz} $docdir/$src + mv $docdir/$src/{examples,doc,{$func,$myname,$spec}.gz} $C + mv $C/{examples,doc,{$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src{,/examples,/doc} - convert + convert_links prune_symlink $P/usr/libexec tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/libexec | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/attr - 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/locale -name *.mo` 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/man2 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` @@ -283,6 +92,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/bash-20160403/PlamoBuild.bash-4.3.30 2016-04-03 09:46:50.000000000 +0900 +++ plamo/00_base/bash/PlamoBuild.bash-4.3.30 2017-04-09 13:30:34.000000000 +0900 @@ -2,218 +2,47 @@ ###################################################################### url="http://ftp.gnu.org/gnu/bash/bash-4.3.30.tar.gz" +verify= +commitid= pkgbase=bash vers=4.3.30 arch=`uname -m` -build=P2 +build=P3 src[0]=$pkgbase-$vers src[1]=${src[0]} +patchfiles="" OPT_CONFIG[0]="--bindir=/bin --without-bash-malloc --with-installed-readline" OPT_CONFIG[1]="${OPT_CONFIG[0]} --enable-static-link" -DOCS[0]="ABOUT-NLS AUTHORS ChangeLog CHANGES COMPAT COPYING INSTALL +DOCS="ABOUT-NLS AUTHORS ChangeLog CHANGES COMPAT COPYING INSTALL NEWS NOTES POSIX RBASH README Y2K" -DOCS[1]="" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -227,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -251,36 +75,19 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - false && ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/html $docdir/$src - mv $docdir/$src/{html,$myname.gz} $C - mv $C/{html,$myname.gz} $docdir/$src + mv $docdir/$src/{html,{$func,$myname,$spec}.gz} $C + mv $C/{html,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` - 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/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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/btrfs_progs-20170401/PlamoBuild.btrfs_progs-v4.8.3 2017-04-01 19:01:50.000000000 +0900 +++ plamo/00_base/btrfs_progs/PlamoBuild.btrfs_progs-v4.12.1 2018-12-26 13:56:19.000000000 +0900 @@ -1,18 +1,20 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.8.3.tar.gz" +url="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.12.1.tar.gz" verify= +digest= +branch= commitid= pkgbase=btrfs_progs -vers=v4.8.3 +vers=v4.12.1 arch=`uname -m` build=P2 src=btrfs-progs-$vers patchfiles="" OPT_CONFIG="--bindir=/sbin" DOCS="CHANGES COPYING INSTALL README.md" -template=20170323 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -65,8 +67,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -77,7 +79,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/bzip2-20160320/PlamoBuild.bzip2-1.0.6 2016-03-20 21:14:04.000000000 +0900 +++ plamo/00_base/bzip2/PlamoBuild.bzip2-1.0.6 2017-04-01 19:15:12.000000000 +0900 @@ -2,219 +2,49 @@ ###################################################################### url="http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz" +verify= +commitid= pkgbase=bzip2 vers=1.0.6 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="LICENSE README README.COMPILATION.PROBLEMS README.XML.STUFF CHANGES" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile{,.orig} sed -i -e 's@\@$(LIBDIR)@g' -e 's@\@share/&@g' \ -e '/ln/s@$(PREFIX)/bin/@@' Makefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -229,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -256,24 +81,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find $libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` @@ -284,6 +93,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/coreutils-20170401/PlamoBuild.coreutils-8.25 2017-04-01 19:22:35.000000000 +0900 +++ plamo/00_base/coreutils/PlamoBuild.coreutils-8.25 2017-12-02 19:11:47.000000000 +0900 @@ -3,11 +3,13 @@ ###################################################################### url="http://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz" verify= +digest= +branch= commitid= pkgbase=coreutils vers=8.25 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-install-program=arch @@ -15,7 +17,7 @@ DOCS="COPYING TODO INSTALL THANKS ChangeLog-2006 ChangeLog-2008 NEWS ChangeLog ChangeLog-2007 README ChangeLog-2005 AUTHORS ABOUT-NLS THANKS-to-translators" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -43,15 +45,13 @@ sed 's@EXTRA_LOCALE_CATEGORIES@#&@g' po/Makevars.orig > po/Makevars cp -p src/copy.c{,.orig} sed 's@FASTREAD@NONE@g' src/copy.c.orig > src/copy.c - if [ `id -u` -eq 0 ] ; then - export FORCE_UNSAFE_CONFIGURE=1 - fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + FORCE_UNSAFE_CONFIGURE=1 fi done fi --- plamo/00_base/old/cracklib-20160320/PlamoBuild.cracklib-2.8.18 2016-03-20 21:22:29.000000000 +0900 +++ plamo/00_base/cracklib/PlamoBuild.cracklib-2.8.18 2017-04-09 13:31:44.000000000 +0900 @@ -3,218 +3,46 @@ ###################################################################### url="http://downloads.sourceforge.net/cracklib/cracklib-2.8.18.tar.gz http://downloads.sourceforge.net/cracklib/cracklib-words-20080507.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/cracklib/cracklib-2.8.15-heimdal-1.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/cracklib/cracklib-2.8.15-heimdal-1.patch" +verify= +commitid= pkgbase=cracklib vers=2.8.18 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="cracklib-2.8.15-heimdal-1.patch" OPT_CONFIG="--with-default-dict=/lib/cracklib/pw_dict" DOCS="README-WORDS README-DAWG NEWS AUTHORS INSTALL ABOUT-NLS README-LICENSE README COPYING.LIB ChangeLog" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np1 -i $W/cracklib-2.8.15-heimdal-1.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -228,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -257,24 +80,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/usr/share/dict rm $P/usr/$libdir/libcrack.so.2.8.1 cat <<- EOF >> $P/install/doinst.sh @@ -291,13 +98,12 @@ tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` - 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/locale -name *.mo` tar rvpf $pkg.tar -C $P usr/share/{cracklib,dict} tar rvpf $pkg.tar -C $P lib/cracklib 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/dcron-20151227/PlamoBuild.dcron-4.5 2015-12-27 22:56:24.000000000 +0900 +++ plamo/00_base/dcron/PlamoBuild.dcron-4.5 2017-04-01 20:02:12.000000000 +0900 @@ -2,203 +2,39 @@ ###################################################################### url="http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz" +verify= +commitid= pkgbase=dcron vers=4.5 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="README CHANGELOG CHANGELOG.working" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p extra/crond.rc{,.orig} cat <<- "EOF" | patch extra/crond.rc @@ -244,15 +80,9 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -266,12 +96,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -302,24 +127,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links 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 etc/cron.{d,hourly,daily,weekly,monthly} @@ -330,6 +139,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/dhcp-20170401/PlamoBuild.dhcp-4.3.3 2017-04-01 20:11:15.000000000 +0900 +++ plamo/00_base/dhcp/PlamoBuild.dhcp-4.3.3 2018-02-02 15:10:53.000000000 +0900 @@ -3,16 +3,21 @@ ###################################################################### url="http://ftp.isc.org/isc/dhcp/4.3.3/dhcp-4.3.3.tar.gz" verify= +digest= +branch= commitid= pkgbase=dhcp vers=4.3.3 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" +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=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/00_base/old/dialog-20161120/PlamoBuild.dialog-1.3_20160828 2016-11-20 12:36:09.000000000 +0900 +++ plamo/00_base/dialog/PlamoBuild.dialog-1.3_20160828 2017-04-09 13:32:38.000000000 +0900 @@ -2,248 +2,42 @@ ###################################################################### url="ftp://invisible-island.net/dialog/dialog-1.3-20160828.tgz" +verify= +commitid= pkgbase=dialog vers=1.3_20160828 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-1.3-20160828 patchfiles="" OPT_CONFIG="--bindir=/bin --enable-nls --with-shared --with-ncursesw --enable-widec" DOCS="CHANGES README COPYING" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir=/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,46 +69,15 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find $libdir | tail -n+2` - 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/locale -name *.mo` 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/dosfstools-20161204/PlamoBuild.dosfstools-3.0.26 2016-12-04 12:56:09.000000000 +0900 +++ plamo/00_base/dosfstools/PlamoBuild.dosfstools-3.0.26 2017-04-01 20:48:24.000000000 +0900 @@ -2,10 +2,12 @@ ###################################################################### url="http://mirror.opencompute.org/onie/dosfstools-3.0.26.tar.xz" +verify= +commitid= pkgbase=dosfstools vers=3.0.26 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -13,239 +15,31 @@ `echo doc/{ChangeLog.mkdosfs,ChangeLog.dosfsck,README.mkdosfs}` `echo doc/{ANNOUNCE.mkdosfs,README.dosfstools-2.x}` COPYING VERSION ChangeLog" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -283,38 +72,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress gzip_dir $mandir/de/man8 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 `cd $P ; find usr/share/man/de/man8 | tail -n+2` @@ -322,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/dump-20160409/PlamoBuild.dump-0.4b44 2016-04-09 21:37:03.000000000 +0900 +++ plamo/00_base/dump/PlamoBuild.dump-0.4b44 2017-04-01 21:00:30.000000000 +0900 @@ -2,220 +2,47 @@ ###################################################################### url="http://jaist.dl.sourceforge.net/sourceforge/dump/dump-0.4b44.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/dump/dump-0.4b41-destdir.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/dump/dump-0.4b44-com_err.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/dump/dump-0.4b41-destdir.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/dump/dump-0.4b44-com_err.patch.gz" +verify= +commitid= pkgbase=dump vers=0.4b44 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="`echo dump-0.4b4{1-destdir,4-com_err}.patch.gz`" OPT_CONFIG="--disable-transselinux" DOCS="COPYRIGHT TODO KNOWNBUGS REPORTING-BUGS README THANKS CHANGES MAINTAINERS INSTALL" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - gunzip -c $W/dump-0.4b41-destdir.patch.gz | patch -Np1 -i - - gunzip -c $W/dump-0.4b44-com_err.patch.gz | patch -Np1 -i - + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -229,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -249,38 +71,23 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/examples $docdir/$src chmod -R g-w $docdir/$src/examples chown -R root.root $docdir/$src/examples mv $docdir/$src/{examples,{REPORTING-BUGS,README,THANKS}.gz} $C - mv $docdir/$src/{CHANGES,MAINTAINERS,INSTALL,$myname}.gz $C + mv $docdir/$src/{CHANGES,MAINTAINERS,INSTALL}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{examples,{REPORTING-BUGS,README,THANKS}.gz} $docdir/$src - mv $C/{CHANGES,MAINTAINERS,INSTALL,$myname}.gz $docdir/$src + mv $C/{CHANGES,MAINTAINERS,INSTALL}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 - read -p "Do you want to keep work files? [y/N] " ans - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/e2fsprogs-20161206/PlamoBuild.e2fsprogs-1.43.3 2016-12-06 05:39:01.000000000 +0900 +++ plamo/00_base/e2fsprogs/PlamoBuild.e2fsprogs-1.43.3 2017-04-01 21:11:11.000000000 +0900 @@ -2,10 +2,12 @@ ###################################################################### url="http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-1.43.3.tar.gz" +verify= +commitid= pkgbase=e2fsprogs vers=1.43.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-elf-shlibs --disable-libuuid --disable-libblkid @@ -13,231 +15,29 @@ --with-root-prefix=" DOCS="INSTALL.elfbin RELEASE-NOTES README NOTICE ABOUT-NLS INSTALL SUBMITTING-PATCHES" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B if [ $arch == x86_64 ] ; then cp -p configure{,.orig} @@ -247,12 +47,6 @@ sed -i 's@,dir_index@@g' misc/mke2fs.conf.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -269,12 +63,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,46 +71,16 @@ cd ${B[$i]} if [ -f Makefile ] ; then make install DESTDIR=$P + make install-libs DESTDIR=$P fi done - make install-libs DESTDIR=$P touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $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` @@ -341,6 +100,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/ed-20151229/PlamoBuild.ed-1.5 2015-12-29 20:36:35.000000000 +0900 +++ plamo/00_base/ed/PlamoBuild.ed-1.5 2017-04-01 21:29:07.000000000 +0900 @@ -2,214 +2,44 @@ ###################################################################### url="http://gnu.raffsoftware.com/ed/ed-1.5.tar.gz" +verify= +commitid= pkgbase=ed vers=1.5 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -244,25 +69,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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/share/info | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` @@ -270,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/eject-20160823/PlamoBuild.eject-2.1.5 2016-08-23 13:14:54.000000000 +0900 +++ plamo/00_base/eject/PlamoBuild.eject-2.1.5 2017-04-05 23:15:50.000000000 +0900 @@ -3,247 +3,43 @@ ###################################################################### url="http://ftp.caixamagica.pt/anvil/pool/main/e/eject/eject_2.1.5+deb1+cvs20081104.orig.tar.gz http://ftp.caixamagica.pt/anvil/pool/main/e/eject/eject_2.1.5+deb1+cvs20081104-8.diff.gz" +verify= +commitid= pkgbase=eject vers=2.1.5 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers+deb1+cvs20081104 patchfiles="eject_2.1.5+deb1+cvs20081104-8.diff.gz" OPT_CONFIG="" DOCS="TODO NEWS PORTING COPYING INSTALL README AUTHORS PROBLEMS ChangeLog" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B ./bootstrap for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,30 +71,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/locale -name *.mo` 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/extipl-20160329/PlamoBuild.extipl-5.04 2016-03-29 13:21:20.000000000 +0900 +++ plamo/00_base/extipl/PlamoBuild.extipl-5.04 2017-04-05 12:50:47.000000000 +0900 @@ -2,207 +2,43 @@ ###################################################################### url="http://jaist.dl.sourceforge.jp/extipl/2166/extipl-5.04.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/extipl/extipl-5.04-syscall.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/extipl/extipl-5.04-x86_64.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/extipl/extipl-5.04-syscall.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/extipl/extipl-5.04-x86_64.patch.gz http://jaist.dl.sourceforge.net/sourceforge/nasm/nasm-0.98.38.tar.bz2" +verify= +commitid= pkgbase=extipl vers=5.04 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="`echo doc/{English,Japanese}/{extipl,scorpius,techical}.txt` COPYING README" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B if [ $arch != x86_64 ] ; then gunzip -c $W/extipl-5.04-syscall.patch.gz | patch -Np1 -i - @@ -216,15 +52,9 @@ PATH="$W/nasm/bin:$PATH" for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -239,12 +69,7 @@ cd src ; make fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -262,30 +87,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | 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 `cd $P ; find usr/share/man/ja_JP.eucJP/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/fbset-20151227/PlamoBuild.fbset-2.1 2015-12-27 19:57:23.000000000 +0900 +++ plamo/00_base/fbset/PlamoBuild.fbset-2.1 2017-04-05 12:56:59.000000000 +0900 @@ -3,219 +3,48 @@ ###################################################################### url="http://users.telenet.be/geertu/Linux/fbdev/fbset-2.1.tar.gz http://archive.debian.org/debian/pool/main/f/fbset/fbset_2.1-23.diff.gz" +verify= +commitid= pkgbase=fbset vers=2.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="fbset_2.1-23.diff.gz" OPT_CONFIG="" DOCS="INSTALL" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - gunzip -c $W/fbset_2.1-23.diff.gz | patch -Np1 -i - for i in `cat debian/patches/series` ; do patch -Np1 -i debian/patches/$i done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -229,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -249,24 +73,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` tar rvpf $pkg.tar -C $P etc/fb.modes tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` @@ -274,6 +82,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/file-20160407/PlamoBuild.file-5.22 2016-04-07 16:06:48.000000000 +0900 +++ plamo/00_base/file/PlamoBuild.file-5.22 2017-04-05 13:10:47.000000000 +0900 @@ -2,214 +2,44 @@ ###################################################################### url="ftp://ftp.astron.com/pub/file/file-5.22.tar.gz" +verify= +commitid= pkgbase=file vers=5.22 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO MAINT" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -243,24 +68,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -273,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/findutils-20160824/PlamoBuild.findutils-4.6.0 2016-08-24 14:34:06.000000000 +0900 +++ plamo/00_base/findutils/PlamoBuild.findutils-4.6.0 2017-04-05 13:24:09.000000000 +0900 @@ -2,246 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/findutils/findutils-4.6.0.tar.gz" +verify= +commitid= pkgbase=findutils vers=4.6.0 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ABOUT-NLS README AUTHORS README-hacking NEWS THANKS INSTALL COPYING ChangeLog tool-versions.txt ChangeLog-2013 README-alpha TODO" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/locale -name *.mo` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` @@ -305,6 +80,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/gawk-20161109/PlamoBuild.gawk-4.1.4 2016-11-09 23:31:23.000000000 +0900 +++ plamo/00_base/gawk/PlamoBuild.gawk-4.1.4 2017-04-09 13:33:14.000000000 +0900 @@ -2,10 +2,12 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gawk/gawk-4.1.4.tar.xz" +verify= +commitid= pkgbase=gawk vers=4.1.4 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--without-mpfr" @@ -14,239 +16,31 @@ `echo README_d/README.{solaris,bootstrap,macosx,gcc-3,mpfr}` ChangeLog ChangeLog.0 ABOUT-NLS README NEWS.0 COPYING INSTALL AUTHORS" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,43 +75,13 @@ strip_bindir $P/usr/libexec/awk strip_libdir $P/usr/$libdir/gawk touch -t `date '+%m%d0900'` $P/usr/libexec/awk $P/usr/$libdir/gawk - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/libexec/awk tar rvpf $pkg.tar -C $P usr/$libdir/gawk tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` - 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/locale -name *.mo` tar rvpf $pkg.tar -C $P usr/share/awk 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` @@ -331,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/glibc-20180108/PlamoBuild.glibc-2.20 2018-01-08 06:18:13.000000000 +0900 +++ plamo/00_base/glibc/PlamoBuild.glibc-2.20 2018-04-21 17:04:05.000000000 +0900 @@ -18,7 +18,7 @@ pkgbase=glibc vers=2.20 arch=`uname -m` -build=P8 +build=P9 src=$pkgbase-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch @@ -137,6 +137,7 @@ /usr/$libdir/pstoedit /usr/heimdal/$libdir /usr/$libdir/xulrunner + /opt/mariadb/$libdir /opt/mysql/$libdir /opt/pgsql/$libdir EOF --- plamo/00_base/old/grep-20151231/PlamoBuild.grep-2.20 2015-12-31 14:07:40.000000000 +0900 +++ plamo/00_base/grep/PlamoBuild.grep-2.20 2017-04-05 23:21:23.000000000 +0900 @@ -2,219 +2,46 @@ ###################################################################### url="http://ftp.gnu.org/gnu/grep/grep-2.20.tar.xz - https://raw.githubusercontent.com/maximeh/buildroot/master/package/grep/0001-fix-CVE-2015-1345.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/grep/0001-fix-CVE-2015-1345.patch" +verify= +commitid= pkgbase=grep vers=2.20 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="0001-fix-CVE-2015-1345.patch" OPT_CONFIG="--disable-perl-regexp" DOCS="INSTALL NEWS README AUTHORS ABOUT-NLS COPYING THANKS TODO ChangeLog-2009 README-alpha README-release ChangeLog" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np1 -i $W/0001-fix-CVE-2015-1345.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -228,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -248,30 +70,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/locale -name "*.mo"` + 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/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/groff-20160730/PlamoBuild.groff-1.18.1.1 2016-07-30 04:51:27.000000000 +0900 +++ plamo/00_base/groff/PlamoBuild.groff-1.18.1.1 2017-04-06 07:40:57.000000000 +0900 @@ -3,252 +3,45 @@ ###################################################################### url="http://ftp.gnu.org/gnu/groff/old/groff-1.18.1.1.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/groff_1.18.1.1-20.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/groff/groff-1.18.1.1-fix-minus-char.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/groff/groff-1.18.1.1-polyfill_fix.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/groff/groff-1.18.1.1-fix-minus-char.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/groff/groff-1.18.1.1-polyfill_fix.patch.gz" +verify= +commitid= pkgbase=groff vers=1.18.1.1 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers -patchfiles="" +patchfiles="groff_1.18.1.1-20.diff.gz + `echo groff-1.18.1.1-{fix-minus-char,polyfill_fix}.patch.gz`" OPT_CONFIG="--enable-multibyte" DOCS="BUG-REPORT COPYING ChangeLog FDL INSTALL* MANIFEST MORE.STUFF NEWS PROBLEMS PROJECTS README* REVISION TODO VERSION" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - - gunzip -c $W/groff-1.18.1.1-polyfill_fix.patch.gz | patch -Np1 -i - - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -265,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -293,37 +81,23 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $gdocdir/{html,examples,me{ref,intro}.me,pic.ms} $docdir/$src mv $gdocdir/{me{ref,intro},pic}.ps $docdir/$src mv $docdir/$src/{html,examples,me{ref,intro}.me,pic.ms} $C mv $docdir/$src/{me{ref,intro},pic}.ps $C mv $docdir/$src/{BUG-REPORT,COPYING,ChangeLog,FDL,INSTALL*}.gz $C mv $docdir/$src/{MANIFEST,MORE.STUFF,NEWS,PROBLEMS,PROJECTS}.gz $C - mv $docdir/$src/{README*,REVISION,TODO,VERSION,$myname}.gz $C + mv $docdir/$src/{README*,REVISION,TODO,VERSION}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{html,examples,me{ref,intro}.me,pic.ms} $docdir/$src mv $C/{me{ref,intro},pic}.ps $docdir/$src mv $C/{BUG-REPORT,COPYING,ChangeLog,FDL,INSTALL*}.gz $docdir/$src mv $C/{MANIFEST,MORE.STUFF,NEWS,PROBLEMS,PROJECTS}.gz $docdir/$src - mv $C/{README*,REVISION,TODO,VERSION,$myname}.gz $docdir/$src + mv $C/{README*,REVISION,TODO,VERSION}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/groff tar rvpf $pkg.tar -C $P usr/share/groff @@ -335,6 +109,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/grub-20160621/PlamoBuild.grub-2.02~beta2 2016-06-21 22:41:23.000000000 +0900 +++ plamo/00_base/grub/PlamoBuild.grub-2.02~beta2 2017-04-09 13:33:34.000000000 +0900 @@ -1,245 +1,45 @@ #!/bin/sh ###################################################################### -url="http://http.debian.net/debian/pool/main/g/grub2/grub2_2.02~beta2.orig.tar.xz - http://http.debian.net/debian/pool/main/g/grub2/grub2_2.02~beta2-32.debian.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/grub/plamo_grubconfig.tar.gz" +url="https://launchpad.net/ubuntu/+archive/primary/+files/grub2_2.02~beta2.orig.tar.xz + https://launchpad.net/ubuntu/+archive/primary/+files/grub2_2.02~beta2-32.debian.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/grub/plamo_grubconfig.tar.gz" +verify= +commitid= pkgbase=grub vers=2.02~beta2 arch=`uname -m` -build=P13 +build=P14 src[0]=$pkgbase-$vers src[1]=${src[0]} -patchfiles[0]="" -patchfiles[1]="" +patchfiles="" OPT_CONFIG[0]="--disable-grub-mount --disable-werror" OPT_CONFIG[1]="${OPT_CONFIG[0]} --with-platform=efi" -DOCS[0]="BUGS TODO THANKS COPYING ABOUT-NLS ChangeLog AUTHORS README +DOCS="BUGS TODO THANKS COPYING ABOUT-NLS ChangeLog AUTHORS README NEWS INSTALL" -DOCS[1]="" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} for j in `cat $W/debian/patches/series` ; do @@ -251,12 +51,6 @@ done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -273,12 +67,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -317,30 +106,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - false && ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find 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 usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/grub tar rvpf $pkg.tar -C $P usr/share/grub - 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/locale -name *.mo` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` tar rvpf $pkg.tar -C $P etc/grub.d tar rvpf $pkg.tar -C $P `cd $P ; find etc/bash_completion.d | tail -n+2` @@ -349,6 +122,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/gzip-20161120/PlamoBuild.gzip-1.8 2016-11-20 13:16:18.000000000 +0900 +++ plamo/00_base/gzip/PlamoBuild.gzip-1.8 2017-04-05 17:21:57.000000000 +0900 @@ -2,248 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gzip/gzip-1.8.tar.gz" +verify= +commitid= pkgbase=gzip vers=1.8 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--bindir=/bin" DOCS="NEWS INSTALL COPYING README AUTHORS ChangeLog algorithm.doc README-release ChangeLog-2007 TODO THANKS" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | 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 usr/share/info | tail -n+2` @@ -321,6 +80,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/hdsetup-20170407/PlamoBuild.hdsetup-6.2 2017-04-07 13:06:40.000000000 +0900 +++ plamo/00_base/hdsetup/PlamoBuild.hdsetup-6.2 2018-01-26 08:36:44.000000000 +0900 @@ -14,11 +14,13 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.26-no-gets.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/hdsetup/hdsetup-plamoscripts.tar.gz" verify= +digest= +branch= commitid= pkgbase=hdsetup vers=6.2 arch=`uname -m` -build=P2 +build=P3 src[0]=busybox-1.25.1 src[1]=dialog-1.3-20160828 src[2]=coreutils-8.25 @@ -47,7 +49,7 @@ --disable-lzmainfo --disable-lzma-links --disable-scripts" OPT_CONFIG[6]="--bindir=/bin" DOCS="LICENSE INSTALL TODO AUTHORS README TODO_unicode" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/00_base/old/hibernate_script-20160107/PlamoBuild.hibernate_script-2.0 2016-01-07 13:18:05.000000000 +0900 +++ plamo/00_base/hibernate_script/PlamoBuild.hibernate_script-2.0 2017-04-07 14:36:04.000000000 +0900 @@ -1,218 +1,48 @@ #!/bin/sh ###################################################################### -url="http://tuxonice.net/files/hibernate-script-2.0.tar.gz" +url="http://tuxonice.nigelcunningham.com.au/downloads/all/hibernate-script-2.0.tar.gz" +verify= +commitid= pkgbase=hibernate_script vers=2.0 arch=noarch -build=P4 +build=P5 src=hibernate-script-$vers +patchfiles="" OPT_CONFIG="" DOCS="COPYING SCRIPTLET-API README.xfs README CHANGELOG" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p install.sh{,.orig} sed -i '/MAN_DIR=/s@man@share/man@g' install.sh for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -226,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -251,24 +76,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/hibernate tar rvpf $pkg.tar -C $P etc/hibernate @@ -278,6 +87,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/iproute2-20160107/PlamoBuild.iproute2-4.2.0 2016-01-07 07:54:00.000000000 +0900 +++ plamo/00_base/iproute2/PlamoBuild.iproute2-4.2.0 2017-04-07 15:09:10.000000000 +0900 @@ -2,215 +2,44 @@ ###################################################################### url="https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.2.0.tar.xz" +verify= +commitid= pkgbase=iproute2 vers=4.2.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="COPYING README*" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -224,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -246,28 +70,12 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/tc - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/iproute2 $docdir/$src/doc - mv $docdir/$src/{doc,$myname.gz} $C - mv $C/{doc,$myname.gz} $docdir/$src + mv $docdir/$src/{doc,{$func,$myname,$spec}.gz} $C + mv $C/{doc,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links touch -t `date '+%m%d0900'` $P/usr/$libdir/tc tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/tc @@ -280,6 +88,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/iputils-20170407/PlamoBuild.iputils-s20101006 2017-04-07 16:26:40.000000000 +0900 +++ plamo/00_base/iputils/PlamoBuild.iputils-s20101006 2020-05-04 21:11:52.000000000 +0900 @@ -6,16 +6,18 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/iputils/iputils-s20100418-doc-1.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/iputils/iputils-s20101006-Makefile.patch.gz" verify= +digest= +branch= commitid= pkgbase=iputils vers=s20101006 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="`echo iputils-s2010{{1006-fixes,0418-doc}-1,1006-Makefile}.patch.gz`" OPT_CONFIG="" DOCS="INSTALL RELNOTES" -template=20170323 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -72,16 +74,16 @@ done install -d $P/{bin,usr/{sbin,bin}} install ping{,6} $P/bin - chmod +s $P/bin/ping{,6} + chmod u+s $P/bin/ping{,6} install arping clockdiff tracepath{,6} $P/usr/sbin install traceroute6 $P/usr/bin - chmod +s $P/usr/bin/traceroute6 + chmod u+s $P/usr/bin/traceroute6 install -d $P/usr/share/man/man8 install -m 644 doc/*.8 $P/usr/share/man/man8 touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -90,7 +92,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/bin | 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 - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/kbd-20161124/PlamoBuild.kbd-1.15.5 2016-11-24 09:12:52.000000000 +0900 +++ plamo/00_base/kbd/PlamoBuild.kbd-1.15.5 2017-04-07 15:27:56.000000000 +0900 @@ -5,248 +5,42 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15-backspace-1.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15-plamo-compat.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15.5-revert_loadkeys_analize.patch.gz" +verify= +commitid= pkgbase=kbd vers=1.15.5 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="`echo kbd-1.15-{backspace-1,plamo-compat}.patch.gz` kbd-1.15.5-revert_loadkeys_analize.patch.gz" OPT_CONFIG="" DOCS="INSTALL ChangeLog NEWS AUTHORS CREDITS COPYING ABOUT-NLS README" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -288,38 +77,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/usr/share/keymaps touch -t `date '+%m%d0900'` $P/usr/share/keymaps tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` @@ -334,6 +93,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/kernel-20210724/PlamoBuild.kernel-5.4.51_plamo@LV@ 2021-07-24 07:39:12.000000000 +0900 +++ plamo/00_base/kernel/PlamoBuild.kernel-5.4.51_plamo@LV@ 2021-09-22 19:58:03.000000000 +0900 @@ -21,7 +21,7 @@ pkgbase=kernel vers=5.4.51_plamo@LV@ arch=`uname -m` -build=P1 +build=P2 src=linux-5.4.51 patchfiles="" OPT_CONFIG="" @@ -42,6 +42,9 @@ fscheck case `uname -m` in i686) lv=SMP ;; x86_64) lv=64 ;; armv7l) lv=RPi2 ;; esac url=${url/@LV@/$lv} ; vers=${vers/@LV@/$lv} +if [ `uname -m` == armv7l ] ; then + src[0]=linux-5.4.51 ; src[1]=${src[0]} +fi prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources @@ -51,52 +54,69 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches - cd $B - patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch - patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch - bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch - cp -av $W/aufs5-standalone/Documentation . - cp -av $W/aufs5-standalone/fs . - cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.4-panic_beep.patch - patch -Np1 -i $W/5.4-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - - chmod 755 scripts/tuxonice_output_to_csv.sh - patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch - if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - - patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch - rm -rf .github - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} - fi - cp -p $W/config-5.4.51-plamo$lv .config - if [ $arch == i686 -o $arch == x86_64 ] ; then - cp -p arch/x86/boot/install.sh{,.orig} - head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh - sed -i '/INSTALLKERNEL/s@^@#@g' arch/x86/boot/install.sh - cat <<- "EOF" | patch arch/x86/boot/install.sh + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} + patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch + patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch + bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch + cp -av $W/aufs5-standalone/Documentation . + cp -av $W/aufs5-standalone/fs . + cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux + patch -Np1 -i $W/5.4-panic_beep.patch + patch -Np1 -i $W/5.4-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - + chmod 755 scripts/tuxonice_output_to_csv.sh + patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch + if [ `uname -m` == armv7l ] ; then + unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - + patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch + rm -rf .github + chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} + fi + cp -p $W/config-5.4.51-plamo$lv .config + if [ $i -eq 1 ] ; then + scripts/config --set-str LOCALVERSION "-plamoLPAE" -e ARM_LPAE \ + -e VMSPLIT_3G -d VMSPLIT_2G -e HIGHMEM -e PCIE_BRCMSTB --refresh + fi + if [ $arch == i686 -o $arch == x86_64 ] ; then + cp -p arch/x86/boot/install.sh{,.orig} + head -n-9 arch/x86/boot/install.sh.orig > arch/x86/boot/install.sh + sed -i '/INSTALLKERNEL/s@^@#@g' arch/x86/boot/install.sh + cat <<- "EOF" | patch arch/x86/boot/install.sh 48a49 > cp .config $4/config-$1 EOF - sed -i '/\(vmlinuz\|System.map\)$/s@$@-\$1@g' arch/x86/boot/install.sh - else - cp -p arch/arm/boot/install.sh{,.orig} - sed -i '/INSTALLKERNEL/s@^@#@g' arch/arm/boot/install.sh - cat <<- "EOF" | patch arch/arm/boot/install.sh - 40a41,42 - > cp .config $4/config-$1 + sed -i '/\(vmlinuz\|System.map\)$/s@$@-\$1@g' arch/x86/boot/install.sh + else + cp -p arch/arm/boot/install.sh{,.orig} + sed -i '/INSTALLKERNEL/s@^@#@g' arch/arm/boot/install.sh + cat <<- "EOF" | patch arch/arm/boot/install.sh + 40a41,43 + > l=`[[ $1 =~ LPAE ]] && echo l` + > cp .config $4/config$l-$1 > - 54c56 - < cat $2 > $4/$base-$1 + 44c47 + < base=vmlinuz + --- + > base=kernel7$l.img + 57,58c60,61 + < if [ -f $4/System.map-$1 ]; then + < mv $4/System.map-$1 $4/System.map-$1.old --- - > cat $2 > $4/kernel7.img-$1 + > if [ -f $4/System$l.map-$1 ]; then + > mv $4/System$l.map-$1 $4/System$l.map-$1.old + 60c63 + < cp $3 $4/System.map-$1 + --- + > cp $3 $4/System$l.map-$1 EOF - fi + fi + done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -127,6 +147,7 @@ make modules_install INSTALL_MOD_PATH=$P fi done + cd $B krel=${vers//_/-} if [ $arch == i686 -o $arch == x86_64 ] ; then ln -s config-$krel $P/boot/config @@ -136,13 +157,21 @@ cp -p $P/boot/config{-$krel,} cp -p $P/boot/kernel7.img{-$krel,} cp -p $P/boot/System.map{-$krel,} - install -m 644 $B/arch/arm/boot/dts/*.dtb $P/boot + krel2=${krel//RPi2/LPAE} + cp -p $P/boot/configl{-$krel2,} + cp -p $P/boot/kernel7l.img{-$krel2,} + cp -p $P/boot/Systeml.map{-$krel2,} + install -m 644 arch/arm/boot/dts/*.dtb $P/boot install -d $P/boot/overlays - install -m 644 $B/arch/arm/boot/dts/overlays/README $P/boot/overlays - install -m 644 $B/arch/arm/boot/dts/overlays/*.dtbo $P/boot/overlays + install -m 644 arch/arm/boot/dts/overlays/README $P/boot/overlays + install -m 644 arch/arm/boot/dts/overlays/*.dtbo $P/boot/overlays fi ln -sfn /usr/src/$src $P/lib/modules/$krel/source ln -sfn /usr/src/$src $P/lib/modules/$krel/build + if [ $arch == armv7l ] ; then + ln -sfn /usr/src/$src $P/lib/modules/$krel2/source + ln -sfn /usr/src/$src $P/lib/modules/$krel2/build + fi touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ @@ -152,10 +181,10 @@ setup_docdir convert_links prune_symlink $P/boot - prune_symlink $P/lib/modules/$krel - TZ=UTC touch -t `date -u '+%m%d0000'` $P/lib/modules/$krel + prune_symlink $P/lib/modules + TZ=UTC touch -t `date -u '+%m%d0000'` $P/lib/modules/* tar cvpf $pkg.tar -C $P `cd $P ; find boot -maxdepth 1 | tail -n+2` - tar rvpf $pkg.tar -C $P lib/modules/$krel + tar rvpf $pkg.tar -C $P `cd $P ; find lib/modules -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src tar rvpf $pkg.tar -C $P install/doinst.sh TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar --- plamo/00_base/old/kmod-20160606/PlamoBuild.kmod-22 2016-06-06 08:18:11.000000000 +0900 +++ plamo/00_base/kmod/PlamoBuild.kmod-22 2017-04-07 15:47:32.000000000 +0900 @@ -2,233 +2,41 @@ ###################################################################### url="https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-22.tar.xz" +verify= +commitid= pkgbase=kmod vers=22 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--bindir=/bin" DOCS="NEWS COPYING TODO README" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -245,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,24 +95,8 @@ install usblp /bin/true EOF touch -t `date '+%m%d0900'` $P/etc/modprobe.d{,/plamo-default.conf.new} - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- "EOF" >> $P/install/doinst.sh mv etc/modprobe.d/plamo-default.conf.new /tmp @@ -335,6 +122,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/less-20170407/PlamoBuild.less-382 2017-04-07 16:07:12.000000000 +0900 +++ plamo/00_base/less/PlamoBuild.less-382 2017-06-24 13:49:07.000000000 +0900 @@ -10,16 +10,19 @@ ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/distfiles/less-382-iso262.ext03.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/less/less-382-def_priority.patch.gz" verify= +digest= commitid= pkgbase=less vers=382 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers -patchfiles="" +patchfiles="`echo less-382-iso25{8,8-259,9-260}.patch.gz` + `echo less-382-iso26{0-261,1-262,2.ext03}.patch.gz` + less-382-def_priority.patch.gz" OPT_CONFIG="" DOCS="COPYING INSTALL LICENSE NEWS README" -template=20170323 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -41,16 +44,10 @@ 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 + chmod +w $B/* apply_patches cd $B - gunzip -c $W/less-382-iso258.patch.gz | patch -Np1 -fT -i - - gunzip -c $W/less-382-iso258-259.patch.gz | patch -Np1 -i - - gunzip -c $W/less-382-iso259-260.patch.gz | patch -Np1 -fT -i - - gunzip -c $W/less-382-iso260-261.patch.gz | patch -Np1 -i - - gunzip -c $W/less-382-iso261-262.patch.gz | patch -Np1 -i - - gunzip -c $W/less-382-iso262.ext03.patch.gz | patch -Np1 -fT -i - - gunzip -c $W/less-382-def_priority.patch.gz | patch -Np1 -i - - cp -p Makefile.in Makefile.in.orig ; chmod 644 Makefile.in + cp -p Makefile.in{,.orig} sed -i -e '/^\t\${INSTALL_/s@\${bindir@$(DESTDIR)&@g' \ -e '/^\t\${INSTALL_/s@\${mandir@$(DESTDIR)&@g' \ -e '/\/mkinstalldirs/s@\${bindir@$(DESTDIR)&@g' \ @@ -148,18 +145,17 @@ compress setup_docdir cp -p $B/{LICENSE,README.{iso{,.jp},ext.jp}} $docdir/$src - chmod 644 $docdir/$src/LICENSE + touch -t 200508302245.48 $docdir/$src/LICENSE + touch -t 200602180957.24 $docdir/$src/README.iso{,.jp} + touch -t 201106291956.57 $docdir/$src/README.ext.jp + nkf -e --overwrite $docdir/$src/README.iso.jp chown root.root $docdir/$src/{LICENSE,README.{iso{,.jp},ext.jp}} - nkf -e --in-place $docdir/$src/README.iso.jp - touch -r $B/README.iso.jp $docdir/$src/README.iso.jp rm $docdir/$src/LICENSE.gz for i in LICENSE README.{iso{,.jp},ext.jp} ; do gzip_one $docdir/$src/$i done - mv $docdir/$src/README.{iso{,.jp},ext.jp}.gz $C - mv $docdir/$src/{$func,$myname,$spec}.gz $C - mv $C/README.{iso{,.jp},ext.jp}.gz $docdir/$src - mv $C/{$func,$myname,$spec}.gz $docdir/$src + mv $docdir/$src/{README.{iso{,.jp},ext.jp},$func,$myname,$spec}.gz $C + mv $C/{README.{iso{,.jp},ext.jp},$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` --- plamo/00_base/old/libcap-20160107/PlamoBuild.libcap-2.22 2016-01-07 09:39:29.000000000 +0900 +++ plamo/00_base/libcap/PlamoBuild.libcap-2.22 2017-04-29 11:14:59.000000000 +0900 @@ -2,214 +2,44 @@ ###################################################################### url="http://ftp.de.debian.org/debian/pool/main/libc/libcap2/libcap2_2.22.orig.tar.gz" +verify= +commitid= pkgbase=libcap vers=2.22 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="CHANGELOG License README" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +53,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -249,24 +74,9 @@ compress strip_libdir $P/$libdir/security touch -t `date '+%m%d0900'` $P/$libdir/security - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + touch -t `date '+%m%d0900'` $docdir/$src + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find $libdir -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` @@ -278,6 +88,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/libgcc-20170408/PlamoBuild.libgcc-4.8.5 2017-04-08 16:45:17.000000000 +0900 +++ plamo/00_base/libgcc/PlamoBuild.libgcc-4.8.5 2017-10-15 19:50:35.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2" verify= +digest= +branch= commitid= pkgbase=libgcc vers=4.8.5 arch=`uname -m` -build=P3 +build=P4 src=gcc-$vers -patchfiles="gcc-4.8-filename-output.patch" +patchfiles="" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -18,7 +19,7 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/00_base/old/libtirpc-20160826/PlamoBuild.libtirpc-0.2.3 2016-08-26 13:45:34.000000000 +0900 +++ plamo/00_base/libtirpc/PlamoBuild.libtirpc-0.2.3 2017-04-17 14:29:27.000000000 +0900 @@ -2,254 +2,47 @@ ###################################################################### url="http://downloads.sourceforge.net/libtirpc/libtirpc-0.2.3.tar.bz2 - http://www.linuxfromscratch.org/patches/downloads/libtirpc/libtirpc-0.2.3-remove_nis-1.patch - http://sourceforge.net/p/libtirpc/mailman/attachment/1364308888.2660.119.camel%40willson.li.ssimo.org/1" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/libtirpc/libtirpc-0.2.3-remove_nis-1.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/libtirpc/0001-Switch-to-use-standard-GSSAPI-by-default.patch" +verify= +digest= +commitid= pkgbase=libtirpc vers=0.2.3 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers -patchfiles="" +patchfiles="libtirpc-0.2.3-remove_nis-1.patch + 0001-Switch-to-use-standard-GSSAPI-by-default.patch" OPT_CONFIG="" DOCS="VERSION TODO THANKS README NEWS INSTALL ChangeLog COPYING AUTHORS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=0001-Switch-to-use-standard-GSSAPI-by-default.patch - for i in $url ; do - if [ ${i##*/} == 1 ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - patch -Np1 -i $W/libtirpc-0.2.3-remove_nis-1.patch - patch -Np1 -i $W/0001-Switch-to-use-standard-GSSAPI-by-default.patch autoreconf for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,24 +80,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links rm $P/usr/$libdir/libtirpc.so.1.0.10 tar cvpf $pkg.tar -C $P `cd $P ; find $libdir | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -322,6 +94,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/lilo-20160323/PlamoBuild.lilo-24.2 2016-03-23 07:18:35.000000000 +0900 +++ plamo/00_base/lilo/PlamoBuild.lilo-24.2 2017-04-22 18:00:47.000000000 +0900 @@ -2,213 +2,50 @@ ###################################################################### url="http://lilo.alioth.debian.org/ftp/sources/lilo-24.2.tar.gz - ftp://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/Dev86src-0.16.18.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/lilo/dev86-0.16.17-x86_64.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/lilo/dev86-0.16.17-copt.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/lilo/plamo_liloconfig.tar.gz" + ftp://ftp.tw.freebsd.org/pub/FreeBSD/FreeBSD/ports/distfiles/Dev86src-0.16.18.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/lilo/dev86-0.16.17-x86_64.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/lilo/dev86-0.16.17-copt.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/lilo/plamo_liloconfig.tar.gz" +verify= +digest= +commitid= pkgbase=lilo vers=24.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="`echo readme/README.{bitmaps,common.problems,disk,nokeyboard}` `echo readme/{README.{pseudo,volumeID,raid1},INCOMPAT,README}` NEWS CHANGELOG TODO README COPYING CHANGELOG_old TOOLS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - cp -p checkit checkit.orig - sed 's@^gcc @LANG=C gcc @g' checkit.orig > checkit - cp -p diagnose/Makefile diagnose/Makefile.orig + cp -p checkit{,.orig} + sed -i 's@^gcc @LANG=C &@g' checkit + cp -p diagnose/Makefile{,.orig} cat <<- "EOF" | patch diagnose/Makefile 36c36 < @if [ -x /usr/bin/bcc -o -x /usr/local/bin/bcc ]; then echo Okay; \ @@ -219,18 +56,12 @@ gunzip -c $W/dev86-0.16.17-x86_64.patch.gz | patch -Np1 -i - gunzip -c $W/dev86-0.16.17-copt.patch.gz | patch -Np1 -i - make PREFIX=$W/dev86 install - PATH="$W/dev86/bin:$PATH" + PATH=$W/dev86/bin:$PATH for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -244,12 +75,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -276,23 +102,7 @@ cp -p plamo_liloconfig/var/log/setup/$i $P/var/log/setup chown root.root $P/var/log/setup/$i done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mkdir $docdir/$src/sample for i in sample/lilo.{old-{raid,special},example}.conf \ images/{{inside,onlyblue,tuxlogo}_16c.dat,README} ; do @@ -302,11 +112,13 @@ cp -a $S/doc $docdir/$src chown -R root.root $docdir/$src/{sample,doc} mv $docdir/$src/{readme,sample,{NEWS,CHANGELOG,TODO,README}.gz} $C - mv $docdir/$src/{{COPYING,CHANGELOG_old,TOOLS}.gz,doc,$myname.gz} $C + mv $docdir/$src/{{COPYING,CHANGELOG_old,TOOLS}.gz,doc} $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{readme,sample,{NEWS,CHANGELOG,TODO,README}.gz} $docdir/$src - mv $C/{{COPYING,CHANGELOG_old,TOOLS}.gz,doc,$myname.gz} $docdir/$src + mv $C/{{COPYING,CHANGELOG_old,TOOLS}.gz,doc} $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find boot | tail -n+2` @@ -317,6 +129,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/linux_firmware-20170417/PlamoBuild.linux_firmware-git_20160112 2017-04-17 15:47:29.000000000 +0900 +++ plamo/00_base/linux_firmware/PlamoBuild.linux_firmware-git_20190726 2019-08-09 21:47:26.000000000 +0900 @@ -4,30 +4,32 @@ url="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" verify= digest= -commitid=40e9ae8 +branch= +commitid=dff98c6 pkgbase=linux_firmware -vers=git_20160112 +vers=git_20190726 arch=noarch -build=P3 +build=P1 src=linux-firmware patchfiles="" OPT_CONFIG="" -DOCS="GPL-3 `echo LICENCE.{Abilis,IntcSST2,Marvell,OLPC}` LICENSE.radeon - `echo LICENCE.{agere,atheros_firmware,broadcom_bcm43xx,ca0132}` - `echo LICENCE.{chelsio_firmware,cw1200}` README LICENCE.ene_firmware - `echo LICENCE.{fw_sst_0f28,go7007,i2400m,ibt_firmware,it913x}` - `echo LICENCE.{iwlwifi_firmware,adsp_sst}` WHENCE LICENCE.mwl8335 - `echo LICENCE.{myri10ge_firmware,phanfw,qla2xxx,r8a779x_usb3}` +DOCS="GPL-* `echo LICENCE.{Abilis,IntcSST2,Marvell,Netronome,OLPC,adsp_sst}` + `echo LICENCE.{agere,atheros_firmware,broadcom_bcm43xx,ca0132,cadence}` + `echo LICENCE.{cavium,cavium_liquidio,chelsio_firmware,cw1200,cypress}` + `echo LICENCE.{e100,ene_firmware,fw_sst_0f28,go7007,i2400m,ibt_firmware}` + `echo LICENCE.{it913x,iwlwifi_firmware,kaweth,mediatek,microchip,moxa}` + `echo LICENCE.{myri10ge_firmware,nvidia,open-ath9k-htc-firmware,phanfw}` + `echo LICENCE.{qat_firmware,qla1280,qla2xxx,r8a779x_usb3}` `echo LICENCE.{ralink-firmware.txt,ralink_a_mediatek_company_firmware}` - `echo LICENCE.{rtlwifi_firmware.txt,siano,tda7706-firmware.txt}` - `echo LICENCE.{ti-connectivity,ueagle-atm4-firmware,via_vt6656,wl1251}` - `echo LICENCE.{xc4000,xc5000,xc5000c}` `echo LICENSE.{amd-ucode,dib0700}` - `echo TDA7706_OM_{v2.5.1,v3.0.2}_boot.txt` `echo LICENCE.{cavium,e100}` - `echo LICENCE.{kaweth,moxa,nvidia,open-ath9k-htc-firmware,qat_firmware}` - `echo LICENCE.{qla1280,ti-keystone}` - `echo LICENSE.{QualcommAtheros_{ar3k,ath10k},amdgpu,atmel,hfi1_firmware}` - LICENSE.i915 ChangeLog" -template=20170415 + `echo LICENCE.{rockchip,rtlwifi_firmware.txt,siano,tda7706-firmware.txt}` + `echo LICENCE.{ti-connectivity,ti-keystone,ueagle-atm4-firmware}` + `echo LICENCE.{via_vt6656,wl1251,xc4000,xc5000,xc5000c}` + `echo LICENSE.{QualcommAtheros_ar3k,QualcommAtheros_ath10k,amd-sev}` + `echo LICENSE.{amd-ucode,amdgpu,amlogic_vdec,atmel,dib0700,hfi1_firmware}` + `echo LICENSE.{i915,ipu3_firmware,nxp_mc_firmware,qcom,radeon}` + LICENSE.sdma_firmware README `echo TDA7706_OM_{v2.5.1,v3.0.2}_boot.txt` + WHENCE ChangeLog" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -79,21 +81,28 @@ make install DESTDIR=$P fi done + rm $P/lib/firmware/ChangeLog touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir - touch -t `date '+%m%d0900'` $docdir/$src + TZ=UTC touch -t `date -u '+%m%d0000'` $docdir/$src convert_links - for i in . cxgb4 libertas ti-connectivity ; do - touch -t `date '+%m%d0900'` $P/lib/firmware/$i + for i in . brcm cxgb4 i915 intel libertas netronome netronome/flower \ + nvidia/gm204/acr nvidia/gm204/gr nvidia/gm206/acr nvidia/gm206/gr \ + nvidia/gm20b/gr nvidia/gp100/gr nvidia/gp102/gr nvidia/gp104/acr \ + nvidia/gp104/gr nvidia/gp104/nvdec nvidia/gp104/sec2 nvidia/gp106/acr \ + nvidia/gp106/gr nvidia/gp106/nvdec nvidia/gp106/sec2 nvidia/gp107/acr \ + nvidia/gp107/gr nvidia/gp107/nvdec nvidia/gp107/sec2 nvidia/gp108/acr \ + nvidia/gp108/nvdec nvidia/gp108/sec2 ti-connectivity ; do + TZ=UTC touch -t `date -u '+%m%d0000'` $P/lib/firmware/$i done tar cvpf $pkg.tar -C $P lib/firmware 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/linux_pam-20161121/PlamoBuild.linux_pam-1.1.8 2016-11-21 18:30:32.000000000 +0900 +++ plamo/00_base/linux_pam/PlamoBuild.linux_pam-1.1.8 2017-05-08 14:48:20.000000000 +0900 @@ -1,251 +1,46 @@ #!/bin/sh ###################################################################### -url="https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-1.1.8.tar.bz2 +url="http://www.linux-pam.org/library/Linux-PAM-1.1.8.tar.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/linux_pam/pam-1.1.8-cve-2013-7041.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/linux_pam/pam-1.1.8-cve-2014-2583.patch" +verify= +digest= +commitid= pkgbase=linux_pam vers=1.1.8 arch=`uname -m` -build=P3 +build=P4 src=Linux-PAM-$vers patchfiles="`echo pam-1.1.8-cve-{2013-7041,2014-2583}.patch`" OPT_CONFIG="--enable-static --enable-read-both-confs --disable-nis" DOCS="NEWS ABOUT-NLS Copyright README COPYING AUTHORS CHANGELOG ChangeLog INSTALL ChangeLog-CVS" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir=/usr/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -313,7 +103,7 @@ # # The PAM configuration file for shutdown/reboot operations # - + auth sufficient pam_rootok.so auth required pam_unix.so @@ -354,53 +144,23 @@ compress strip_libdir $P/$libdir/security touch -t `date '+%m%d0900'` $P/$libdir/security - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/Linux-PAM $docdir/$src/doc mv $docdir/$src/{doc,{ABOUT-NLS,Copyright,README,COPYING,AUTHORS}.gz} $C mv $docdir/$src/{CHANGELOG,ChangeLog,INSTALL,ChangeLog-CVS}.gz $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{doc,{ABOUT-NLS,Copyright,README,COPYING,AUTHORS}.gz} $docdir/$src mv $C/{CHANGELOG,ChangeLog,INSTALL,ChangeLog-CVS}.gz $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links prune_symlink $P/etc/pam.d touch -t `date '+%m%d0900'` $P/etc/pam.d tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find $libdir -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/security - 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/locale -name *.mo` tar rvpf $pkg.tar -C $P etc/{security,environment,pam.d,securetty} 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` @@ -409,6 +169,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/logrotate-20160606/PlamoBuild.logrotate-3.8.1 2016-06-06 08:26:47.000000000 +0900 +++ plamo/00_base/logrotate/PlamoBuild.logrotate-3.8.1 2017-04-24 11:52:59.000000000 +0900 @@ -1,234 +1,43 @@ #!/bin/sh ###################################################################### -url="https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.1.tar.gz" +url="http://ftp.nara.wide.ad.jp/pub/sunfreeware/SOURCES/logrotate-3.8.1.tar.gz" +verify= +digest= +commitid= pkgbase=logrotate vers=3.8.1 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="README.HPUX README.Solaris CHANGES COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -245,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -306,29 +110,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/examples $docdir/$src chown -R root.root $docdir/$src/examples - mv $docdir/$src/{examples,{COPYING,$myname}.gz} $C - mv $C/{examples,{COPYING,$myname}.gz} $docdir/$src + mv $docdir/$src/{examples,{COPYING,$func,$myname,$spec}.gz} $C + mv $C/{examples,{COPYING,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh mv etc/logrotate.conf.new /tmp @@ -347,6 +135,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/lsb_release-20170220/PlamoBuild.lsb_release-1.4 2017-02-20 19:21:26.000000000 +0900 +++ plamo/00_base/lsb_release/PlamoBuild.lsb_release-1.4 2017-04-24 12:27:45.000000000 +0900 @@ -2,239 +2,40 @@ ###################################################################### url="http://downloads.sourceforge.net/lsb/lsb-release-1.4.tar.gz" +verify= +digest= +commitid= pkgbase=lsb_release vers=1.4 arch=noarch -build=P7 +build=P8 src=lsb-release-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog INSTALL README lsb-release.template lsb_release.examples" -template=20170204 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile{,.orig} sed -i -e '/^prefix=/s@/local@@g' -e '/^mandir=/s@/man@/share/man@g' \ @@ -242,12 +43,6 @@ -e '/^mandir=/!s@${prefix}@$(DESTDIR)&@g' Makefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -264,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -288,44 +78,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P etc/plamo-release 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/lvm2-20161203/PlamoBuild.lvm2-2.02.90 2016-12-03 15:49:01.000000000 +0900 +++ plamo/00_base/lvm2/PlamoBuild.lvm2-2.02.90 2017-04-24 12:39:14.000000000 +0900 @@ -2,10 +2,13 @@ ###################################################################### url="ftp://sources.redhat.com/pub/lvm2/releases/LVM2.2.02.90.tgz" +verify= +digest= +commitid= pkgbase=lvm2 vers=2.02.90 arch=`uname -m` -build=P4 +build=P5 src=LVM2.$vers patchfiles="" OPT_CONFIG="--exec-prefix= --enable-static_link --enable-applib @@ -13,242 +16,34 @@ --with-thin=internal" DOCS="COPYING.LIB COPYING INSTALL VERSION_DM README VERSION WHATS_NEW WHATS_NEW_DM" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p daemons/dmeventd/Makefile.in{,.orig} sed -i 's@$(ELDFLAGS) @@' daemons/dmeventd/Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +61,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,38 +82,8 @@ compress strip_libdir $P/$libdir/device-mapper touch -t `date '+%m%d0900'` $P/$libdir/device-mapper - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find $libdir -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -336,6 +96,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/lzo-20160113/PlamoBuild.lzo-2.09 2016-01-13 13:13:06.000000000 +0900 +++ plamo/00_base/lzo/PlamoBuild.lzo-2.09 2017-04-24 13:23:34.000000000 +0900 @@ -2,214 +2,45 @@ ###################################################################### url="http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz" +verify= +digest= +commitid= pkgbase=lzo vers=2.09 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--enable-shared" DOCS="AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -243,35 +69,18 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/{doc,examples} $docdir/$src chown -R root.root $docdir/$src/{doc,examples} - mv $docdir/$src/{doc,examples,$myname.gz} $C - mv $C/{doc,examples,$myname.gz} $docdir/$src + mv $docdir/$src/{doc,examples,{$func,$myname,$spec}.gz} $C + mv $C/{doc,examples,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/lzo | 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/man-20160113/PlamoBuild.man-1.6g 2016-01-13 21:15:05.000000000 +0900 +++ plamo/00_base/man/PlamoBuild.man-1.6g 2017-04-29 10:56:37.000000000 +0900 @@ -2,204 +2,41 @@ ###################################################################### url="http://www.ibiblio.org/pub/Linux/apps/doctools/man/man-1.6g.tar.gz" +verify= +digest= +commitid= pkgbase=man vers=1.6g arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="COPYING README README.HP README.GNU-WIN32 INSTALL TODO LSM README.IRIX HISTORY" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p src/man.conf.in{,.orig} cat <<- "EOF" | patch src/man.conf.in @@ -208,7 +45,7 @@ --- > MANPATH /opt/kde/share/man > MANPATH /opt/mysql/man - > MANPATH /opt/texlive/2009/texmf/doc/man + > MANPATH /opt/texlive/2015/texmf/doc/man 67,69c69,71 < MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man < MANPATH_MAP /usr/bin/X11 /usr/X11R6/man @@ -216,16 +53,10 @@ --- > MANPATH_MAP /opt/kde/bin /opt/kde/share/man > MANPATH_MAP /opt/mysql/bin /opt/mysql/man - > MANPATH_MAP /opt/texlive /opt/texlive/2009/texmf/doc/man + > MANPATH_MAP /opt/texlive /opt/texlive/2015/texmf/doc/man EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure -confdir /etc +fhs +lang all fi @@ -240,12 +71,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -266,28 +92,12 @@ gzip_dir $mandir/$i/man5 gzip_dir $mandir/$i/man8 done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/sbin | tail -n+2` tar rvpf $pkg.tar -C $P etc/man.conf - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name "man"` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name man` 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/man5 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` @@ -299,6 +109,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/mdadm-20160113/PlamoBuild.mdadm-3.2.3 2016-01-13 21:44:34.000000000 +0900 +++ plamo/00_base/mdadm/PlamoBuild.mdadm-3.2.3 2017-04-24 13:46:02.000000000 +0900 @@ -2,218 +2,49 @@ ###################################################################### url="http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-3.2.3.tar.bz2" +verify= +digest= +commitid= pkgbase=mdadm vers=3.2.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="mdmon-design.txt COPYING ANNOUNCE-3.0.3 ANNOUNCE-3.1.2 TODO ANNOUNCE-3.0.2 ANNOUNCE-3.1.1 INSTALL ANNOUNCE-3.2.2 ANNOUNCE-3.2.3 ANNOUNCE-3.2.1 ANNOUNCE-3.1 README.initramfs ANNOUNCE-3.1.3 ANNOUNCE-3.0.1 ANNOUNCE-3.1.4 ANNOUNCE-3.1.5 ChangeLog ANNOUNCE-3.0 external-reshape-design.txt ANNOUNCE-3.2" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -227,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -249,24 +75,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find lib/udev/rules.d | tail -n+2` tar rvpf $pkg.tar -C $P etc/mdadm.conf @@ -276,6 +86,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/microcode_ctl-20170424/PlamoBuild.microcode_ctl-2.1_6 2017-04-24 19:55:56.000000000 +0900 +++ plamo/00_base/microcode_ctl/PlamoBuild.microcode_ctl-2.1_6 2018-12-26 21:00:56.000000000 +0900 @@ -1,20 +1,21 @@ #!/bin/sh ###################################################################### -url="http://ftp.jaist.ac.jp/pub/Linux/Momonga/development/source/SOURCES/microcode_ctl-2.1-6.tar.xz - http://downloadmirror.intel.com/24616/eng/microcode-20150107.tgz" +url="https://releases.pagure.org/microcode_ctl/microcode_ctl-2.1-6.tar.xz + https://files01.tchspt.com/tempd/microcode-20180108.tgz" verify= digest= +branch= commitid= pkgbase=microcode_ctl vers=2.1_6 arch=`uname -m` -build=P4 +build=P6 src=$pkgbase-2.1-6 patchfiles="" OPT_CONFIG="" DOCS="README Changelog" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -50,7 +51,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make MICROCODE_INTEL=$W/microcode-20150107.tgz + make MICROCODE_INTEL=$W/microcode-20180108.tgz fi done fi @@ -67,15 +68,22 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir + cp -a $W/releasenote $docdir/$src + chmod g-w $docdir/$src/releasenote + chown root.root $docdir/$src/releasenote + gzip_one $docdir/$src/releasenote + mv $docdir/$src/{releasenote,$func,$myname,$spec}.gz $C + mv $C/{releasenote,$func,$myname,$spec}.gz $docdir/$src + touch -r $S $docdir/$src convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P lib/firmware/intel-ucode tar rvpf $pkg.tar -C $P usr/share/doc/$src - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/mlocate-20170424/PlamoBuild.mlocate-0.24 2017-04-24 20:04:59.000000000 +0900 +++ plamo/00_base/mlocate/PlamoBuild.mlocate-0.26 2017-04-29 10:58:10.000000000 +0900 @@ -1,18 +1,18 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/kongoni/mlocate-0.24.tar.xz" +url="https://fossies.org/linux/privat/mlocate-0.26.tar.xz" verify= digest= commitid= pkgbase=mlocate -vers=0.24 +vers=0.26 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README ChangeLog NEWS INSTALL AUTHORS ABOUT-NLS COPYING" +DOCS="README NEWS AUTHORS INSTALL ABOUT-NLS COPYING ChangeLog" template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -66,10 +66,8 @@ done install -d $P/etc cat <<- "EOF" > $P/etc/updatedb.conf - PRUNEFS="sysfs selinuxfs usbdevfs devpts NFS nfs nfs4 afs sfs proc - smbfs cifs autofs auto iso9660 udf" - PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /net /sfs /selinux /udev - /mnt/floppy /media" + PRUNEFS="afs auto autofs cifs devpts iso9660 nfs nfs4 proc selinuxfs sfs smbfs sysfs udf usbfs" + PRUNEPATHS="/afs /media /mnt /net /sfs /tmp /udev /var/tmp" EOF install -d $P/etc/cron.daily cat <<- "EOF" > $P/etc/cron.daily/mlocate @@ -86,7 +84,7 @@ 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/share/locale -name "*.mo"` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` tar rvpf $pkg.tar -C $P var/mlocate tar rvpf $pkg.tar -C $P etc/updatedb.conf tar rvpf $pkg.tar -C $P etc/cron.daily/mlocate --- plamo/00_base/old/ncurses-20161208/PlamoBuild.ncurses-6.0 2016-12-08 12:47:34.000000000 +0900 +++ plamo/00_base/ncurses/PlamoBuild.ncurses-6.0 2017-03-31 14:59:04.000000000 +0900 @@ -3,242 +3,41 @@ ###################################################################### url="http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/ncurses/ncurses-6.0-Charable.patch.gz" +verify= +commitid= pkgbase=ncurses vers=6.0 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers patchfiles="ncurses-6.0-Charable.patch.gz" OPT_CONFIG="--with-shared --without-debug --enable-widec --with-manpage-format=normal --disable-ext-colors" DOCS="README.MinGW README README.emx NEWS ANNOUNCE COPYING INSTALL TO-DO AUTHORS" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $P/usr/include - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B if [ $arch == x86_64 ] ; then cp -p misc/run_tic.in{,.orig} @@ -246,12 +45,6 @@ fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir=/$libdir --infodir='${prefix}'/share/info \ @@ -268,12 +61,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,6 +80,7 @@ ln -s libpanelw.so.$vers $P/$libdir/libpanelw.so.5 ln -s libmenuw.so.$vers $P/$libdir/libmenuw.so.5 ln -s libformw.so.$vers $P/$libdir/libformw.so.5 + ln -s libncursesw.so.$vers $P/$libdir/libncurses.so.5 install -d $P/usr/$libdir ln -s /usr/share/terminfo $P/usr/$libdir touch $W/i.et @@ -299,38 +88,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + false && convert_links + prune_symlink $P/usr/bin + for i in $P{,/usr}/$libdir ; do prune_symlink $i ; done + prune_symlink $P/usr/include + for i in 1 3 5 7 ; do prune_symlink $mandir/man$i ; done tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find $libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` @@ -344,6 +107,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/net_tools-20160114/PlamoBuild.net_tools-1.60 2016-01-14 11:49:19.000000000 +0900 +++ plamo/00_base/net_tools/PlamoBuild.net_tools-1.60 2017-04-26 20:54:47.000000000 +0900 @@ -3,219 +3,56 @@ ###################################################################### url="http://downloads.sourceforge.net/net-tools/net-tools-1.60.tar.bz2 http://simosnet.com/livecdroom/source/solydxk/main/n/net-tools/net-tools_1.60-24.1.diff.gz" +verify= +digest= +commitid= pkgbase=net_tools vers=1.60 arch=`uname -m` -build=P2 +build=P3 src=net-tools-$vers +patchfiles="net-tools_1.60-24.1.diff.gz" OPT_CONFIG="" DOCS="ABOUT-NLS COPYING INSTALLING README README.ipv6 TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - gunzip -c $W/net-tools_1.60-24.1.diff.gz | patch -Np1 -i - for i in `cat debian/patches/series` ; do patch -Np1 -i debian/patches/$i done + cp -p iptunnel.c{,.orig} + cat <<- "EOF" | patch iptunnel.c + 29d28 + < #include + 38a38 + > #include + EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -256,12 +93,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -276,24 +108,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` @@ -303,6 +119,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/netkit_combo-20160409/PlamoBuild.netkit_combo-0.17 2016-04-09 20:56:43.000000000 +0900 +++ plamo/00_base/netkit_combo/PlamoBuild.netkit_combo-0.17 2017-04-26 21:01:15.000000000 +0900 @@ -1,32 +1,36 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/netkit-combo-0.17.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/biff+comsat-0.17.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/biff+comsat.offset.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/biff+comsat.badutmp.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/bsd-finger_0.17-13.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/linux-ftpd_0.17-29.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-bootparamd_0.17-9.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-ftp_0.17-19.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-ntalk_0.17-14.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/routed.18.candidate.final.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-routed-0.17.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rsh_0.17-14.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rusers_0.17-7.1.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rwall_0.17-6.2.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-rwho_0.17-12.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-telnet_0.17-36.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-tftp_0.17-17.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-timed-0.17.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netwrite-0.17.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-combo-0.17-diffs.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/netkit_combo/netkit-combo-0.17-tirpc.patch.gz" +url="http://ftp.linux.org.uk/pub/linux/Networking/netkit/netkit-combo-0.17.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/biff+comsat-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/biff+comsat.offset.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/biff+comsat.badutmp.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/bsd-finger_0.17-13.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/linux-ftpd_0.17-29.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-bootparamd_0.17-9.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-ftp_0.17-19.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-ntalk_0.17-14.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/routed.18.candidate.final.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-routed-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-rsh_0.17-14.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-rusers_0.17-7.1.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-rwall_0.17-6.2.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-rwho_0.17-12.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-telnet_0.17-36.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-tftp_0.17-17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-timed-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netwrite-0.17.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-combo-0.17-diffs.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/netkit_combo/netkit-combo-0.17-tirpc.patch.gz" +verify= +digest= +commitid= pkgbase=netkit_combo vers=0.17 arch=`uname -m` -build=P9 +build=P10 src=netkit-combo-$vers +patchfiles="" OPT_CONFIG="" DOCS="README `echo biff+comsat/{ChangeLog,README}` @@ -46,196 +50,29 @@ `echo netkit-tftp/{BUGS,ChangeLog,README}` `echo netkit-timed/{BUGS,ChangeLog,README,timed/CHANGES}` `echo netwrite/{COPYING,ChangeLog,README{,.old}}`" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B/biff+comsat gunzip -c $W/biff+comsat-0.17.diff.gz | patch -Np1 -i - gunzip -c $W/biff+comsat.offset.diff.gz | patch -Np1 -i - @@ -282,12 +119,6 @@ for i in $B/*/configure ; do sed -i '/^MANDIR=/s@man@share/man@g' $i ; done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --installroot=$P ${OPT_CONFIG[$i]} fi @@ -302,12 +133,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -324,23 +150,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir rm $docdir/$src/netkit-routed/ChangeLog.gz install2 $B/netkit-routed/ChangeLog $docdir/$src/netkit-routed touch -t 200012251418.04 $docdir/$src/netkit-routed/ChangeLog @@ -350,7 +160,7 @@ touch -t 200012251420.54 $docdir/$src/netkit-routed/README gzip_one $docdir/$src/netkit-routed/README touch -r $S/netkit-routed $docdir/$src/netkit-routed - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | tail -n+2` tar rvpf $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` @@ -362,6 +172,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/nkf-20160324a/PlamoBuild.nkf-2.1.2 2016-03-24 12:26:46.000000000 +0900 +++ plamo/00_base/nkf/PlamoBuild.nkf-2.1.2 2017-04-26 06:16:13.000000000 +0900 @@ -2,203 +2,40 @@ ###################################################################### url="http://jaist.dl.sourceforge.jp/nkf/53171/nkf-2.1.2.tar.gz" +verify= +digest= +commitid= pkgbase=nkf vers=2.1.2 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="INSTALL INSTALL.j" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile{,.orig} sed -i -e 's@/local@@g' -e 's@$(prefix)@$(DESTDIR)&@g' \ @@ -219,15 +56,9 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -244,12 +75,7 @@ sed -i 's@/local@@g' NKF.mod/Makefile fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -272,24 +98,8 @@ touch -t `date '+%m%d0900'` \ $P/usr/$libdir/perl5/site_perl/*/$arch-linux-thread-multi/auto/NKF gzip_dir $mandir/ja_JP.eucJP/man1 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P \ usr/$libdir/perl5/site_perl/5.14.2/$arch-linux-thread-multi/{auto/NKF,NKF.pm} @@ -299,6 +109,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/nvi-20170426/PlamoBuild.nvi-1.79 2017-04-26 06:54:18.000000000 +0900 +++ plamo/00_base/nvi/PlamoBuild.nvi-1.79 2018-08-15 17:39:36.000000000 +0900 @@ -1,18 +1,19 @@ #!/bin/sh ###################################################################### -url="http://pkgs.fedoraproject.org/repo/pkgs/nvi-m17n/nvi-1.79.tar.gz/765e2153f5fc4f21793f2edc2647305a/nvi-1.79.tar.gz - http://pkgs.fedoraproject.org/repo/pkgs/nvi-m17n/nvi-1.79.m17n-20040401.diff.gz/851650ced51697b3b08400fa75621c97/nvi-1.79.m17n-20040401.diff.gz +url="http://motoyuki.bsdclub.org/data/FreeBSD/distfiles/nvi-1.79.tar.gz + http://motoyuki.bsdclub.org/data/FreeBSD/distfiles/nvi-m17n-1.79-20040608.diff.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/nvi/nvi-1.79-64bit_breakage.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/nvi/nvi-1.79-DESTDIR.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/nvi/nvi-cmdwrapper.gz" verify= digest= +branch= commitid= pkgbase=nvi vers=1.79 arch=`uname -m` -build=P9 +build=P10 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-multibyte=euc-jp" @@ -24,7 +25,7 @@ `echo docs/internals/{gdb.script,structures,autowrite,quoting}` `echo docs/internals/{input,context,openmode,cscope.NOTES}` docs/changelog docs/tutorial/* `echo build/README{,.LynxOS}` LICENSE" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -49,14 +50,14 @@ apply_patches cd $B chmod -R u+w . - gunzip -c $W/nvi-1.79.m17n-20040401.diff.gz | patch -Np0 -i - + gunzip -c $W/nvi-m17n-1.79-20040608.diff.gz \ + | sed '/^\(---\|+++\) /s@\t[[:graph:]]*$@@' | patch -Np0 -fZ -i - gunzip -c $W/nvi-1.79-64bit_breakage.patch.gz | patch -Np1 -i - gunzip -c $W/nvi-1.79-DESTDIR.patch.gz | patch -Np1 -i - - cp -p build/configure{,.orig} - sed -i '/^LDFLAGS=/s@$LDFLAGS@${LDFLAGS-"-lncurses"}@g' build/configure for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/build if [ -x configure ] ; then + export ADDLDFLAGS="-lncurses" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} @@ -83,36 +84,41 @@ fi done install -d $P/usr/libexec - mv $P/usr/bin/{vi,ex,view} $P/usr/libexec + mv $P/usr/bin/vi $P/usr/libexec gunzip -c $W/nvi-cmdwrapper.gz > $P/usr/bin/vi chmod 755 $P/usr/bin/vi - ln $P/usr/bin/{vi,ex} - ln $P/usr/bin/{vi,view} + ln -f $P/usr/bin/{vi,ex} + ln -f $P/usr/bin/{vi,view} touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_bindir $P/usr/libexec - gzip_dir $mandir/cat1 setup_docdir chmod 755 $docdir/$src/docs/tutorial/vi.tut.csh.gz + for i in curses regex ; do + install -d $docdir/$src/$i + cp -p $B/$i/README.m17n $docdir/$src/$i + chown root.root $docdir/$src/$i/README.m17n + gzip_one $docdir/$src/$i/README.m17n + done cp -a $B/docs.m17n $docdir/$src chown -R root.root $docdir/$src/docs.m17n - find $docdir/$src/docs.m17n -exec touch -t `date '+%m%d0900'` {} \; gzip_dir $docdir/$src/docs.m17n - touch -t `date '+%m%d0900'` $docdir/$src/docs.m17n + TZ=UTC touch -t `date -u '+%m%d0000'` $docdir/$src/{curses,regex,docs.m17n} + mv $docdir/$src/{curses,build,LICENSE.gz,regex} $C mv $docdir/$src/{docs.m17n,{$func,$myname,$spec}.gz} $C + mv $C/{curses,build,LICENSE.gz,regex} $docdir/$src mv $C/{docs.m17n,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src 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/libexec | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/vi - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/cat1 | 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 usr/share/doc/$src - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/openbsd_inetd-20160114/PlamoBuild.openbsd_inetd-0.20080125 2016-01-14 19:12:30.000000000 +0900 +++ plamo/00_base/openbsd_inetd/PlamoBuild.openbsd_inetd-0.20080125 2017-04-26 13:47:52.000000000 +0900 @@ -1,221 +1,52 @@ #!/bin/sh ###################################################################### -url="http://ftp.debian.org/debian/pool/main/o/openbsd-inetd/openbsd-inetd_0.20080125.orig.tar.gz - http://ftp.debian.org/debian/pool/main/o/openbsd-inetd/openbsd-inetd_0.20080125-6.diff.gz" +url="http://ftp.acc.umu.se/mirror/cdimage/snapshot/Debian/pool/main/o/openbsd-inetd/openbsd-inetd_0.20080125.orig.tar.gz + http://ftp.acc.umu.se/mirror/cdimage/snapshot/Debian/pool/main/o/openbsd-inetd/openbsd-inetd_0.20080125-6.diff.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/openbsd_inetd/openbsd-inetd.conf.gz" +verify= +digest= +commitid= pkgbase=openbsd_inetd vers=0.20080125 arch=`uname -m` -build=P2 +build=P3 src=openbsd-inetd-$vers.orig +patchfiles="openbsd-inetd_0.20080125-6.diff.gz" OPT_CONFIG="" DOCS="ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - gunzip -c $W/openbsd-inetd_0.20080125-6.diff.gz | patch -Np1 -i - for i in `grep "^[^#]" debian/patches/series` ; do patch -Np1 -i debian/patches/$i done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make -f Makefile.debian clean - fi - if [ -f config.log ] ; then - 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 @@ -229,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -249,163 +75,19 @@ install -d $mandir/man8 install -m 644 inetd.8 $mandir/man8 install -d $P/etc - cat <<- "EOF" > $P/etc/inetd.conf - # See "man 8 inetd" for more information. - # - # If you make changes to this file, either reboot your machine or send the - # inetd a HUP signal: - # Do a "ps x" as root and look up the pid of inetd. Then do a - # "kill -HUP ". - # The inetd will re-read this file whenever it gets that signal. - # - # - # - # The first 4 services are really only used for debugging purposes, so - # we comment them out since they can otherwise be used for some nasty - # denial-of-service attacks. If you need them, uncomment them. - # echo stream tcp nowait root internal - # echo dgram udp wait root internal - # discard stream tcp nowait root internal - # discard dgram udp wait root internal - # daytime stream tcp nowait root internal - # daytime dgram udp wait root internal - # chargen stream tcp nowait root internal - # chargen dgram udp wait root internal - time stream tcp nowait root internal - time dgram udp wait root internal - # - # These are standard services. - # - ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd - telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd - # - # Use this one instead if you want to snoop on telnet users (try to use this - # for ethical purposes, ok folks?) : - # telnet stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.telnetsnoopd - # - # This is generally unnecessary. The daemon provided by INN will handle the - # incoming NNTP connections. - # nntp stream tcp nowait root /usr/sbin/tcpd in.nntpd - # - # This is for BSD sendmail. NOTE: It's not a good idea to uncomment this - # one, since sendmail is already set up to run as a daemon in /etc/rc.d/rc.M. - # But, if you really want to run sendmail this way for some reason, you'll - # need to uncomment the smtp line below AND change the line in /etc/rc.d/rc.M - # to run sendmail like this: /usr/sbin/sendmail -q30m - # ...otherwise the queue will not be processed. - # smtp stream tcp nowait root /usr/sbin/tcpd sendmail -bs - # - # The comsat daemon notifies the user of new mail when biff is set to y: - comsat dgram udp wait root /usr/sbin/tcpd in.comsat - # - # Shell, login, exec and talk are BSD protocols. - # - shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L - login stream tcp nowait root /usr/sbin/tcpd in.rlogind - # exec stream tcp nowait root /usr/sbin/tcpd in.rexecd - # talk dgram udp wait root /usr/sbin/tcpd in.talkd - # ntalk dgram udp wait root /usr/sbin/tcpd in.talkd - ssh stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sshd -i - - # - # Kerberos authenticated services - # - # klogin stream tcp nowait root /usr/sbin/tcpd rlogind -k - # eklogin stream tcp nowait root /usr/sbin/tcpd rlogind -k -x - # kshell stream tcp nowait root /usr/sbin/tcpd rshd -k - # - # Services run ONLY on the Kerberos server - # - # krbupdate stream tcp nowait root /usr/sbin/tcpd registerd - # kpasswd stream tcp nowait root /usr/sbin/tcpd kpasswdd - # - # Pop et al - # - # pop2 stream tcp nowait root /usr/sbin/tcpd in.pop2d - pop3 stream tcp nowait root /usr/sbin/tcpd ipop3d - imap stream tcp nowait root /usr/sbin/tcpd imapd - pop3s stream tcp nowait root /usr/sbin/tcpd ipop3d - imaps stream tcp nowait root /usr/sbin/tcpd imapd - # - # The ipop3d POP3 server is part of the Pine distribution. If you've - # installed the Pine package, you may wish to switch to ipop3d by - # commenting out the pop3 line above, and uncommenting the pop3 line below. - #pop3 stream tcp nowait root /usr/sbin/tcpd ipop3d - # imap2 stream tcp nowait root /usr/sbin/tcpd imapd - # - # The Internet UUCP service. - # - # uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l - # - # Tftp service is provided primarily for booting. Most sites - # run this only on machines acting as "boot servers." - # - # tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd - # bootps dgram udp wait root /usr/sbin/in.bootpd in.bootpd - # - # Finger, systat and netstat give out user information which may be - # valuable to potential "system crackers." Many sites choose to disable - # some or all of these services to improve security. - # Try "telnet localhost systat" and "telnet localhost netstat" to see that - # information yourself! - # - # finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -w - # systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx - # netstat stream tcp nowait root /usr/sbin/tcpd /bin/netstat -a - # - # Ident service is used for net authentication - auth stream tcp wait root /usr/sbin/in.identd in.identd -w -t120 -l - # - # These are to start Samba, an smb server that can export filesystems to - # Pathworks, Lanmanager for DOS, Windows for Workgroups, Windows95, Lanmanager - # for Windows, Lanmanager for OS/2, Windows NT, etc. - # If you're running smbd and nmbd from daemons in /etc/rc.d/rc.samba, then you - # shouldn't uncomment these lines. - # netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd - # netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd - # - # Sun-RPC based services. - # - # - # rstatd/1-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rstatd - # rusersd/2-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rusersd - # walld/1 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rwalld - # - - skkserv stream tcp nowait nobody /usr/sbin/tcpd /usr/libexec/dbskkd-cdb - printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd - # End of inetd.conf. - swat stream tcp nowait root /usr/sbin/tcpd /usr/sbin/swat - EOF + gunzip -c $W/openbsd-inetd.conf.gz > $P/etc/inetd.conf touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 etc/inetd.conf tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/openssh-20170426/PlamoBuild.openssh-7.5p1 2017-04-26 08:39:21.000000000 +0900 +++ plamo/00_base/openssh/PlamoBuild.openssh-7.8p1 2018-12-26 22:01:04.000000000 +0900 @@ -1,22 +1,21 @@ #!/bin/sh ###################################################################### -url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz" +url="http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.8p1.tar.gz" verify= digest= +branch= commitid= pkgbase=openssh -vers=7.5p1 +vers=7.8p1 arch=`uname -m` build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--sysconfdir=/etc/ssh --with-pam --with-privsep-user=sshd --with-privsep-path=/var/lib/sshd --with-md5-passwords" -DOCS="CREDITS INSTALL LICENCE OVERVIEW PROTOCOL PROTOCOL.agent - `echo PROTOCOL.{certkeys,chacha20poly1305,key,krl,mux}` - README `echo README.{dns,platform,privsep,tun}` TODO ChangeLog" -template=20170415 +DOCS="CREDITS INSTALL LICENCE OVERVIEW PROTOCOL* README* TODO ChangeLog" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -87,8 +86,8 @@ install -m 644 contrib/ssh-copy-id.1 $mandir/man1 touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_bindir $P/usr/libexec setup_docdir @@ -106,7 +105,7 @@ for i in ssh sshd ; do ssh_config $i ; done EOF - touch -t `date '+%m%d0900'` $P/install/doinst.sh + TZ=UTC touch -t `date -u '+%m%d0000'` $P/install/doinst.sh 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 `cd $P ; find usr/libexec | tail -n+2` @@ -118,7 +117,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/openssl-20170426/PlamoBuild.openssl-1.0.2k 2017-04-26 08:58:22.000000000 +0900 +++ plamo/00_base/openssl/PlamoBuild.openssl-1.0.2p 2018-12-26 22:15:30.000000000 +0900 @@ -1,22 +1,22 @@ #!/bin/sh ###################################################################### -url="http://www.openssl.org/source/openssl-1.0.2k.tar.gz +url="http://www.openssl.org/source/openssl-1.0.2p.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/openssl/mkcabundle.pl" verify= digest= +branch= commitid= pkgbase=openssl -vers=1.0.2k +vers=1.0.2p arch=`uname -m` -build=P3 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="ACKNOWLEDGMENTS CHANGES CHANGES.SSLeay CONTRIBUTING FAQ INSTALL - `echo INSTALL.{DJGPP,MacOS,NW,OS2,VMS,W32,W64,WCE}` LICENSE NEWS - PROBLEMS README README.ASN1 README.ENGINE" -template=20170415 +DOCS="ACKNOWLEDGMENTS CHANGES* CONTRIBUTING FAQ INSTALL* LICENSE NEWS + PROBLEMS README*" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -85,17 +85,17 @@ ln -s /etc/ssl $P/usr/share touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_libdir $P/usr/$libdir/engines - touch -t `date '+%m%d0900'` $P/usr/$libdir/engines + TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/$libdir/engines setup_docdir - touch -t `date '+%m%d0900'` $docdir/$src + TZ=UTC touch -t `date -u '+%m%d0000'` $docdir/$src convert_links prune_symlink $P/etc/ssl/certs/demo prune_symlink $P/usr/share - touch -t `date '+%m%d0900'` $P/etc/ssl/certs/demo + TZ=UTC touch -t `date -u '+%m%d0000'` $P/etc/ssl/certs/demo tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/engines tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` @@ -109,7 +109,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/00_base/old/os_prober-20160115/PlamoBuild.os_prober-1.56 2016-01-15 11:33:11.000000000 +0900 +++ plamo/00_base/os_prober/PlamoBuild.os_prober-1.74 2017-04-26 13:40:54.000000000 +0900 @@ -1,215 +1,47 @@ #!/bin/sh ###################################################################### -url="http://distribution-us.hexxeh.net/raspbian/archive/raspbian/pool/main/o/os-prober/os-prober_1.56.tar.gz" +url="http://http.debian.net/debian/pool/main/o/os-prober/os-prober_1.74.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/os_prober/plamo-detect.patch.gz" +verify= +digest= +commitid= pkgbase=os_prober -vers=1.56 +vers=1.74 arch=`uname -m` build=P2 -src=os-prober-$vers +src=os-prober +patchfiles="plamo-detect.patch.gz" OPT_CONFIG="" DOCS="README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -245,12 +72,18 @@ install -d $P/usr/lib/os-probes/{mounted,init} install os-probes/common/50mounted-tests $P/usr/lib/os-probes install os-probes/mounted/common/* $P/usr/lib/os-probes/mounted - install os-probes/mounted/x86/* $P/usr/lib/os-probes/mounted + install -d $P/usr/lib/os-probes/mounted/efi + install os-probes/mounted/x86/efi/* $P/usr/lib/os-probes/mounted/efi + install os-probes/mounted/x86/[0-9]* $P/usr/lib/os-probes/mounted + install os-probes/mounted/powerpc/20macosx $P/usr/lib/os-probes/mounted install os-probes/init/common/10filesystems $P/usr/lib/os-probes/init install -d $P/usr/lib/linux-boot-probes/mounted - install linux-boot-probes/common/50mounted-tests $P/usr/lib/linux-boot-probes - install linux-boot-probes/mounted/common/* $P/usr/lib/linux-boot-probes/mounted - install linux-boot-probes/mounted/x86/* $P/usr/lib/linux-boot-probes/mounted + install linux-boot-probes/common/50mounted-tests \ + $P/usr/lib/linux-boot-probes + install linux-boot-probes/mounted/common/* \ + $P/usr/lib/linux-boot-probes/mounted + install linux-boot-probes/mounted/x86/* \ + $P/usr/lib/linux-boot-probes/mounted install -d $P/usr/share/os-prober install common.sh $P/usr/share/os-prober install -d $P/var/lib/os-prober @@ -259,24 +92,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/lib -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/os-prober @@ -284,6 +101,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/pciutils-20160402/PlamoBuild.pciutils-3.1.8 2016-04-02 18:33:35.000000000 +0900 +++ plamo/00_base/pciutils/PlamoBuild.pciutils-3.1.8 2017-04-29 10:38:25.000000000 +0900 @@ -3,203 +3,40 @@ ###################################################################### url="http://www.kernel.org/pub/software/utils/pciutils/pciutils-3.1.8.tar.bz2 http://pciids.sourceforge.net/v2.2/pci.ids" +verify= +digest= +commitid= pkgbase=pciutils vers=3.1.8 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="TODO README ChangeLog README.Windows COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p $W/pci.ids . if [ $arch == x86_64 ] ; then @@ -208,15 +45,9 @@ fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -230,12 +61,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -251,24 +77,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` @@ -280,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/pm_utils-20160115/PlamoBuild.pm_utils-1.4.1 2016-01-15 15:19:53.000000000 +0900 +++ plamo/00_base/pm_utils/PlamoBuild.pm_utils-1.4.1 2017-04-29 12:02:33.000000000 +0900 @@ -2,214 +2,45 @@ ###################################################################### url="http://pm-utils.freedesktop.org/releases/pm-utils-1.4.1.tar.gz" +verify= +digest= +commitid= pkgbase=pm_utils vers=1.4.1 arch=`uname -m` -build=P3 +build=P4 src=pm-utils-$vers -OPT_CONFIG="--sysconfdir=/etc" +patchfiles="" +OPT_CONFIG="" DOCS="README* AUTHORS COPYING ChangeLog INSTALL NEWS TODO pm/HOWTO*" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -243,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/pm-utils @@ -272,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/procinfo_ng-20160409/PlamoBuild.procinfo_ng-2.0.304 2016-04-09 21:10:53.000000000 +0900 +++ plamo/00_base/procinfo_ng/PlamoBuild.procinfo_ng-2.0.304 2017-04-29 12:08:42.000000000 +0900 @@ -2,214 +2,45 @@ ###################################################################### url="http://downloads.sourceforge.net/procinfo-ng/procinfo-ng-2.0.304.tar.bz2" +verify= +digest= +commitid= pkgbase=procinfo_ng vers=2.0.304 arch=`uname -m` -build=P3 +build=P4 src=procinfo-ng-$vers +patchfiles="" OPT_CONFIG="" DOCS="GPL-2.txt LICENSE.txt LGPL-2.1.txt" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -243,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/procps_ng-20160408/PlamoBuild.procps_ng-3.3.11 2016-04-08 15:09:37.000000000 +0900 +++ plamo/00_base/procps_ng/PlamoBuild.procps_ng-3.3.11 2017-04-29 12:14:13.000000000 +0900 @@ -2,216 +2,46 @@ ###################################################################### url="http://downloads.sourceforge.net/procps-ng/procps-ng-3.3.11.tar.xz" +verify= +digest= +commitid= pkgbase=procps_ng vers=3.3.11 arch=`uname -m` -build=P2 +build=P3 src=procps-ng-$vers +patchfiles="" OPT_CONFIG="--exec-prefix= --disable-kill --enable-skill" DOCS="AUTHORS NEWS COPYING ABOUT-NLS ChangeLog COPYING.LIB `echo Documentation/{CodingStyle.md,FAQ,TODO,bugs.md}`" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then - ./configure --prefix=/usr --libdir=/usr/$libdir \ - --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir=/usr/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -225,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -245,30 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find 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 ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/proc - 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/locale -name *.mo` 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` @@ -277,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/readline-20160827/PlamoBuild.readline-6.3.8 2016-08-27 18:10:21.000000000 +0900 +++ plamo/00_base/readline/PlamoBuild.readline-6.3 2017-04-29 12:22:54.000000000 +0900 @@ -10,237 +10,40 @@ http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-006 http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-007 http://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-008" +verify= +digest= +commitid= pkgbase=readline vers=6.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--with-curses" DOCS="COPYING README MANIFEST INSTALL CHANGELOG CHANGES NEWS USAGE" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B patch -Np0 -i $W/readline63-001 patch -Np0 -i $W/readline63-002 @@ -252,12 +55,6 @@ patch -Np0 -i $W/readline63-008 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir=/$libdir --infodir='${prefix}'/share/info \ @@ -274,12 +71,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -299,24 +91,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links rm $P/$libdir/lib{history,readline}.so tar cvpf $pkg.tar -C $P `cd $P ; find $libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` @@ -328,6 +104,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/reiserfsprogs-20160116/PlamoBuild.reiserfsprogs-3.6.21 2016-01-16 07:37:16.000000000 +0900 +++ plamo/00_base/reiserfsprogs/PlamoBuild.reiserfsprogs-3.6.21 2017-04-29 12:31:13.000000000 +0900 @@ -2,214 +2,45 @@ ###################################################################### url="https://www.kernel.org/pub/linux/kernel/people/jeffm/reiserfsprogs/v3.6.21/reiserfsprogs-3.6.21.tar.bz2" +verify= +digest= +commitid= pkgbase=reiserfsprogs vers=3.6.21 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="NEWS README AUTHORS INSTALL ChangeLog COPYING CREDITS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -243,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/rsyslog-20160116/PlamoBuild.rsyslog-4.6.8 2016-01-16 07:36:47.000000000 +0900 +++ plamo/00_base/rsyslog/PlamoBuild.rsyslog-4.6.8 2017-04-29 12:41:10.000000000 +0900 @@ -2,214 +2,45 @@ ###################################################################### url="http://download.rsyslog.com/rsyslog/rsyslog-4.6.8.tar.gz" +verify= +digest= +commitid= pkgbase=rsyslog vers=4.6.8 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--sbindir=/sbin" DOCS="COPYING README AUTHORS INSTALL COPYING.LESSER NEWS ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -330,24 +156,8 @@ compress strip_libdir $P/usr/$libdir/rsyslog touch -t `date '+%m%d0900'` $P/usr/$libdir/rsyslog - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/rsyslog tar rvpf $pkg.tar -C $P etc/rsyslog.{d,conf} @@ -357,6 +167,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/sed-20160317/PlamoBuild.sed-4.2.2 2016-03-17 15:20:12.000000000 +0900 +++ plamo/00_base/sed/PlamoBuild.sed-4.2.2 2017-04-29 12:49:16.000000000 +0900 @@ -2,215 +2,46 @@ ###################################################################### url="http://ftp.gnu.org/gnu/sed/sed-4.2.2.tar.gz" +verify= +digest= +commitid= pkgbase=sed vers=4.2.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--bindir=/bin" DOCS="COPYING.DOC INSTALL README README-alpha THANKS AUTHORS COPYING ChangeLog ABOUT-NLS BUGS NEWS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -225,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -248,39 +74,22 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/sed $docdir/$src/doc mv $docdir/$src/{doc,{THANKS,AUTHORS,COPYING,ChangeLog,ABOUT-NLS}.gz} $C - mv $docdir/$src/{BUGS,NEWS,$myname}.gz $C + mv $docdir/$src/{BUGS,NEWS,$func,$myname,$spec}.gz $C mv $C/{doc,{THANKS,AUTHORS,COPYING,ChangeLog,ABOUT-NLS}.gz} $docdir/$src - mv $C/{BUGS,NEWS,$myname}.gz $docdir/$src + mv $C/{BUGS,NEWS,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | 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 usr/share/locale -name "*.mo"` + 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/shadow-20170624/PlamoBuild.shadow-git_20130908 2017-06-24 14:34:20.000000000 +0900 +++ plamo/00_base/shadow/PlamoBuild.shadow-git_20130908 2018-01-26 08:59:08.000000000 +0900 @@ -3,19 +3,20 @@ ###################################################################### url="https://github.com/shadow-maint/shadow.git ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/shadow/CVE-2017-2616.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/shadow/shadow-adduser-20160122" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/shadow/shadow-adduser-20180125" verify= digest= +branch= commitid[0]=578947e pkgbase=shadow vers=git_20130908 arch=`uname -m` -build=P7 +build=P8 src=$pkgbase patchfiles="CVE-2017-2616.patch.gz" OPT_CONFIG="--enable-man --without-selinux --with-libcrack" DOCS="COPYING ChangeLog NEWS README TODO" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -187,7 +188,7 @@ make install DESTDIR=$P fi done - install $W/shadow-adduser-20160122 $P/usr/sbin/adduser + install $W/shadow-adduser-20180125 $P/usr/sbin/adduser install -d $mandir/ja_JP.eucJP/man{1,5,8} for i in `cd $mandir/ja ; find . -type f` ; do nkf -We $mandir/ja/$i > $mandir/ja_JP.eucJP/$i --- plamo/00_base/old/sudo-20170502/PlamoBuild.sudo-1.8.15 2017-05-02 09:58:11.000000000 +0900 +++ plamo/00_base/sudo/PlamoBuild.sudo-1.8.15 2018-01-31 18:31:40.000000000 +0900 @@ -4,18 +4,20 @@ url="http://www.sudo.ws/sudo/dist/sudo-1.8.15.tar.gz" verify= digest= +branch= commitid= pkgbase=sudo vers=1.8.15 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="--with-pam --without-sendmail --with-env-editor - --with-all-insults --with-hal-insults --with-secure-path" +OPT_CONFIG="--with-pam --with-vardir=/var/db/sudo --without-sendmail + --with-env-editor --with-all-insults --with-hal-insults + --with-secure-path" DOCS="ABOUT-NLS ChangeLog INSTALL* MANIFEST NEWS README* `echo doc/{CONTRIBUTORS,HISTORY,LICENSE,TROUBLESHOOTING,UPGRADE}`" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/00_base/old/sysfsutils-20160827/PlamoBuild.sysfsutils-2.1.0 2016-08-27 20:08:51.000000000 +0900 +++ plamo/00_base/sysfsutils/PlamoBuild.sysfsutils-2.1.0 2017-05-02 10:11:12.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://downloads.sourceforge.net/linux-diag/sysfsutils-2.1.0.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/sysfsutils/sysfs_get_link.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/sysfsutils/sysfs_get_link.patch" +verify= +digest= +commitid= pkgbase=sysfsutils vers=2.1.0 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="sysfs_get_link.patch" OPT_CONFIG="" DOCS="TODO NEWS INSTALL README COPYING CREDITS AUTHORS docs/libsysfs.txt ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/sysfs @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/syslinux-20160323/PlamoBuild.syslinux-6.03 2016-03-23 20:36:22.000000000 +0900 +++ plamo/00_base/syslinux/PlamoBuild.syslinux-6.03 2017-05-02 10:24:15.000000000 +0900 @@ -6,227 +6,55 @@ http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch http://www.nasm.us/pub/nasm/releasebuilds/2.11.08/nasm-2.11.08.tar.xz" +verify= +digest= +commitid= pkgbase=syslinux vers=6.03 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="syslinux-fix-parallel-building-issue.patch + syslinux-libupload-depend-lib.patch syslinux-remove-clean-script.patch" OPT_CONFIG="" DOCS="COPYING NEWS README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $W/nasm-2.11.08 ./configure --prefix=$W/nasm make install PATH="$W/nasm/bin:$PATH" cd $B - patch -Np1 -i $W/syslinux-fix-parallel-building-issue.patch - patch -Np1 -i $W/syslinux-libupload-depend-lib.patch - patch -Np1 -i $W/syslinux-remove-clean-script.patch if [ $arch == i686 ] ; then cp -p Makefile{,.orig} sed -i '/^all_firmware/s@ efi64@@' Makefile fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -240,12 +68,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -260,30 +83,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/doc $docdir/$src chmod -R g-w $docdir/$src/doc chown -R root.root $docdir/$src/doc - mv $docdir/$src/{doc,{NEWS,README,$myname}.gz} $C - mv $C/{doc,{NEWS,README,$myname}.gz} $docdir/$src + mv $docdir/$src/{doc,{NEWS,README,$func,$myname,$spec}.gz} $C + mv $C/{doc,{NEWS,README,$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + 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 sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/syslinux @@ -291,6 +98,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/sysvinit-20170507/PlamoBuild.sysvinit-2.88dsf 2017-05-07 23:16:02.000000000 +0900 +++ plamo/00_base/sysvinit/PlamoBuild.sysvinit-2.88dsf 2018-01-26 08:42:44.000000000 +0900 @@ -2,20 +2,21 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/sysvinit/plamo-rc-scripts-20160908.tgz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/sysvinit/plamo-rc-scripts-20171021.tgz" verify= digest= +branch= commitid= pkgbase=sysvinit vers=2.88dsf arch=`uname -m` -build=P20 +build=P21 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="`echo doc/{bootlogd.README,Install,Changelog,Propaganda}` COPYING COPYRIGHT Makefile README" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/00_base/old/tar-20170502/PlamoBuild.tar-1.26 2017-05-02 11:16:38.000000000 +0900 +++ plamo/00_base/tar/PlamoBuild.tar-1.26 2017-12-02 19:02:55.000000000 +0900 @@ -7,17 +7,18 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/tar/tar-1.26-no-gets.patch.gz" verify= digest= +branch= commitid= pkgbase=tar vers=1.26 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="`echo tar-1.2{3-{tartime,txz},6-no-gets}.patch.gz`" OPT_CONFIG="" DOCS="NEWS TODO README THANKS ChangeLog.1 AUTHORS INSTALL ABOUT-NLS ChangeLog COPYING" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -45,7 +46,8 @@ if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + FORCE_UNSAFE_CONFIGURE=1 fi done fi --- plamo/00_base/old/tcp_wrappers-20160607/PlamoBuild.tcp_wrappers-7.6.q 2016-06-07 14:34:48.000000000 +0900 +++ plamo/00_base/tcp_wrappers/PlamoBuild.tcp_wrappers-7.6.q 2017-05-02 11:40:41.000000000 +0900 @@ -3,238 +3,46 @@ ###################################################################### url="http://archive.debian.org/debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.q.orig.tar.gz http://archive.debian.org/debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.q-16.diff.gz" +verify= +digest= +commitid= pkgbase=tcp_wrappers vers=7.6.q arch=`uname -m` -build=P5 +build=P6 src=tcp_wrappers_7.6 +patchfiles="tcp-wrappers_7.6.q-16.diff.gz" OPT_CONFIG="" DOCS="README BLURB DISCLAIMER CHANGES README.IRIX README.NIS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - gunzip -c $W/tcp-wrappers_7.6.q-16.diff.gz | patch -Np1 -i - for i in `cat debian/patches/series` ; do patch -Np1 -i debian/patches/$i done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -251,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -319,24 +122,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- "EOF" >> $P/install/doinst.sh hosts_config() { @@ -362,6 +149,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/tcsh-20160409/PlamoBuild.tcsh-6.19.00 2016-04-09 21:13:31.000000000 +0900 +++ plamo/00_base/tcsh/PlamoBuild.tcsh-6.19.00 2017-05-02 11:51:42.000000000 +0900 @@ -2,215 +2,46 @@ ###################################################################### url="http://ftp.osuosl.org/pub/blfs/conglomeration/tcsh/tcsh-6.19.00.tar.gz" +verify= +digest= +commitid= pkgbase=tcsh vers=6.19.00 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="BUGS Copyright FAQ Fixes NewThings Ported README README.imake WishList Y2K src.desc" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -224,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -250,33 +76,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | 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 usr/share/locale -name "*.cat"` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.cat` 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 - read -p "Do you want to keep work files? [y/N] " ans - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/timezone-20160910/PlamoBuild.timezone-2016f 2016-09-10 23:56:28.000000000 +0900 +++ plamo/00_base/timezone/PlamoBuild.timezone-2016f 2017-05-02 12:27:11.000000000 +0900 @@ -3,222 +3,41 @@ ###################################################################### url="http://www.iana.org/time-zones/repository/releases/tzcode2016f.tar.gz http://www.iana.org/time-zones/repository/releases/tzdata2016f.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/timezone/plamo_timeconfig.tar.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/timezone/plamo_timeconfig.tar.gz" +verify= +digest= +commitid= pkgbase=timezone vers=2016f arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="CONTRIBUTING LICENSE NEWS README Theory tz-art.htm tz-how-to.html tz-link.htm" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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 - false && for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac + false && download_sources + url=($url) + for i in `seq 0 $((${#url[@]} - 1))` ; do + j=${url[$i]%%#*} ; k=`[[ ${url[$i]} =~ \# ]] && echo ${url[$i]#*#}` + if [ ! -f ${j##*/} ] ; then wget $j + verify_signature $j "${verify[$i]}" "${digest[$i]}" "$k" ; fi done mkdir timezone-2016f tar xvpzf tzcode2016f.tar.gz -C timezone-2016f @@ -229,25 +48,9 @@ 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -264,12 +67,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,25 +90,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links prune_symlink $P/usr/share cat <<- "EOF" >> $P/install/doinst.sh @@ -336,6 +118,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/traceroute-20160121/PlamoBuild.traceroute-2.0.18 2016-01-21 20:26:50.000000000 +0900 +++ plamo/00_base/traceroute/PlamoBuild.traceroute-2.0.18 2017-05-02 12:36:06.000000000 +0900 @@ -2,214 +2,45 @@ ###################################################################### url="http://downloads.sourceforge.net/traceroute/traceroute-2.0.18.tar.gz" +verify= +digest= +commitid= pkgbase=traceroute vers=2.0.18 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="COPYING.LIB CREDITS ChangeLog COPYING VERSION TODO README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -223,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -243,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/udev-20161120/PlamoBuild.udev-175 2016-11-20 17:07:07.000000000 +0900 +++ plamo/00_base/udev/PlamoBuild.udev-175 2017-05-02 14:07:09.000000000 +0900 @@ -1,250 +1,48 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-175.tar.xz" +url="https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-175.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/udev/udev-175-input-event-codes.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/udev/udev-175-mtd_probe_stdint.patch.gz" +verify= +digest= +commitid= pkgbase=udev vers=175 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers -patchfiles="" +patchfiles="udev-175-input-event-codes.patch.gz + udev-175-mtd_probe_stdint.patch.gz" OPT_CONFIG="--libexecdir=/lib/udev --enable-static --disable-introspection --enable-rule_generator" DOCS="README extras/keymap/README.keymap.txt INSTALL ChangeLog NEWS TODO COPYING" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -289,38 +82,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/lib/udev touch -t `date '+%m%d0900'` $P/lib/udev tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` @@ -340,6 +103,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/unicon_tools-20160119/PlamoBuild.unicon_tools-0.0.0.20050707 2016-01-19 08:50:31.000000000 +0900 +++ plamo/00_base/unicon_tools/PlamoBuild.unicon_tools-0.0.0.20050707 2017-05-02 14:19:30.000000000 +0900 @@ -2,215 +2,46 @@ ###################################################################### url="http://vdlinux.sourceforge.jp/dists/UNICON/unicon-tools-0.0.0.20050707.tar.gz" +verify= +digest= +commitid= pkgbase=unicon_tools vers=0.0.0.20050707 arch=`uname -m` -build=P3 +build=P4 src=unicon-tools-$vers +patchfiles="" OPT_CONFIG="" DOCS="`echo doc/{{README,RELEASE,INSTALL}{,_cn},THANKS,ChangeLog}` INSTALL COPYING CREDITS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -224,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -244,29 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/unicon tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/util_linux-20161121/PlamoBuild.util_linux-2.29 2016-11-21 17:39:19.000000000 +0900 +++ plamo/00_base/util_linux/PlamoBuild.util_linux-2.29 2017-05-02 14:26:01.000000000 +0900 @@ -2,10 +2,13 @@ ###################################################################### url="https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-2.29.tar.xz" +verify= +digest= +commitid= pkgbase=util_linux vers=2.29 arch=`uname -m` -build=P1 +build=P2 src=util-linux-$vers patchfiles="" OPT_CONFIG="--disable-setpriv --disable-last --disable-mesg @@ -13,239 +16,31 @@ --disable-sulogin --disable-su --enable-write --disable-pylibmount --without-user --without-python" DOCS="COPYING ABOUT-NLS ChangeLog README NEWS README.licensing AUTHORS" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir=/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -288,47 +78,17 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/Documentation $docdir/$src chmod -R g-w $docdir/$src/Documentation chown -R root.root $docdir/$src/Documentation mv $docdir/util-linux/getopt $docdir/$src mv $docdir/$src/{Documentation,{README,NEWS}.gz,getopt} $C - mv $docdir/$src/{README.licensing,AUTHORS,$myname,$spec}.gz $C + mv $docdir/$src/{README.licensing,AUTHORS,$func,$myname,$spec}.gz $C mv $C/{Documentation,{README,NEWS}.gz,getopt} $docdir/$src - mv $C/{README.licensing,AUTHORS,$myname,$spec}.gz $docdir/$src + mv $C/{README.licensing,AUTHORS,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find 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/bin | tail -n+2` @@ -337,7 +97,7 @@ tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | 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 usr/share/locale -name "*.mo"` + 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/bash-completion/completions | tail -n+2` tar rvpf $pkg.tar -C $P var/lib/hwclock @@ -349,6 +109,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/xz-20160126/PlamoBuild.xz-5.2.2 2016-01-26 13:46:29.000000000 +0900 +++ plamo/00_base/xz/PlamoBuild.xz-5.2.2 2017-05-02 16:03:12.000000000 +0900 @@ -2,217 +2,47 @@ ###################################################################### url="http://tukaani.org/xz/xz-5.2.2.tar.xz" +verify= +digest= +commitid= pkgbase=xz vers=5.2.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="PACKAGERS INSTALL.generic COPYING.LGPLv2.1 COPYING.GPLv3 INSTALL ChangeLog ABOUT-NLS TODO THANKS README NEWS COPYING.GPLv2 COPYING AUTHORS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -226,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -248,42 +73,25 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/xz/{{faq,history,{xz,lzma}-file-format}.txt,examples*} \ $docdir/$src mv $docdir/$src/{{faq,history,{xz,lzma}-file-format}.txt,examples*} $C - mv $docdir/$src/$myname.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{{faq,history,{xz,lzma}-file-format}.txt,examples*} $docdir/$src - mv $C/$myname.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | 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 usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` - 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/locale -name *.mo` 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/00_base/old/zlib-20160119/PlamoBuild.zlib-1.2.8 2016-01-19 20:31:31.000000000 +0900 +++ plamo/00_base/zlib/PlamoBuild.zlib-1.2.8 2017-05-02 16:16:06.000000000 +0900 @@ -1,213 +1,44 @@ #!/bin/sh ###################################################################### -url="http://zlib.net/zlib-1.2.8.tar.gz" +url="http://zlib.net/fossils/zlib-1.2.8.tar.gz" +verify= +digest= +commitid= pkgbase=zlib vers=1.2.8 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="ChangeLog `echo doc/{algorithm,rfc195{0,1,2},txtvsbin}.txt` FAQ INDEX README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then wget $i ; fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ ${OPT_CONFIG[$i]} @@ -223,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -243,29 +69,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/examples $docdir/$src chown -R root.root $docdir/$src/examples - mv $docdir/$src/{examples,{FAQ,INDEX,README,$myname}.gz} $C - mv $C/{examples,{FAQ,INDEX,README,$myname}.gz} $docdir/$src + mv $docdir/$src/{examples,{FAQ,INDEX,README,$func,$myname,$spec}.gz} $C + mv $C/{examples,{FAQ,INDEX,README,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` @@ -273,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/sqlite-20161015/PlamoBuild.sqlite-3.14.2 2016-10-15 08:48:01.000000000 +0900 +++ plamo/01_minimum/sqlite/PlamoBuild.sqlite-3.15.0 2016-10-16 06:53:06.000000000 +0900 @@ -1,12 +1,12 @@ #!/bin/sh ###################################################################### -url="http://sqlite.org/2016/sqlite-autoconf-3140200.tar.gz" +url="http://sqlite.org/2016/sqlite-autoconf-3150000.tar.gz" pkgbase=sqlite -vers=3.14.2 +vers=3.15.0 arch=`uname -m` -build=P2 -src=$pkgbase-autoconf-3140200 +build=P1 +src=$pkgbase-autoconf-3150000 patchfiles="" OPT_CONFIG="" DOCS="INSTALL README.txt" --- plamo/01_minimum/old/autofs-20160616/PlamoBuild.autofs-5.1.1 2016-06-16 12:23:38.000000000 +0900 +++ plamo/01_minimum/autofs/PlamoBuild.autofs-5.1.1 2016-07-17 20:49:52.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=autofs vers=5.1.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="autofs_init_sleep.patch" OPT_CONFIG="--with-confdir=/etc --without-openldap" @@ -305,6 +305,7 @@ done convert cat <<- "EOF" >> $P/install/doinst.sh + autofs_config() { mv etc/auto$1.new /tmp if [ -f etc/auto$1 ] ; then --- plamo/01_minimum/old/cpio-20160618/PlamoBuild.cpio-2.11 2016-06-18 19:12:11.000000000 +0900 +++ plamo/01_minimum/cpio/PlamoBuild.cpio-2.11 2016-07-10 12:03:44.000000000 +0900 @@ -7,7 +7,7 @@ pkgbase=cpio vers=2.11 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="cpio-2.11-stdio.in.patch CVE-2014-9112.patch" OPT_CONFIG="" @@ -280,6 +280,7 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_bindir $P/usr/libexec for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do --- plamo/01_minimum/old/cpio-20160710/PlamoBuild.cpio-2.11 2016-07-10 12:03:44.000000000 +0900 +++ plamo/01_minimum/cpio/PlamoBuild.cpio-2.12 2016-11-08 12:42:44.000000000 +0900 @@ -1,18 +1,18 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/cpio/cpio-2.11.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/cpio/cpio-2.11-stdio.in.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/cpio/CVE-2014-9112.patch" +url="http://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2" pkgbase=cpio -vers=2.11 +vers=2.12 arch=`uname -m` -build=P4 +build=P1 src=$pkgbase-$vers -patchfiles="cpio-2.11-stdio.in.patch CVE-2014-9112.patch" +patchfiles="" OPT_CONFIG="" -DOCS="README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS THANKS - TODO" +DOCS="AUTHORS ABOUT-NLS TODO COPYING INSTALL README NEWS ChangeLog + THANKS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -292,9 +292,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done @@ -304,6 +318,7 @@ 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/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz --- plamo/01_minimum/old/autofs-20160717/PlamoBuild.autofs-5.1.1 2016-07-17 20:49:52.000000000 +0900 +++ plamo/01_minimum/autofs/PlamoBuild.autofs-5.1.2 2016-11-08 15:12:50.000000000 +0900 @@ -1,16 +1,18 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-5.1.1.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/autofs/autofs_init_sleep.patch" +url="https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-5.1.2.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/autofs/autofs_init_sleep.patch" pkgbase=autofs -vers=5.1.1 +vers=5.1.2 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers patchfiles="autofs_init_sleep.patch" OPT_CONFIG="--with-confdir=/etc --without-openldap" DOCS="CHANGELOG COPYING COPYRIGHT CREDITS INSTALL README*" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -297,9 +299,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/old/get_pkginfo-20160712/PlamoBuild.get_pkginfo-git_20160217 2016-07-12 14:18:25.000000000 +0900 +++ plamo/01_minimum/get_pkginfo/PlamoBuild.get_pkginfo-git_20160222 2016-07-19 07:46:16.000000000 +0900 @@ -4,9 +4,9 @@ url="https://github.com/plamolinux/get_pkginfo.git ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/get_pkginfo/gitlog2changelog.py" pkgbase=get_pkginfo -vers=git_20160217 +vers=git_20160222 arch=noarch -build=P3 +build=P1 src=$pkgbase patchfiles="" OPT_CONFIG="" @@ -226,7 +226,7 @@ bz2|tbz) tar xvpjf ${i##*/} ;; xz|txz) tar xvpJf ${i##*/} ;; git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard a8e552a + git checkout origin/master ; git reset --hard facec2d git set-file-times ; TZ=UTC ../gitlog2changelog.py) ;; esac done --- plamo/01_minimum/old/get_pkginfo-20160719/PlamoBuild.get_pkginfo-git_20160222 2016-07-19 07:46:16.000000000 +0900 +++ plamo/01_minimum/get_pkginfo/PlamoBuild.get_pkginfo-git_20160222 2017-03-01 15:24:16.000000000 +0900 @@ -2,15 +2,17 @@ ###################################################################### url="https://github.com/plamolinux/get_pkginfo.git - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/get_pkginfo/gitlog2changelog.py" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/get_pkginfo/gitlog2changelog.py" pkgbase=get_pkginfo vers=git_20160222 arch=noarch -build=P1 +build=P2 src=$pkgbase patchfiles="" OPT_CONFIG="" DOCS="ChangeLog" +template=20170204 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -240,7 +242,7 @@ 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 - ;; + bz2) bunzip2 -c $W/$j | patch -Np1 -i - ;; xz) unxz -c $W/$j | patch -Np1 -i - ;; *) patch -Np1 -i $W/$j ;; esac @@ -308,16 +310,30 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done mv $docdir/$src~/README $docdir/$src gzip_one $docdir/$src/README - mv $docdir/$src/{README,$myname}.gz $C - mv $C/{README,$myname}.gz $docdir/$src + mv $docdir/$src/{README,$myname,$spec}.gz $C + mv $C/{README,$myname,$spec}.gz $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` --- plamo/01_minimum/old/autofs-20161108/PlamoBuild.autofs-5.1.2 2016-11-08 15:12:50.000000000 +0900 +++ plamo/01_minimum/autofs/PlamoBuild.autofs-5.1.2 2016-11-08 12:19:19.000000000 +0900 @@ -272,7 +272,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P initdir=/etc/rc.d/init.d + make install DESTDIR=$P fi done chmod 644 $P/etc/rc.d/init.d/autofs --- plamo/01_minimum/old/cpio-20161108/PlamoBuild.cpio-2.12 2016-11-08 12:42:44.000000000 +0900 +++ plamo/01_minimum/cpio/PlamoBuild.cpio-2.12 2016-11-09 22:31:09.000000000 +0900 @@ -1,13 +1,14 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2" +url="http://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/cpio/CVE-2016-2037.patch" pkgbase=cpio vers=2.12 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers -patchfiles="" +patchfiles="CVE-2016-2037.patch" OPT_CONFIG="" DOCS="AUTHORS ABOUT-NLS TODO COPYING INSTALL README NEWS ChangeLog THANKS" --- plamo/01_minimum/old/cpufreqd-20160619/PlamoBuild.cpufreqd-2.4.2 2016-06-19 19:02:58.000000000 +0900 +++ plamo/01_minimum/cpufreqd/PlamoBuild.cpufreqd-2.4.2 2016-07-17 12:54:50.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=cpufreqd vers=2.4.2 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -280,6 +280,76 @@ done mv $P/etc/cpufreqd.conf $C mv $C/cpufreqd.conf $P/etc/cpufreqd.conf.new + cat <<- "EOF" > $P/etc/cpufreqd.conf.sample + [General] + pidfile=/var/run/cpufreqd.pid + poll_interval=2 + verbosity=4 + enable_remote=1 + remote_group=root + [/General] + + [sensors_plugin] + sensors_conf=/etc/sensors3.conf + [/sensors_plugin] + + [Profile] + name=On Demand High + minfreq=40% + maxfreq=100% + policy=ondemand + [/Profile] + + [Profile] + name=On Demand Low + minfreq=20% + maxfreq=80% + policy=ondemand + [/Profile] + + [Profile] + name=Performance High + minfreq=100% + maxfreq=100% + policy=performance + [/Profile] + + [Profile] + name=Performance Low + minfreq=80% + maxfreq=80% + policy=performance + [/Profile] + + [Profile] + name=Powersave High + minfreq=70% + maxfreq=70% + policy=powersave + [/Profile] + + [Profile] + name=Powersave Low + minfreq=30% + maxfreq=30% + policy=powersave + [/Profile] + + [Rule] + name=Default Rule + sensor=temp1:0-60 + cpu_interval=0-100 + profile=Performance High + [/Rule] + + [Rule] + name=CPU Too Hot + sensor=temp1:61-100 + cpu_interval=50-100 + profile=On Demand Low + [/Rule] + + EOF install -d $P/etc/rc.d/init.d cat <<- "EOF" > $P/etc/rc.d/init.d/cpufreqd #!/bin/sh @@ -366,7 +436,7 @@ 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 usr/$libdir | tail -n+2` - tar rvpf $pkg.tar -C $P etc/cpufreqd.conf.new + tar rvpf $pkg.tar -C $P etc/cpufreqd.conf.{new,sample} tar rvpf $pkg.tar -C $P etc/rc.d/init.d/cpufreqd 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/man5 | tail -n+2` --- plamo/01_minimum/old/gdbm-20160712/PlamoBuild.gdbm-1.10 2016-07-12 13:30:33.000000000 +0900 +++ plamo/01_minimum/gdbm/PlamoBuild.gdbm-1.10 2016-09-03 23:08:19.000000000 +0900 @@ -5,10 +5,10 @@ pkgbase=gdbm vers=1.10 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" +OPT_CONFIG="--enable-libgdbm-compat" DOCS="NEWS README THANKS AUTHORS INSTALL ABOUT-NLS ChangeLog COPYING NOTE-WARNING" ###################################################################### --- plamo/01_minimum/old/get_pkginfo-20170301/PlamoBuild.get_pkginfo-git_20160222 2017-03-01 15:24:16.000000000 +0900 +++ plamo/01_minimum/get_pkginfo/PlamoBuild.get_pkginfo-git_20160222 2017-03-24 22:19:42.000000000 +0900 @@ -1,261 +1,42 @@ #!/bin/sh ###################################################################### -url="https://github.com/plamolinux/get_pkginfo.git - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/get_pkginfo/gitlog2changelog.py" +url="https://github.com/plamolinux/get_pkginfo.git" +verify= +commitid=facec2d pkgbase=get_pkginfo vers=git_20160222 arch=noarch -build=P2 +build=P3 src=$pkgbase patchfiles="" OPT_CONFIG="" DOCS="ChangeLog" -template=20170204 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; else - ( cd `basename ${i##*/} .git` ; git pull origin master ) ; 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 - ;; - esac - done - if [ ! -x gitlog2changelog.py ] ; then - chmod 755 gitlog2changelog.py - fi - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard facec2d - git set-file-times ; TZ=UTC ../gitlog2changelog.py) ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -275,12 +56,7 @@ nkf -e --overwrite README fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -299,47 +75,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/$src~/README $docdir/$src gzip_one $docdir/$src/README - mv $docdir/$src/{README,$myname,$spec}.gz $C - mv $C/{README,$myname,$spec}.gz $docdir/$src + mv $docdir/$src/{README,$func,$myname,$spec}.gz $C + mv $C/{README,$func,$myname,$spec}.gz $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/keyutils-20160720/PlamoBuild.keyutils-1.5.1 2016-07-20 00:46:34.000000000 +0900 +++ plamo/01_minimum/keyutils/PlamoBuild.keyutils-1.5.1 2016-08-01 17:17:50.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=keyutils vers=1.5.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -301,8 +301,8 @@ convert tar cvpf $pkg.tar -C $P `cd $P ; find 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 lib | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/lib | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find $libdir | 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 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/keyutils tar rvpf $pkg.tar -C $P etc/request-key.conf --- plamo/01_minimum/old/mcelog-20160911/PlamoBuild.mcelog-git_20160907 2016-09-11 19:16:07.000000000 +0900 +++ plamo/01_minimum/mcelog/PlamoBuild.mcelog-git_20160907 2016-10-13 16:30:39.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=mcelog vers=git_20160907 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase patchfiles="" OPT_CONFIG="" @@ -235,6 +235,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 cp -p mcelog.init{,.orig} cat <<- "EOF" | patch mcelog.init @@ -254,17 +265,6 @@ EOF 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} if [ -f Makefile ] ; then make clean fi --- plamo/01_minimum/old/fortune_mod-20160712/PlamoBuild.fortune_mod-1.99.1 2016-07-12 13:05:52.000000000 +0900 +++ plamo/01_minimum/fortune_mod/PlamoBuild.fortune_mod-1.99.1 2017-06-06 12:58:41.000000000 +0900 @@ -3,237 +3,40 @@ ###################################################################### 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" +verify= +digest= +commitid= pkgbase=fortune_mod vers=1.99.1 arch=`uname -m` -build=P3 +build=P4 src=fortune-mod-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog INDEX INSTALL Notes Offensive README TODO cookie-files" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B patch -Np0 -i $W/01_all_fortune_all-fix.patch cp -p Makefile Makefile.orig @@ -253,12 +56,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -271,17 +68,12 @@ cd ${B[$i]} if [ -f Makefile ] ; then make + make fortune/fortune.man fi done - make fortune/fortune.man fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -296,24 +88,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links 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` @@ -324,6 +100,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/nilfs_utils-20161006/PlamoBuild.nilfs_utils-2.1.1 2016-10-06 09:54:35.000000000 +0900 +++ plamo/01_minimum/nilfs_utils/PlamoBuild.nilfs_utils-2.2.5 2016-10-07 08:05:02.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://nilfs.sourceforge.net/download/nilfs-utils-2.1.1.tar.bz2" +url="http://nilfs.sourceforge.net/download/nilfs-utils-2.2.5.tar.bz2" pkgbase=nilfs_utils -vers=2.1.1 +vers=2.2.5 arch=`uname -m` -build=P2 +build=P1 src=nilfs-utils-$vers patchfiles="" -OPT_CONFIG="" -DOCS="README AUTHORS INSTALL NEWS ChangeLog COPYING" +OPT_CONFIG="--without-selinux" +DOCS="AUTHORS README COPYING NEWS ChangeLog INSTALL" ###################################################################### fscheck() { @@ -296,6 +296,7 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` + tar rvpf $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 usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` --- plamo/01_minimum/old/pcre-20161007/PlamoBuild.pcre-8.36 2016-10-07 11:45:12.000000000 +0900 +++ plamo/01_minimum/pcre/PlamoBuild.pcre-8.39 2016-10-08 10:54:14.000000000 +0900 @@ -1,14 +1,13 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/pcre/pcre-8.36.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/pcre/CVE-2014-8964.patch.gz" +url="http://downloads.sourceforge.net/pcre/pcre-8.39.tar.bz2" pkgbase=pcre -vers=8.36 +vers=8.39 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers -patchfiles="CVE-2014-8964.patch.gz" +patchfiles="" OPT_CONFIG="--enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline" @@ -276,7 +275,7 @@ make install DESTDIR=$P fi done - ln -s libpcre.so.1.2.4 $P/usr/$libdir/libpcre.so.0 + ln -s libpcre.so.1.2.7 $P/usr/$libdir/libpcre.so.0 touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/01_minimum/old/rpm2targz-20161013/PlamoBuild.rpm2targz-git_20100823 2016-10-13 13:50:29.000000000 +0900 +++ plamo/01_minimum/rpm2targz/PlamoBuild.rpm2targz-git_20120517 2016-10-14 07:46:27.000000000 +0900 @@ -5,9 +5,9 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/rpm2targz/rpm2cpio ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/rpm2targz/gitlog2changelog.py" pkgbase=rpm2targz -vers=git_20100823 +vers=git_20120517 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase patchfiles="" OPT_CONFIG="" @@ -227,7 +227,7 @@ bz2|tbz) tar xvpjf ${i##*/} ;; xz|txz) tar xvpJf ${i##*/} ;; git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard 4dc68a9 + git checkout origin/master ; git reset --hard e47270a git set-file-times ; TZ=UTC ../gitlog2changelog.py) ;; esac done --- plamo/01_minimum/old/ruby-20161014/PlamoBuild.ruby-2.2.3 2016-10-14 10:47:36.000000000 +0900 +++ plamo/01_minimum/ruby/PlamoBuild.ruby-2.2.3 2016-10-18 06:53:57.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=ruby vers=2.2.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-shared" @@ -291,9 +291,10 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `find $P/usr/$libdir/ruby/${vers%.*}.0/$triplet -name "*.so"` ; do - strip_libdir ${i%/*} - touch -t `date '+%m%d0900'` ${i%/*} + for i in `find $P/usr/$libdir/ruby/${vers%.*}.0/$triplet -name "*.so" \ + | sed 's@\(.*\)/.*@\1@' | sort | uniq` ; do + strip_libdir $i + touch -t `date '+%m%d0900'` $i done for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do --- plamo/01_minimum/old/screen-20161014/PlamoBuild.screen-4.3.1 2016-10-14 17:49:38.000000000 +0900 +++ plamo/01_minimum/screen/PlamoBuild.screen-4.4.0 2016-10-15 00:06:07.000000000 +0900 @@ -1,17 +1,16 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/screen/screen-4.3.1.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/screen/CVE-2015-6806.patch.gz" +url="http://ftp.gnu.org/gnu/screen/screen-4.4.0.tar.gz" pkgbase=screen -vers=4.3.1 +vers=4.4.0 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers -patchfiles="CVE-2015-6806.patch.gz" +patchfiles="" OPT_CONFIG="" -DOCS="NEWS NEWS.3.7 NEWS.3.6 NEWS.3.9 INSTALL README FAQ NEWS.3.5 - TODO COPYING ChangeLog HACKING" +DOCS="FAQ NEWS.3.9 COPYING NEWS.3.5 NEWS.3.7 HACKING NEWS NEWS.3.6 + ChangeLog INSTALL TODO README" ###################################################################### fscheck() { --- plamo/01_minimum/old/sg3_utils-20161015/PlamoBuild.sg3_utils-1.32 2016-10-15 00:01:30.000000000 +0900 +++ plamo/01_minimum/sg3_utils/PlamoBuild.sg3_utils-1.42 2016-10-16 06:50:07.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="http://sg.danny.cz/sg/p/sg3_utils-1.32.tar.bz2" +url="http://sg.danny.cz/sg/p/sg3_utils-1.42.tar.xz" pkgbase=sg3_utils -vers=1.32 +vers=1.42 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="ChangeLog README.freebsd README BSD_LICENSE README.solaris - README.win32 COPYING NEWS README.tru64 CREDITS INSTALL TODO - AUTHORS COVERAGE README.iscsi README.sg_start" +DOCS="NEWS README README.sg_start README.iscsi README.solaris CREDITS + ChangeLog BSD_LICENSE COPYING README.win32 AUTHORS COVERAGE + README.freebsd INSTALL README.tru64" ###################################################################### fscheck() { --- plamo/01_minimum/old/sqlite-20161016/PlamoBuild.sqlite-3.15.0 2016-10-16 06:53:06.000000000 +0900 +++ plamo/01_minimum/sqlite/PlamoBuild.sqlite-3.15.0 2016-11-05 21:40:17.000000000 +0900 @@ -5,11 +5,13 @@ pkgbase=sqlite vers=3.15.0 arch=`uname -m` -build=P1 +build=P3 src=$pkgbase-autoconf-3150000 patchfiles="" OPT_CONFIG="" DOCS="INSTALL README.txt" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -244,7 +246,9 @@ if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE -g -O2" fi done fi @@ -252,8 +256,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA \ - -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE -g -O2" + make fi done fi @@ -289,9 +292,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/old/squashfs-20161015/PlamoBuild.squashfs-4.2 2016-10-15 09:07:31.000000000 +0900 +++ plamo/01_minimum/squashfs/PlamoBuild.squashfs-4.3 2016-10-16 06:59:18.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/squashfs/squashfs4.2.tar.gz" +url="http://downloads.sourceforge.net/squashfs/squashfs4.3.tar.gz" pkgbase=squashfs -vers=4.2 +vers=4.3 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase$vers patchfiles="" OPT_CONFIG="" -DOCS="INSTALL COPYING PERFORMANCE.README README DONATIONS - ACKNOWLEDGEMENTS CHANGES pseudo-file.example README-4.2 - `echo OLD-READMEs/README-{3.3,2.0,3.1,3.2,4.0,AMD64,4.1,2.1,3.0}`" +DOCS="ACKNOWLEDGEMENTS README README-4.3 pseudo-file.example DONATIONS + `echo OLD-READMEs/README-{3.{0,3,2},2.0,3.1,4.0,2.1,4.2,AMD64,4.1}` + COPYING INSTALL PERFORMANCE.README CHANGES" ###################################################################### fscheck() { @@ -246,11 +246,11 @@ < #LZO_SUPPORT = 1 --- > LZO_SUPPORT = 1 - 97c97 + 111c111 < INSTALL_DIR = /usr/local/bin --- > INSTALL_DIR = /usr/bin - 256,258c256,258 + 303,305c303,305 < mkdir -p $(INSTALL_DIR) < cp mksquashfs $(INSTALL_DIR) < cp unsquashfs $(INSTALL_DIR) --- plamo/01_minimum/old/sysstat-20161015/PlamoBuild.sysstat-10.0.4 2016-10-15 09:35:13.000000000 +0900 +++ plamo/01_minimum/sysstat/PlamoBuild.sysstat-11.5.1 2016-10-16 07:01:32.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://pagesperso-orange.fr/sebastien.godard/sysstat-10.0.4.tar.bz2" +url="http://pagesperso-orange.fr/sebastien.godard/sysstat-11.5.1.tar.bz2" pkgbase=sysstat -vers=10.0.4 +vers=11.5.1 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--docdir=/usr/share/doc/sysstat" -DOCS="CHANGES COPYING CREDITS README TODO FAQ INSTALL" +DOCS="FAQ COPYING README.md CHANGES INSTALL CREDITS" ###################################################################### fscheck() { --- plamo/01_minimum/old/texinfo-20161017/PlamoBuild.texinfo-6.1 2016-10-17 14:55:34.000000000 +0900 +++ plamo/01_minimum/texinfo/PlamoBuild.texinfo-6.3 2016-10-18 11:01:32.000000000 +0900 @@ -1,11 +1,11 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/texinfo/texinfo-6.1.tar.xz" +url="http://ftp.gnu.org/gnu/texinfo/texinfo-6.3.tar.xz" pkgbase=texinfo -vers=6.1 +vers=6.3 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" --- plamo/01_minimum/old/time-20161017/PlamoBuild.time-1.7 2016-10-17 15:16:10.000000000 +0900 +++ plamo/01_minimum/time/PlamoBuild.time-1.7 2016-10-18 11:28:14.000000000 +0900 @@ -235,24 +235,7 @@ done cd $B cp -p Makefile.in{,.orig} - cat <<- "EOF" | patch Makefile.in - 117c117 - < $(mkinstalldirs) $(bindir) - --- - > $(mkinstalldirs) $(DESTDIR)$(bindir) - 120c120 - < $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ - --- - > $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ - 179c179 - < $(mkinstalldirs) $(infodir) - --- - > $(mkinstalldirs) $(DESTDIR)$(infodir) - 182c182 - < $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \ - --- - > $(INSTALL_DATA) $(srcdir)/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ - EOF + sed -i 's@$(bindir)@$(DESTDIR)&@;s@$(infodir)@$(DESTDIR)&@' Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/01_minimum/old/tree-20161017/PlamoBuild.tree-1.6.0 2016-10-17 15:31:58.000000000 +0900 +++ plamo/01_minimum/tree/PlamoBuild.tree-1.7.0 2016-10-18 11:21:37.000000000 +0900 @@ -1,11 +1,11 @@ #!/bin/sh ###################################################################### -url="ftp://mama.indstate.edu/linux/tree/tree-1.6.0.tgz" +url="ftp://mama.indstate.edu/linux/tree/tree-1.7.0.tgz" pkgbase=tree -vers=1.6.0 +vers=1.7.0 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -235,22 +235,7 @@ done cd $B cp -p Makefile{,.orig} - cat <<- "EOF" | patch Makefile - 97,98c97,98 - < install -d $(BINDIR) - < install -d $(MANDIR) - --- - > install -d $(DESTDIR)$(BINDIR) - > install -d $(DESTDIR)$(MANDIR) - 100c100 - < install -s $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \ - --- - > install -s $(TREE_DEST) $(DESTDIR)$(BINDIR)/$(TREE_DEST); \ - 102c102 - < install doc/$(MAN) $(MANDIR)/$(MAN) - --- - > install doc/$(MAN) $(DESTDIR)$(MANDIR)/$(MAN) - EOF + sed -i 's@$(BINDIR)@$(DESTDIR)&@;s@$(MANDIR)@$(DESTDIR)&@' Makefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/01_minimum/old/usbutils-20161021/PlamoBuild.usbutils-0.86 2016-10-21 11:00:11.000000000 +0900 +++ plamo/01_minimum/usbutils/PlamoBuild.usbutils-007 2016-10-22 23:18:43.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://repository.timesys.com/buildsources/u/usbutils/usbutils-0.86/usbutils-0.86.tar.gz" +url="https://www.kernel.org/pub/linux/utils/usb/usbutils/usbutils-007.tar.xz" pkgbase=usbutils -vers=0.86 +vers=007 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS" +DOCS="ChangeLog README NEWS COPYING INSTALL AUTHORS" template=20161020 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -254,7 +254,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make datadir=/usr/$libdir + make fi done fi @@ -271,7 +271,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P datadir=/usr/$libdir + make install DESTDIR=$P fi done touch $W/i.et @@ -313,8 +313,8 @@ convert 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 \ - `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` + tar rvpf $pkg.tar -C $P usr/share/usb.ids{,.gz} + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/pkgconfig | 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/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src --- plamo/01_minimum/old/which-20161021/PlamoBuild.which-2.20 2016-10-21 11:03:02.000000000 +0900 +++ plamo/01_minimum/which/PlamoBuild.which-2.21 2016-10-22 23:31:35.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/which/which-2.20.tar.gz" +url="http://ftp.gnu.org/gnu/which/which-2.21.tar.gz" pkgbase=which -vers=2.20 +vers=2.21 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="EXAMPLES INSTALL README README.alias AUTHORS NEWS COPYING" +DOCS="INSTALL EXAMPLES README README.alias AUTHORS NEWS COPYING" template=20161020 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/old/yaml-20161021/PlamoBuild.yaml-0.1.6 2016-10-21 11:03:52.000000000 +0900 +++ plamo/01_minimum/yaml/PlamoBuild.yaml-0.1.7 2016-10-22 23:39:13.000000000 +0900 @@ -1,14 +1,13 @@ #!/bin/sh ###################################################################### -url="http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src/pub/plamo/01_minimum/yaml/CVE-2014-9130.patch.gz" +url="http://pyyaml.org/download/libyaml/yaml-0.1.7.tar.gz" pkgbase=yaml -vers=0.1.6 +vers=0.1.7 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers -patchfiles="CVE-2014-9130.patch.gz" +patchfiles="" OPT_CONFIG="" DOCS="LICENSE README" template=20161020 --- plamo/01_minimum/old/gpm-20160716/PlamoBuild.gpm-1.20.7 2016-07-16 23:52:57.000000000 +0900 +++ plamo/01_minimum/gpm/PlamoBuild.gpm-1.20.7 2017-06-06 14:35:36.000000000 +0900 @@ -2,10 +2,13 @@ ###################################################################### url="http://www.nico.schottelius.org/software/gpm/archives/gpm-1.20.7.tar.bz2" +verify= +digest= +commitid= pkgbase=gpm vers=1.20.7 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -13,238 +16,33 @@ doc/Announce doc/FAQ doc/HACK_GPM doc/README.* doc/changelog doc/specs/synaptics/www.synaptics.com/decaf/utilities/* doc/support/* doc/todo/*" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches + cd $B ./autogen.sh for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -349,24 +142,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links 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 usr/$libdir | tail -n+2` @@ -381,6 +158,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/gpm-20170606/PlamoBuild.gpm-1.20.7 2017-06-06 14:35:36.000000000 +0900 +++ plamo/01_minimum/gpm/PlamoBuild.gpm-1.20.7 2018-02-05 15:12:35.000000000 +0900 @@ -4,11 +4,12 @@ url="http://www.nico.schottelius.org/software/gpm/archives/gpm-1.20.7.tar.bz2" verify= digest= +branch= commitid= pkgbase=gpm vers=1.20.7 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -16,7 +17,7 @@ doc/Announce doc/FAQ doc/HACK_GPM doc/README.* doc/changelog doc/specs/synaptics/www.synaptics.com/decaf/utilities/* doc/support/* doc/todo/*" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -40,6 +41,10 @@ done apply_patches cd $B + for i in display-{buttons,coords} get-versions ; do + cp -p src/prog/$i.c{,.orig} + sed -i 's@@"headers/gpm.h"@' src/prog/$i.c + done ./autogen.sh for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} --- plamo/01_minimum/old/emacs_bin-20160709/PlamoBuild.emacs_bin-24.5 2016-07-09 23:34:00.000000000 +0900 +++ plamo/01_minimum/emacs_bin/PlamoBuild.emacs_bin-24.5 2017-06-06 11:41:56.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz" +verify= +digest= +commitid= pkgbase=emacs_bin vers=24.5 arch=`uname -m` -build=P3 +build=P4 src=emacs-$vers patchfiles="" OPT_CONFIG="--without-all --without-x" DOCS="README INSTALL COPYING BUGS ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,29 +72,12 @@ compress strip_bindir $P/usr/libexec/emacs/$vers/* touch -t `date '+%m%d0900'` $P/usr/libexec/emacs/$vers/* - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/libexec/emacs tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/emacs_lib-20160709/PlamoBuild.emacs_lib-24.5 2016-07-09 23:28:25.000000000 +0900 +++ plamo/01_minimum/emacs_lib/PlamoBuild.emacs_lib-24.5 2017-06-06 20:12:07.000000000 +0900 @@ -2,238 +2,41 @@ ###################################################################### url="http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz - http://homepage1.nifty.com/blankspace/emacs/wb-line-number.el" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/emacs_lib/wb-line-number.el" +verify= +digest= +commitid= pkgbase=emacs_lib vers=24.5 arch=noarch -build=P3 +build=P4 src=emacs-$vers patchfiles="" OPT_CONFIG="--without-all --without-x" DOCS="README INSTALL COPYING BUGS ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p lisp/eshell/esh-util.el{,.orig} sed -i 's@|z2\\\\@&|xz\\\\@g' lisp/eshell/esh-util.el @@ -247,12 +50,6 @@ -e '/let/!s@|z2\\\\@&|xz\\\\@g' lisp/pcmpl-gnu.el for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -269,12 +66,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,29 +84,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/share/emacs tar rvpf $pkg.tar -C $P var/games/emacs tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/emacs_mini-20160709/PlamoBuild.emacs_mini-24.5 2016-07-09 23:47:56.000000000 +0900 +++ plamo/01_minimum/emacs_mini/PlamoBuild.emacs_mini-24.5 2017-06-06 11:49:09.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz" +verify= +digest= +commitid= pkgbase=emacs_mini vers=24.5 arch=`uname -m` -build=P3 +build=P4 src=emacs-$vers patchfiles="" OPT_CONFIG="--without-all --without-x" DOCS="README INSTALL COPYING BUGS ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/info | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/libelf-20160718/PlamoBuild.libelf-0.8.13 2016-07-18 20:01:49.000000000 +0900 +++ plamo/01_minimum/libelf/PlamoBuild.libelf-0.8.13 2017-06-11 10:53:13.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://www.mr511.de/software/libelf-0.8.13.tar.gz" +verify= +digest= +commitid= pkgbase=libelf vers=0.8.13 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="MANIFEST INSTALL README ChangeLog COPYING.LIB" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/libelf @@ -303,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/FDclone-20160613/PlamoBuild.FDclone-3.01b 2016-06-13 08:31:38.000000000 +0900 +++ plamo/01_minimum/FDclone/PlamoBuild.FDclone-3.01b 2017-05-05 13:06:34.000000000 +0900 @@ -2,226 +2,41 @@ ###################################################################### url="http://hp.vector.co.jp/authors/VA012337/soft/fd/FD-3.01b.tar.gz" +verify= +digest= +commitid= pkgbase=FDclone vers=3.01b arch=`uname -m` -build=P3 +build=P4 src=FD-$vers +patchfiles="" OPT_CONFIG="" DOCS="`echo {README,HISTORY,FAQ,TECHKNOW,Install,ToAdmin,LICENSES}.eng` FAQ README HISTORY TECHKNOW Install ToAdmin LICENSES" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile{,.orig} cat <<- "EOF" | patch Makefile @@ -281,12 +96,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -303,12 +112,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -326,24 +130,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress gzip_dir $mandir/ja_JP.eucJP/man1 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh mv etc/fd2rc.new /tmp @@ -364,6 +152,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/Python2-20160612/PlamoBuild.Python2-2.7.9 2016-06-12 17:35:00.000000000 +0900 +++ plamo/01_minimum/Python2/PlamoBuild.Python2-2.7.9 2017-05-05 13:13:40.000000000 +0900 @@ -2,226 +2,41 @@ ###################################################################### url="https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz" +verify= +digest= +commitid= pkgbase=Python2 vers=2.7.9 arch=`uname -m` -build=P3 +build=P4 src=Python-$vers +patchfiles="" OPT_CONFIG="--enable-shared --with-system-expat --with-system-ffi --with-dbmliborder=gdbm:bdb:ndbm" DOCS="LICENSE README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B sed -i 's@\(#! /usr\)/local\(/bin/python\)@\1\22@' Lib/cgi.py if [ $arch == x86_64 ] ; then @@ -234,12 +49,6 @@ fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -256,12 +65,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,24 +86,8 @@ strip_libdir $P/usr/$libdir/python2.7/config strip_libdir $P/usr/$libdir/python2.7/lib-dynload touch -t `date '+%m%d0900'` $P/usr/$libdir/python2.7/lib-dynload - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links touch -t `date '+%m%d0900'` $P/usr/$libdir/python2.7/config 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 -maxdepth 1 -name libpython2.7.*` @@ -311,6 +99,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/alsa.txz/old/alsa_lib-20160613/PlamoBuild.alsa_lib-1.1.1 2016-06-13 13:50:17.000000000 +0900 +++ plamo/01_minimum/alsa.txz/alsa_lib/PlamoBuild.alsa_lib-1.1.1 2017-05-14 21:44:00.000000000 +0900 @@ -2,233 +2,42 @@ ###################################################################### url="ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.1.tar.bz2" +verify= +digest= +commitid= pkgbase=alsa_lib vers=1.1.1 arch=`uname -m` -build=P2 +build=P3 src=alsa-lib-$vers +patchfiles="" OPT_CONFIG="" DOCS="INSTALL ChangeLog NOTES TODO COPYING MEMORY-LEAK" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -241,17 +50,12 @@ cd ${B[$i]} if [ -f Makefile ] ; then make + make doc fi done - make doc fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -270,32 +74,16 @@ compress strip_libdir $P/usr/$libdir/alsa-lib/smixer touch -t `date '+%m%d0900'` $P/usr/$libdir/alsa-lib/smixer - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/alsa-lib/html $docdir/$src mv $docdir/$src/{html,{INSTALL,ChangeLog,NOTES,TODO,COPYING}.gz} $C - mv $docdir/$src/{MEMORY-LEAK,$myname}.gz $C + mv $docdir/$src/{MEMORY-LEAK,$func,$myname,$spec}.gz $C mv $C/{html,{INSTALL,ChangeLog,NOTES,TODO,COPYING}.gz} $docdir/$src - mv $C/{MEMORY-LEAK,$myname}.gz $docdir/$src + mv $C/{MEMORY-LEAK,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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 "libasound.*"` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libasound.*` tar rvpf $pkg.tar -C $P usr/$libdir/alsa-lib tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/alsa @@ -306,6 +94,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/alsa.txz/old/alsa_utils-20160613/PlamoBuild.alsa_utils-1.1.1 2016-06-13 22:40:37.000000000 +0900 +++ plamo/01_minimum/alsa.txz/alsa_utils/PlamoBuild.alsa_utils-1.1.1 2017-05-05 13:56:58.000000000 +0900 @@ -2,233 +2,42 @@ ###################################################################### url="ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.1.1.tar.bz2" +verify= +digest= +commitid= pkgbase=alsa_utils vers=1.1.1 arch=`uname -m` -build=P2 +build=P3 src=alsa-utils-$vers +patchfiles="" OPT_CONFIG="--with-asound-state-dir=/etc" DOCS="ABOUT-NLS INSTALL ChangeLog TODO README COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -245,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -266,24 +70,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress gzip_dir $mandir/fr/man8 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg # initialize sound card and store data @@ -296,7 +84,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find lib/udev/rules.d | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/alsa - 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/locale -name *.mo` tar rvpf $pkg.tar -C $P usr/share/sounds/alsa 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/man7 | tail -n+2` @@ -306,6 +94,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/alsa.txz/old/alsa_plugins-20160613/PlamoBuild.alsa_plugins-1.1.1 2016-06-13 16:20:05.000000000 +0900 +++ plamo/01_minimum/alsa.txz/alsa_plugins/PlamoBuild.alsa_plugins-1.1.1 2017-05-05 14:07:51.000000000 +0900 @@ -2,235 +2,44 @@ ###################################################################### url="ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-1.1.1.tar.bz2" +verify= +digest= +commitid= pkgbase=alsa_plugins vers=1.1.1 arch=`uname -m` -build=P2 +build=P3 src=alsa-plugins-$vers +patchfiles="" OPT_CONFIG="" DOCS="`echo doc/{{samplerate,a52}.txt,README-{pcm-oss,maemo,jack}}` `echo doc/{{speex{dsp,rate},lavcrate,vdownmix}.txt,README-pulse}` `echo doc/{upmix.txt,README-arcam-av}` COPYING COPYING.GPL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -247,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -268,24 +72,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/alsa-lib - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links touch -t `date '+%m%d0900'` $P/usr/$libdir/alsa-lib tar cvpf $pkg.tar -C $P usr/$libdir/alsa-lib tar rvpf $pkg.tar -C $P usr/share/alsa @@ -293,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/aspell.txz/old/aspell-20160615/PlamoBuild.aspell-0.60.6.1 2016-06-15 13:07:08.000000000 +0900 +++ plamo/01_minimum/aspell.txz/aspell/PlamoBuild.aspell-0.60.6.1 2016-09-02 09:42:02.000000000 +0900 @@ -5,8 +5,9 @@ pkgbase=aspell vers=0.60.6.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="TODO README ABOUT-NLS COPYING" ###################################################################### @@ -223,6 +224,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -261,6 +273,7 @@ fi done sver=`echo $vers | cut -d. -f1-2` + ln -s /usr/$libdir/aspell-$sver/spell $P/usr/bin ln -s /usr/$libdir/aspell-$sver/ispell $P/usr/bin touch $W/i.et cd $W --- plamo/01_minimum/aspell.txz/old/aspell-20160902/PlamoBuild.aspell-0.60.6.1 2016-09-02 09:42:02.000000000 +0900 +++ plamo/01_minimum/aspell.txz/aspell/PlamoBuild.aspell-0.60.6.1 2017-05-07 09:57:01.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.6.1.tar.gz" +verify= +digest= +commitid= pkgbase=aspell vers=0.60.6.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="TODO README ABOUT-NLS COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,24 +74,8 @@ compress strip_libdir $P/usr/$libdir/aspell-$sver touch -t `date '+%m%d0900'` $P/usr/$libdir/aspell-$sver - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` @@ -310,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/aspell.txz/old/aspell6_en-20160615/PlamoBuild.aspell6_en-7.1.0 2016-06-15 13:42:28.000000000 +0900 +++ plamo/01_minimum/aspell.txz/aspell6_en/PlamoBuild.aspell6_en-7.1.0 2017-05-07 10:05:03.000000000 +0900 @@ -2,233 +2,42 @@ ###################################################################### url="ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-7.1-0.tar.bz2" +verify= +digest= +commitid= pkgbase=aspell6_en vers=7.1.0 arch=`uname -m` -build=P2 +build=P3 src=aspell6-en-7.1-0 +patchfiles="" OPT_CONFIG="" DOCS="`echo doc/{extra.txt,ChangeLog,SCOWL-README}` README README.iso" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure fi @@ -243,12 +52,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -263,28 +67,11 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/$libdir/aspell-0.60 tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/autofs-20161108a/PlamoBuild.autofs-5.1.2 2016-11-08 12:19:19.000000000 +0900 +++ plamo/01_minimum/autofs/PlamoBuild.autofs-5.1.2 2017-05-23 06:23:59.000000000 +0900 @@ -3,247 +3,42 @@ ###################################################################### url="https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-5.1.2.tar.xz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/autofs/autofs_init_sleep.patch" +verify= +digest= +commitid= pkgbase=autofs vers=5.1.2 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="autofs_init_sleep.patch" OPT_CONFIG="--with-confdir=/etc --without-openldap" DOCS="CHANGELOG COPYING COPYRIGHT CREDITS INSTALL README*" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -288,38 +78,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/autofs - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- "EOF" >> $P/install/doinst.sh autofs_config() { @@ -345,6 +105,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/bc-20160618/PlamoBuild.bc-1.06.95 2016-06-18 22:11:34.000000000 +0900 +++ plamo/01_minimum/bc/PlamoBuild.bc-1.06.95 2017-05-23 06:31:23.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://alpha.gnu.org/gnu/bc/bc-1.06.95.tar.bz2" +verify= +digest= +commitid= pkgbase=bc vers=1.06.95 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--with-readline" DOCS="README AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS FAQ" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,36 +69,19 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/{Examples,Test} $docdir/$src chmod 755 $docdir/$src/{Examples,Test} chown -R root.root $docdir/$src/{Examples,Test} - mv $docdir/$src/{Examples,Test,{FAQ,$myname}.gz} $C - mv $C/{Examples,Test,{FAQ,$myname}.gz} $docdir/$src + mv $docdir/$src/{Examples,Test,{FAQ,$func,$myname,$spec}.gz} $C + mv $C/{Examples,Test,{FAQ,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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/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 usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/berkeley_db-20160616/PlamoBuild.berkeley_db-4.7.25 2016-06-16 21:24:28.000000000 +0900 +++ plamo/01_minimum/berkeley_db/PlamoBuild.berkeley_db-4.7.25 2017-05-23 06:40:08.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz" +verify= +digest= +commitid= pkgbase=berkeley_db vers=4.7.25 arch=`uname -m` -build=P4 +build=P5 src=db-$vers patchfiles="" OPT_CONFIG="--enable-compat185 --enable-cxx --enable-o_direct --enable-pthread_api --enable-rpc" DOCS="LICENSE README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/build_unix - 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]}/build_unix - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x ../dist/configure ] ; then ../dist/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -287,28 +79,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $P/usr/docs $docdir/$src - mv $docdir/$src/{docs,$myname.gz} $C - mv $C/{docs,$myname.gz} $docdir/$src + mv $docdir/$src/{docs,{$func,$myname,$spec}.gz} $C + mv $C/{docs,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -316,6 +92,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/bsd_games-20160617/PlamoBuild.bsd_games-2.17 2016-06-17 17:39:04.000000000 +0900 +++ plamo/01_minimum/bsd_games/PlamoBuild.bsd_games-2.17 2017-05-23 12:52:45.000000000 +0900 @@ -6,239 +6,42 @@ http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/games-misc/bsd-games/files/bsd-games-2.17-gcc43.patch http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/games-misc/bsd-games/files/bsd-games-2.17-headers.patch http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/games-misc/bsd-games/files/bsd-games-2.17-64bit.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/bsd_games/hangman-words.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/bsd_games/hangman-words.gz" +verify= +digest= +commitid= pkgbase=bsd_games vers=2.17 arch=`uname -m` -build=P5 +build=P6 src=bsd-games-$vers patchfiles="" OPT_CONFIG="" DOCS="THANKS AUTHORS BUGS COPYING NEWS ChangeLog PACKAGING SECURITY ChangeLog.0 INSTALL README YEAR2000 TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B patch -Np0 -i $W/bsd-games-2.17-glibc2.10.patch patch -Np0 -i $W/bsd-games-2.17-gcc43.patch @@ -252,12 +55,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -274,12 +71,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -301,28 +93,14 @@ strip_bindir $P/usr/games strip_bindir $P/usr/libexec/games/dm touch -t `date '+%m%d0900'` $P/usr/libexec/games/dm - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/bsd-games $docdir/$src/trek - mv $docdir/$src/{trek,{INSTALL,README,YEAR2000,TODO,$myname}.gz} $C - mv $C/{trek,{INSTALL,README,YEAR2000,TODO,$myname}.gz} $docdir/$src + mv $docdir/$src/{trek,{INSTALL,README,YEAR2000,TODO}.gz} $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C + mv $C/{trek,{INSTALL,README,YEAR2000,TODO}.gz} $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links prune_symlink $P/usr/games touch -t `date '+%m%d0900'` $P/usr/games tar cvpf $pkg.tar -C $P usr/games @@ -339,6 +117,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/bvi-20160617/PlamoBuild.bvi-1.4.0 2016-06-17 19:26:49.000000000 +0900 +++ plamo/01_minimum/bvi/PlamoBuild.bvi-1.4.0 2017-05-23 14:32:51.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/bvi/bvi-1.4.0.src.tar.gz" +verify= +digest= +commitid= pkgbase=bvi vers=1.4.0 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README COPYING CREDITS CHANGES" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,30 +69,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/bvi 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/cpio-20161109/PlamoBuild.cpio-2.12 2016-11-09 22:31:09.000000000 +0900 +++ plamo/01_minimum/cpio/PlamoBuild.cpio-2.12 2017-05-23 15:17:08.000000000 +0900 @@ -3,248 +3,43 @@ ###################################################################### url="http://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/cpio/CVE-2016-2037.patch" +verify= +digest= +commitid= pkgbase=cpio vers=2.12 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="CVE-2016-2037.patch" OPT_CONFIG="" DOCS="AUTHORS ABOUT-NLS TODO COPYING INSTALL README NEWS ChangeLog THANKS" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,38 +72,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_bindir $P/usr/libexec - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/libexec | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -323,6 +83,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/cpufreqd-20160717/PlamoBuild.cpufreqd-2.4.2 2016-07-17 12:54:50.000000000 +0900 +++ plamo/01_minimum/cpufreqd/PlamoBuild.cpufreqd-2.4.2 2017-05-23 15:47:09.000000000 +0900 @@ -2,237 +2,40 @@ ###################################################################### url="http://downloads.sourceforge.net/cpufreqd/cpufreqd-2.4.2.tar.bz2" +verify= +digest= +commitid= pkgbase=cpufreqd vers=2.4.2 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING NEWS ChangeLog AUTHORS INSTALL README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p src/Makefile.in{,.orig} sed -i 's@\@$(libdir)@g' src/Makefile.in @@ -241,12 +44,6 @@ -e 's@^#\(remote_group\)@\1@' cpufreqd.conf for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -405,24 +197,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh mv etc/cpufreqd.conf.new /tmp @@ -445,6 +221,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/cpufrequtils-20160622/PlamoBuild.cpufrequtils-008 2016-06-22 01:19:10.000000000 +0900 +++ plamo/01_minimum/cpufrequtils/PlamoBuild.cpufrequtils-008 2017-05-23 16:43:48.000000000 +0900 @@ -3,237 +3,40 @@ ###################################################################### url="https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-008.tar.xz http://slackware.uk/people/alien-arm/bootstrap/source.local/a/cpufrequtils/cpufrequtils_no_aperf.diff" +verify= +digest= +commitid= pkgbase=cpufrequtils vers=008 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B if [ $arch != i686 -a $arch != x86_64 ] ; then patch -Np1 -i $W/cpufrequtils_no_aperf.diff @@ -243,12 +46,6 @@ -e "/^libdir/s@/lib@/$libdir@" Makefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -265,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -287,24 +79,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -314,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/cryptsetup-20160618/PlamoBuild.cryptsetup-1.6.2 2016-06-18 22:43:00.000000000 +0900 +++ plamo/01_minimum/cryptsetup/PlamoBuild.cryptsetup-1.6.2 2017-05-23 22:04:50.000000000 +0900 @@ -1,247 +1,44 @@ #!/bin/sh ###################################################################### -url="http://cryptsetup.googlecode.com/files/cryptsetup-1.6.2.tar.bz2" +url="https://www.kernel.org/pub/linux/utils/cryptsetup/v1.6/cryptsetup-1.6.2.tar.xz" +verify= +digest= +commitid= pkgbase=cryptsetup vers=1.6.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="FAQ ChangeLog COPYING NEWS COPYING.LGPL AUTHORS ABOUT-NLS README INSTALL TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` @@ -306,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/dbus-20161230/PlamoBuild.dbus-1.6.18 2016-12-30 07:26:40.000000000 +0900 +++ plamo/01_minimum/dbus/PlamoBuild.dbus-1.6.18 2017-05-28 07:42:45.000000000 +0900 @@ -2,10 +2,13 @@ ###################################################################### url="http://dbus.freedesktop.org/releases/dbus/dbus-1.6.18.tar.gz" +verify= +digest= +commitid= pkgbase=dbus vers=1.6.18 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-systemd --with-xml=expat @@ -14,239 +17,31 @@ DOCS="INSTALL NEWS README AUTHORS ChangeLog COPYING HACKING ChangeLog.pre-1-0 NEWS.pre-1-0 ChangeLog.pre-1-2 NEWS.pre-1-2 README.win README.wince README.cygwin README.launchd" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -284,42 +74,12 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_bindir $P/usr/libexec - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/dbus $docdir/$src/doc - mv $docdir/$src/{doc,{$myname,$spec}.gz} $C - mv $C/{doc,{$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{doc,{$func,$myname,$spec}.gz} $C + mv $C/{doc,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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/libexec | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libdbus-1.*` @@ -334,6 +94,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/kernel_headers-20160124/PlamoBuild.kernel_headers-4.1.15_plamoRPi2 2016-01-24 09:32:55.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.1.15_plamoRPi2 2016-02-04 07:41:05.000000000 +0900 @@ -9,12 +9,11 @@ ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-morse_code_panics.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2 - https://github.com/raspberry/firmware.git" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2" pkgbase=kernel_headers vers=4.1.15_plamoRPi2 arch=arm -build=P1 +build=P2 src=linux OPT_CONFIG="" DOCS="" @@ -208,7 +207,6 @@ git) ( cd `basename ${i##*/} .git` case `basename ${i##*/} .git` in linux) git checkout origin/rpi-4.1.y ; git reset --hard d51c7d8 ;; - firmware) git checkout origin/master ; git reset --hard 1ed8eca ;; aufs4-*) git checkout origin/aufs4.1 ; git reset --hard 2b569cf ;; esac ) ;; esac @@ -234,7 +232,6 @@ bunzip2 -c $W/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch cp -p $W/config-4.1.15-plamoRPi2 .config - cp -p $W/firmware/extra/Module7.symvers Module.symvers for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then --- plamo/01_minimum/devel.txz/old/libc-20160110/PlamoBuild.libc-2.20 2016-01-10 10:04:36.000000000 +0900 +++ plamo/01_minimum/devel.txz/libc/PlamoBuild.libc-2.20 2016-03-14 16:28:14.000000000 +0900 @@ -6,11 +6,15 @@ http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-do_ftell_wide-memleak.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-getifaddrs_internal-segfault.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-linux-3.16-additions.patch - http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz" + http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-7547.patch + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8776.patch + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8778.patch + https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8779.patch" pkgbase=libc vers=2.20 arch=`uname -m` -build=P2 +build=P3 src=glibc-$vers OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS @@ -213,7 +217,11 @@ patch -Np1 -i $W/glibc-2.20-do_ftell_wide-memleak.patch patch -Np1 -i $W/glibc-2.20-getifaddrs_internal-segfault.patch patch -Np1 -i $W/glibc-2.20-linux-3.16-additions.patch - patch -Np1 -i $W/glibc-c-utf8-locale.patch.gz + gunzip -c $W/glibc-c-utf8-locale.patch.gz | patch -Np1 -i - + patch -Np1 -i $W/CVE-2015-7547.patch + patch -Np1 -i $W/CVE-2015-8776.patch + patch -Np1 -i $W/CVE-2015-8778.patch + patch -Np1 -i $W/CVE-2015-8779.patch cp -p localedata/Makefile{,.orig} cat <<- "EOF" | patch localedata/Makefile 235a236 --- plamo/01_minimum/devel.txz/old/libc-20160314/PlamoBuild.libc-2.20 2016-03-14 16:28:14.000000000 +0900 +++ plamo/01_minimum/devel.txz/libc/PlamoBuild.libc-2.20 2016-06-07 07:55:19.000000000 +0900 @@ -7,14 +7,14 @@ http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-getifaddrs_internal-segfault.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-linux-3.16-additions.patch http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-7547.patch - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8776.patch - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8778.patch - https://github.com/plamolinux/Plamo-src/raw/master/plamo/00_base/glibc/CVE-2015-8779.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-7547.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8776.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8778.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8779.patch" pkgbase=libc vers=2.20 arch=`uname -m` -build=P3 +build=P4 src=glibc-$vers OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS @@ -196,14 +196,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##*/} ;; - xz) tar xvpJf ${i##*/} ;; + gz|tgz) tar xvpzf ${i##*/} ;; + bz2|tbz) tar xvpjf ${i##*/} ;; + xz|txz) tar xvpJf ${i##*/} ;; esac done fi @@ -252,8 +273,8 @@ EOF esac if [ -x ${S2[$i]}/configure ] ; then - ${S2[$i]}/configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ - --infodir='${prefix}'/share/info \ + ${S2[$i]}/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ --libexecdir=/usr/$libdir/glibc \ --build=$arch-pc-linux --target=$arch-pc-linux --- plamo/01_minimum/devel.txz/old/gettext-20160702/PlamoBuild.gettext-0.19.7 2016-07-02 03:16:22.000000000 +0900 +++ plamo/01_minimum/devel.txz/gettext/PlamoBuild.gettext-0.19.7 2016-08-24 20:36:49.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=gettext vers=0.19.7 arch=`uname -m` -build=P2 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -237,6 +237,8 @@ cd $B cp -p gettext-tools/src/Makefile.in{,.orig} sed -i 's@$(GCJ)@LANG=C &@g' gettext-tools/src/Makefile.in + export EMACS=`( which emacs || which emacs_mini ) 2> /dev/null \ + | sed 's@.*/@@'` for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -308,10 +310,13 @@ touch -r $S $docdir/$src convert 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 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/gettext 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/emacs/site-lisp | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/aclocal | tail -n+2` + tar rvpf $pkg.tar -C $P usr/share/$src 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` --- plamo/01_minimum/devel.txz/old/plamobuild-20170301/PlamoBuild.plamobuild-git_20170116 2017-03-01 14:22:55.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20170324 2017-03-24 22:25:03.000000000 +0900 @@ -2,261 +2,43 @@ ###################################################################### url="https://github.com/plamolinux/Plamo-src.git - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog.py" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog" +verify= +commitid[0]=7f1ba6f pkgbase=plamobuild -vers=git_20170116 +vers=git_20170324 arch=noarch build=P1 src=Plamo-src patchfiles="" OPT_CONFIG="" DOCS="ChangeLog" -template=20170204 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; else - ( cd `basename ${i##*/} .git` ; git pull origin master ) ; 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 - ;; - esac - done - if [ ! -x gitlog2changelog.py ] ; then - chmod 755 gitlog2changelog.py - fi - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard d1da0b1 - git set-file-times ; TZ=UTC ../gitlog2changelog.py - nkf -e --overwrite ChangeLog ) ;; - esac - done + download_sources + nkf -e --overwrite Plamo-src/ChangeLog fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -276,12 +58,7 @@ nkf -e --overwrite README fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -293,10 +70,10 @@ done install -d $P/usr/bin install admin/make_PlamoBuild.py $P/usr/bin/make_PlamoBuild - install -d $P/usr/share - install -m 644 admin/plamobuild_functions.sh \ - $P/usr/share/plamobuild_functions - ln -s plamobuild_functions $P/usr/share/plamobuild_functions.sh + install admin/gitlog2changelog.py $P/usr/bin/gitlog2changelog + install -d $P/usr/share/plamo + install -m 644 admin/plamobuild_functions.sh $P/usr/share/plamo/functions + ln -s plamo/functions $P/usr/share/plamobuild_functions.sh install -d $docdir/$src~ install -m 644 README $docdir/$src~ touch $W/i.et @@ -304,50 +81,19 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/$src~/README $docdir/$src gzip_one $docdir/$src/README - mv $docdir/$src/{README,$myname,$spec}.gz $C - mv $C/{README,$myname,$spec}.gz $docdir/$src + mv $docdir/$src/{README,$func,$myname,$spec}.gz $C + mv $C/{README,$func,$myname,$spec}.gz $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links prune_symlink $P/usr/share tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P usr/share/plamobuild_functions{,.sh} + tar rvpf $pkg.tar -C $P usr/share/plamo{,build_functions.sh} 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/libc-20160607/PlamoBuild.libc-2.20 2016-06-07 07:55:19.000000000 +0900 +++ plamo/01_minimum/devel.txz/libc/PlamoBuild.libc-2.20 2016-12-09 19:36:44.000000000 +0900 @@ -7,18 +7,24 @@ http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-getifaddrs_internal-segfault.patch http://ftp.su.se/pub/mirrors/lunar-linux.org/lunar/patches/glibc-2.20-linux-3.16-additions.patch http://slackware.cs.utah.edu/pub/slackware/slackware-current/source/l/glibc/glibc-c-utf8-locale.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-7547.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8776.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8778.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/00_base/glibc/CVE-2015-8779.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-7547.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8776.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8778.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8779.patch" pkgbase=libc vers=2.20 arch=`uname -m` -build=P4 +build=P5 src=glibc-$vers +patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch + glibc-2.20-getifaddrs_internal-segfault.patch + glibc-2.20-linux-3.16-additions.patch glibc-c-utf8-locale.patch.gz + `echo CVE-2015-{7547,877{6,8,9}}.patch`" OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS PROJECTS README" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -233,16 +239,17 @@ if [ -d ${S2[$i]} ] ; then rm -rf ${S2[$i]} ; fi ; cp -a ${S[$i]} ${S2[$i]} if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; mkdir ${B[$i]} done - cd $S2 - patch -Np1 -i $W/glibc-2.19-fhs-1.patch - patch -Np1 -i $W/glibc-2.20-do_ftell_wide-memleak.patch - patch -Np1 -i $W/glibc-2.20-getifaddrs_internal-segfault.patch - patch -Np1 -i $W/glibc-2.20-linux-3.16-additions.patch - gunzip -c $W/glibc-c-utf8-locale.patch.gz | patch -Np1 -i - - patch -Np1 -i $W/CVE-2015-7547.patch - patch -Np1 -i $W/CVE-2015-8776.patch - patch -Np1 -i $W/CVE-2015-8778.patch - patch -Np1 -i $W/CVE-2015-8779.patch + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${S2[$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 cp -p localedata/Makefile{,.orig} cat <<- "EOF" | patch localedata/Makefile 235a236 @@ -321,9 +328,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/devel.txz/old/gcc-20160111/PlamoBuild.gcc-4.8.4 2016-01-11 22:54:27.000000000 +0900 +++ plamo/01_minimum/devel.txz/gcc/PlamoBuild.gcc-4.8.5 2016-01-28 13:21:21.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2 +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 https://patchwork.ozlabs.org/patch/342434/mbox" pkgbase=gcc -vers=4.8.4 +vers=4.8.5 arch=`uname -m` -build=P3 +build=P2 src=$pkgbase-$vers OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object --enable-linker-build-id --enable-plugin --with-system-zlib --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" -DOCS="COPYING.LIB MAINTAINERS ABOUT-NLS README COPYING3.LIB COPYING - COPYING.RUNTIME NEWS COPYING3 ChangeLog" +DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa + COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" ###################################################################### fscheck() { --- plamo/01_minimum/devel.txz/old/g++-20160111/PlamoBuild.g++-4.8.4 2016-01-11 22:18:25.000000000 +0900 +++ plamo/01_minimum/devel.txz/g++/PlamoBuild.g++-4.8.5 2016-01-28 13:42:18.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2 +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 https://patchwork.ozlabs.org/patch/342434/mbox" pkgbase=g++ -vers=4.8.4 +vers=4.8.5 arch=`uname -m` -build=P3 +build=P2 src=gcc-$vers OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object --enable-linker-build-id --enable-plugin --with-system-zlib --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" -DOCS="COPYING.LIB MAINTAINERS ABOUT-NLS README COPYING3.LIB COPYING - COPYING.RUNTIME NEWS COPYING3 ChangeLog" +DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa + COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" ###################################################################### fscheck() { --- plamo/01_minimum/devel.txz/old/plamobuild-20170324/PlamoBuild.plamobuild-git_20170324 2017-03-24 22:25:03.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20170326 2017-03-26 22:30:19.000000000 +0900 @@ -4,9 +4,9 @@ url="https://github.com/plamolinux/Plamo-src.git ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog" verify= -commitid[0]=7f1ba6f +commitid[0]=b7f15da pkgbase=plamobuild -vers=git_20170324 +vers=git_20170326 arch=noarch build=P1 src=Plamo-src --- plamo/01_minimum/devel.txz/old/plamobuild-20170326/PlamoBuild.plamobuild-git_20170326 2017-03-26 22:30:19.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20170415 2017-04-15 12:50:21.000000000 +0900 @@ -4,16 +4,17 @@ url="https://github.com/plamolinux/Plamo-src.git ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog" verify= -commitid[0]=b7f15da +digest= +commitid[0]=3c89799 pkgbase=plamobuild -vers=git_20170326 +vers=git_20170415 arch=noarch build=P1 src=Plamo-src patchfiles="" OPT_CONFIG="" DOCS="ChangeLog" -template=20170323 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/devel.txz/old/plamobuild-20170415/PlamoBuild.plamobuild-git_20170415 2017-04-15 12:50:21.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20170416 2017-04-16 21:32:11.000000000 +0900 @@ -5,9 +5,9 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog" verify= digest= -commitid[0]=3c89799 +commitid[0]=4d98d43 pkgbase=plamobuild -vers=git_20170415 +vers=git_20170416 arch=noarch build=P1 src=Plamo-src --- plamo/01_minimum/devel.txz/old/plamobuild-20170416/PlamoBuild.plamobuild-git_20170416 2017-04-16 21:32:11.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20170417 2017-04-17 20:39:04.000000000 +0900 @@ -5,9 +5,9 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog" verify= digest= -commitid[0]=4d98d43 +commitid[0]=15f625d pkgbase=plamobuild -vers=git_20170416 +vers=git_20170417 arch=noarch build=P1 src=Plamo-src --- plamo/01_minimum/devel.txz/old/bison-20160623/PlamoBuild.bison-3.0.4 2016-06-23 12:53:11.000000000 +0900 +++ plamo/01_minimum/devel.txz/bison/PlamoBuild.bison-3.0.4 2016-08-11 16:10:13.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=bison vers=3.0.4 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -305,7 +305,7 @@ 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 | tail -n+2` 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/aclocal -name *.mo` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/aclocal | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/bison 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` --- plamo/01_minimum/devel.txz/old/cloog-20160624/PlamoBuild.cloog-0.17.0 2016-06-24 12:00:24.000000000 +0900 +++ plamo/01_minimum/devel.txz/cloog/PlamoBuild.cloog-0.17.0 2016-09-02 18:30:13.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=cloog vers=0.17.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -241,9 +241,9 @@ < test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \ < $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac --- - > $(DESTDIR)/usr/share/gdb/auto-load/$$libisl-gdb.py; \ - > test -z "/usr/share/gdb/auto-load" || $(MKDIR_P) "$(DESTDIR)/usr/share/gdb/auto-load"; \ - > $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)/usr/share/gdb/auto-load/$$libisl-gdb.py; esac + > $(DESTDIR)/usr/share/gdb/auto-load$(libdir)/$$libisl-gdb.py; \ + > test -z "/usr/share/gdb/auto-load$(libdir)" || $(MKDIR_P) "$(DESTDIR)/usr/share/gdb/auto-load$(libdir)"; \ + > $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)/usr/share/gdb/auto-load$(libdir)/$$libisl-gdb.py; esac EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} @@ -311,7 +311,7 @@ tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | 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 usr/share/gdb/auto-load | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/gdb/auto-load/usr/$libdir | 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 --- plamo/01_minimum/devel.txz/old/gettext-20160824/PlamoBuild.gettext-0.19.7 2016-08-24 20:36:49.000000000 +0900 +++ plamo/01_minimum/devel.txz/gettext/PlamoBuild.gettext-0.19.7 2017-02-27 20:42:08.000000000 +0900 @@ -5,12 +5,14 @@ pkgbase=gettext vers=0.19.7 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" +OPT_CONFIG="--with-included-glib --with-included-libcroco" DOCS="ChangeLog.0 DEPENDENCIES ChangeLog HACKING README INSTALL AUTHORS README.woe32 THANKS COPYING PACKAGING NEWS" +template=20170204 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -228,7 +230,7 @@ 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 - ;; + bz2) bunzip2 -c $W/$j | patch -Np1 -i - ;; xz) unxz -c $W/$j | patch -Np1 -i - ;; *) patch -Np1 -i $W/$j ;; esac @@ -294,19 +296,35 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done mv $docdir/{libasprintf,gettext} $docdir/$src mv $docdir/$src/{libasprintf,{ChangeLog.0,DEPENDENCIES,ChangeLog}.gz} $C mv $docdir/$src/{HACKING,README,INSTALL,AUTHORS,README.woe32}.gz $C - mv $docdir/$src/{{THANKS,COPYING,PACKAGING,NEWS}.gz,gettext,$myname.gz} $C + mv $docdir/$src/{{THANKS,COPYING,PACKAGING,NEWS}.gz,gettext} $C + mv $docdir/$src/{$myname,$spec}.gz $C mv $C/{libasprintf,{ChangeLog.0,DEPENDENCIES,ChangeLog}.gz} $docdir/$src mv $C/{HACKING,README,INSTALL,AUTHORS,README.woe32}.gz $docdir/$src - mv $C/{{THANKS,COPYING,PACKAGING,NEWS}.gz,gettext,$myname.gz} $docdir/$src + mv $C/{{THANKS,COPYING,PACKAGING,NEWS}.gz,gettext} $docdir/$src + mv $C/{$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` --- plamo/01_minimum/devel.txz/old/plamobuild-20170417/PlamoBuild.plamobuild-git_20170417 2017-04-17 20:39:04.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20170430 2017-04-30 19:17:46.000000000 +0900 @@ -5,9 +5,9 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog" verify= digest= -commitid[0]=15f625d +commitid[0]=81bc770 pkgbase=plamobuild -vers=git_20170417 +vers=git_20170430 arch=noarch build=P1 src=Plamo-src --- plamo/01_minimum/devel.txz/old/patch-20160707/PlamoBuild.patch-2.7.3 2016-07-07 08:42:07.000000000 +0900 +++ plamo/01_minimum/devel.txz/patch/PlamoBuild.patch-2.7.3 2017-06-01 11:24:04.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/patch/patch-2.7.3.tar.gz" +verify= +digest= +commitid= pkgbase=patch vers=2.7.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README INSTALL COPYING ChangeLog NEWS ChangeLog-2011 AUTHORS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/kernel_headers-20160204/PlamoBuild.kernel_headers-4.1.15_plamoRPi2 2016-02-04 07:41:05.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.1.15_plamoRPi2 2016-02-19 08:30:28.000000000 +0900 @@ -13,7 +13,7 @@ pkgbase=kernel_headers vers=4.1.15_plamoRPi2 arch=arm -build=P2 +build=P3 src=linux OPT_CONFIG="" DOCS="" --- plamo/01_minimum/devel.txz/old/kernel_headers-20160219/PlamoBuild.kernel_headers-4.1.15_plamoRPi2 2016-02-19 08:30:28.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.9.36_plamoRPi2 2017-07-27 11:36:32.000000000 +0900 @@ -1,224 +1,56 @@ #!/bin/sh -x ###################################################################### -url="https://github.com/raspberry/linux.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20150627-4.1.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.36.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20161217-4.9.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.9.36-20170705-3ecb1db.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.9.36-plamo@LV@" +verify= +digest= +branch[3]=aufs4.9 +commitid[3]=c8baf66 pkgbase=kernel_headers -vers=4.1.15_plamoRPi2 -arch=arm -build=P3 -src=linux +vers=4.9.36_plamo@LV@ +arch=`uname -m` +build=P1 +src=linux-4.9.36 +patchfiles="" OPT_CONFIG="" DOCS="" +template=20170713 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +case `uname -m` in i686) lv=SMP ;; x86_64) lv=64 ;; armv7l) lv=RPi2 ;; esac +url=${url/@LV@/$lv} ; vers=${vers/@LV@/$lv} +case `uname -m` in i686|x86_64) arch=i386 ;; armv7l) arch=arm ;; esac +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; fi ;; - *) if [ ! -f ${i##*/} ] ; then wget $i ; fi ;; - esac - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - case `basename ${i##*/} .git` in - linux) git checkout origin/rpi-4.1.y ; git reset --hard d51c7d8 ;; - aufs4-*) git checkout origin/aufs4.1 ; git reset --hard 2b569cf ;; - esac ) ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - rm -rf .git ; touch .git - patch -Np1 -i $W/vd_unicon-kernel-20150627-4.1.patch + patch -Np1 -i $W/vd_unicon-kernel-20161217-4.9.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -227,22 +59,22 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.1-panic_beep.patch - patch -Np1 -i $W/4.1-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.9-panic_beep.patch + patch -Np1 -i $W/4.9-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 | patch -Np1 -i - + chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - cp -p $W/config-4.1.15-plamoRPi2 .config + if [ `uname -m` == armv7l ] ; then + unxz -c $W/rpi-4.9.36-20170705-3ecb1db.patch.xz | patch -Np1 -i - + chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} + chmod 755 scripts/{knlinfo,mkknlimg} + fi + cp -p $W/config-4.9.36-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -256,12 +88,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,30 +105,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - install -d $docdir/$src - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - touch -t `date '+%m%d0900'` $docdir/$src - convert + install -d $docdir/$src + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/kernel_headers-20170727/PlamoBuild.kernel_headers-4.9.36_plamoRPi2 2017-07-27 11:36:32.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.10.17_plamoRPi2 2017-08-13 17:45:11.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.36.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20161217-4.9.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.17.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170225-4.10.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.9.36-20170705-3ecb1db.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.9.36-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.10.17-20170521-78cfe36.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.10.17-plamo@LV@" verify= digest= -branch[3]=aufs4.9 -commitid[3]=c8baf66 +branch[3]=aufs4.10 +commitid[3]=a19543b pkgbase=kernel_headers -vers=4.9.36_plamo@LV@ +vers=4.10.17_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.9.36 +src=linux-4.10.17 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20161217-4.9.patch + patch -Np1 -i $W/vd_unicon-kernel-20170225-4.10.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -59,17 +59,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.9-panic_beep.patch - patch -Np1 -i $W/4.9-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.10-panic_beep.patch + patch -Np1 -i $W/4.10-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.9.36-20170705-3ecb1db.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.10.17-20170521-78cfe36.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.9.36-plamo$lv .config + cp -p $W/config-4.10.17-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/gcc-20160128/PlamoBuild.gcc-4.8.5 2016-01-28 13:21:21.000000000 +0900 +++ plamo/01_minimum/devel.txz/gcc/PlamoBuild.gcc-4.8.5 2017-04-08 16:50:35.000000000 +0900 @@ -2,12 +2,15 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - https://patchwork.ozlabs.org/patch/342434/mbox" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +verify= +commitid= pkgbase=gcc vers=4.8.5 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="gcc-4.8-filename-output.patch" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -15,214 +18,34 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s extglob nullglob - cd $1 - for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=gcc-4.8-filename-output.patch - for i in $url ; do - if [ ${i##*/} == mbox ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -f ${i##*/} ] ; then - wget $i - fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np0 -i $W/gcc-4.8-filename-output.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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]} \ --libexecdir=/usr/$libdir \ --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ @@ -239,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -291,42 +109,30 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_bindir $gcclibdir/install-tools - strip_bindir $gcclibdir + for i in cc1 lto1 collect2 lto-wrapper ; do + echo "$i" + echo "stripping $i with -p" + strip -p $gcclibdir/$i + done strip_bindir $gcclibdir/plugin strip_libdir $gcclibdir - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links touch -t `date '+%m%d0900'` $gcclibdir{/install-tools,,/plugin} tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | 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 $libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P \ - `cd $P ; find usr/share/locale -name "*.mo" ! -name "libstdc++.*"` + `cd $P ; find usr/share/locale -name *.mo ! -name libstdc++.*` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info \ - ! -name "gfortran.*" ! -name "gccgo.*" | tail -n+2` + ! -name gfortran.* ! -name gccgo.* | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 \ - ! -name "g++.*" ! -name "gfortran.*" ! -name "gccgo.*" | tail -n+2` + ! -name g++.* ! -name gfortran.* ! -name gccgo.* | 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/g++-20160128/PlamoBuild.g++-4.8.5 2016-01-28 13:42:18.000000000 +0900 +++ plamo/01_minimum/devel.txz/g++/PlamoBuild.g++-4.8.5 2017-04-08 16:52:11.000000000 +0900 @@ -2,12 +2,15 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - https://patchwork.ozlabs.org/patch/342434/mbox" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +verify= +commitid= pkgbase=g++ vers=4.8.5 arch=`uname -m` -build=P2 +build=P3 src=gcc-$vers +patchfiles="gcc-4.8-filename-output.patch" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -15,214 +18,34 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s extglob nullglob - cd $1 - for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=gcc-4.8-filename-output.patch - for i in $url ; do - if [ ${i##*/} == mbox ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -f ${i##*/} ] ; then - wget $i - fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np0 -i $W/gcc-4.8-filename-output.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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]} \ --libexecdir=/usr/$libdir \ --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ @@ -239,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,26 +96,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_bindir $gcclibdir - touch -t `date '+%m%d0900'` $gcclibdir - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) + for i in cc1plus ; do + echo "$i" + echo "stripping $i with -p" + strip -p $gcclibdir/$i done - convert + touch -t `date '+%m%d0900'` $gcclibdir + setup_docdir + convert_links install -d $P/usr/share/gdb/auto-load/usr/$libdir mv $P/usr/$libdir/libstdc++.so.*-gdb.py \ $P/usr/share/gdb/auto-load/usr/$libdir @@ -306,13 +112,12 @@ tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/gdb/auto-load/usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/c++ - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name "libstdc++.mo"` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name libstdc++.mo` tar rvpf $pkg.tar -C $P usr/share/gcc-$vers tar rvpf $pkg.tar -C $P usr/share/man/man1/g++.1.gz 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/libc-20161209/PlamoBuild.libc-2.20 2016-12-09 19:36:44.000000000 +0900 +++ plamo/01_minimum/devel.txz/libc/PlamoBuild.libc-2.20 2017-04-05 20:54:55.000000000 +0900 @@ -11,10 +11,12 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8776.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8778.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8779.patch" +verify= +commitid= pkgbase=libc vers=2.20 arch=`uname -m` -build=P5 +build=P6 src=glibc-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch @@ -23,246 +25,39 @@ OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS PROJECTS README" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` - S2[$i]=$W/source`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" +S2=$W/source if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do if [ -d ${S2[$i]} ] ; then rm -rf ${S2[$i]} ; fi ; cp -a ${S[$i]} ${S2[$i]} if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; mkdir ${B[$i]} done - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${S2[$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 + false && apply_patches + cd $S2 + for j in $patchfiles ; do + case ${j##*.} in + gz) gunzip -c $W/$j | patch -Np1 -i - ;; + *) patch -Np1 -i $W/$j ;; + esac done - cp -p localedata/Makefile{,.orig} - cat <<- "EOF" | patch localedata/Makefile - 235a236 - > --no-archive \ - EOF for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${S2[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi cd ${B[$i]} case $arch in i686) @@ -297,12 +92,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -317,38 +107,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 ! -type d` 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 usr/share/info | tail -n+2` @@ -356,6 +116,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/libc-20170405/PlamoBuild.libc-2.20 2017-04-05 20:54:55.000000000 +0900 +++ plamo/01_minimum/devel.txz/libc/PlamoBuild.libc-2.20 2017-11-01 10:39:12.000000000 +0900 @@ -12,11 +12,13 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8778.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/glibc/CVE-2015-8779.patch" verify= +digest= +branch= commitid= pkgbase=libc vers=2.20 arch=`uname -m` -build=P6 +build=P7 src=glibc-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch @@ -25,7 +27,7 @@ OPT_CONFIG="--enable-kernel=2.6.32 --enable-obsolete-rpc" DOCS="BUGS CONFORMANCE COPYING* ChangeLog* INSTALL LICENSES NEWS PROJECTS README" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -108,6 +110,7 @@ -exec touch -t `date '+%m%d0900'` {} \; compress setup_docdir + find $P/$libdir -type l -exec rm {} \; convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 ! -type d` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` --- plamo/01_minimum/devel.txz/old/libc-20171101/PlamoBuild.libc-2.20 2017-11-01 10:39:12.000000000 +0900 +++ plamo/01_minimum/devel.txz/libc/PlamoBuild.libc-2.20 2018-01-08 06:20:02.000000000 +0900 @@ -18,7 +18,7 @@ pkgbase=libc vers=2.20 arch=`uname -m` -build=P7 +build=P8 src=glibc-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch @@ -81,7 +81,8 @@ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ --libexecdir=/usr/$libdir/glibc \ - --build=$arch-pc-linux --target=$arch-pc-linux + --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ + --target=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` fi done fi --- plamo/01_minimum/devel.txz/old/plamobuild-20170430/PlamoBuild.plamobuild-git_20170430 2017-04-30 19:17:46.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20170713 2017-07-13 13:31:09.000000000 +0900 @@ -5,16 +5,17 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/plamobuild/gitlog2changelog" verify= digest= -commitid[0]=81bc770 +branch[0]=master +commitid[0]=ed54465 pkgbase=plamobuild -vers=git_20170430 +vers=git_20170713 arch=noarch build=P1 src=Plamo-src patchfiles="" OPT_CONFIG="" DOCS="ChangeLog" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/devel.txz/old/kernel_headers-20170813/PlamoBuild.kernel_headers-4.10.17_plamoRPi2 2017-08-13 17:45:11.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.11.12_plamo@LV@ 2017-08-29 16:04:51.000000000 +0900 @@ -1,25 +1,27 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.17.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170225-4.10.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.11.12.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170506-4.11.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/aufs/4.11.12-aufs_fix.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/4.11.12-tuxonice_fix.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.10.17-20170521-78cfe36.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.10.17-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.11.12-20170719-d5c0e92.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.11.12-plamo@LV@" verify= digest= -branch[3]=aufs4.10 -commitid[3]=a19543b +branch[3]=aufs4.11.7+ +commitid[3]=71715aa pkgbase=kernel_headers -vers=4.10.17_plamo@LV@ +vers=4.11.12_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.10.17 +src=linux-4.11.12 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +52,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170225-4.10.patch + patch -Np1 -i $W/vd_unicon-kernel-20170506-4.11.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -59,17 +61,19 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.10-panic_beep.patch - patch -Np1 -i $W/4.10-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.11.12-aufs_fix.patch + patch -Np1 -i $W/4.11-panic_beep.patch + patch -Np1 -i $W/4.11-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.11.12-tuxonice_fix.patch chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.10.17-20170521-78cfe36.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.11.12-20170719-d5c0e92.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.10.17-plamo$lv .config + cp -p $W/config-4.11.12-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20170829/PlamoBuild.kernel_headers-4.11.12_plamo@LV@ 2017-08-29 16:04:51.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.12.14_plamo@LV@ 2018-12-01 09:44:00.000000000 +0900 @@ -1,31 +1,29 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.11.12.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170506-4.11.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.12.14.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170708-4.12.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/aufs/4.11.12-aufs_fix.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/4.11.12-tuxonice_fix.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.11.12-20170719-d5c0e92.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.11.12-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.12.14-20170906-6fe4193.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.12.14-plamo@LV@" verify= digest= -branch[3]=aufs4.11.7+ -commitid[3]=71715aa +branch[3]=aufs4.12 +commitid[3]=31266c0 pkgbase=kernel_headers -vers=4.11.12_plamo@LV@ +vers=4.12.14_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.11.12 +src=linux-4.12.14 patchfiles="" OPT_CONFIG="" DOCS="" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -52,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170506-4.11.patch + patch -Np1 -i $W/vd_unicon-kernel-20170708-4.12.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -61,19 +59,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.11.12-aufs_fix.patch - patch -Np1 -i $W/4.11-panic_beep.patch - patch -Np1 -i $W/4.11-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/4.11.12-tuxonice_fix.patch + patch -Np1 -i $W/4.12-panic_beep.patch + patch -Np1 -i $W/4.12-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.11.12-20170719-d5c0e92.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.12.14-20170906-6fe4193.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.11.12-plamo$lv .config + cp -p $W/config-4.12.14-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -106,15 +102,15 @@ -exec rm {} \; touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress install -d $docdir/$src setup_docdir convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/devel.txz/old/kernel_headers-20181201/PlamoBuild.kernel_headers-4.12.14_plamo@LV@ 2018-12-01 09:44:00.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.13.16_plamo@LV@ 2018-12-04 18:03:30.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.12.14.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170708-4.12.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.16.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170909-4.13.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.12.14-20170906-6fe4193.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.12.14-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.13.16-20171117-c9b4367.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.13.16-plamo@LV@" verify= digest= -branch[3]=aufs4.12 -commitid[3]=31266c0 +branch[3]=aufs4.13 +commitid[3]=78cbc7f pkgbase=kernel_headers -vers=4.12.14_plamo@LV@ +vers=4.13.16_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.12.14 +src=linux-4.13.16 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170708-4.12.patch + patch -Np1 -i $W/vd_unicon-kernel-20170909-4.13.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -59,17 +59,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.12-panic_beep.patch - patch -Np1 -i $W/4.12-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.13-panic_beep.patch + patch -Np1 -i $W/4.13-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.12.14-20170906-6fe4193.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.13.16-20170906-c9b4367.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.12.14-plamo$lv .config + cp -p $W/config-4.13.16-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20181204/PlamoBuild.kernel_headers-4.13.16_plamo@LV@ 2018-12-04 18:03:30.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.14.85_plamo@LV@ 2018-12-16 12:14:55.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.16.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170909-4.13.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.85.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20171118-4.14.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.13.16-20171117-c9b4367.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.13.16-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.14.85-20181205-802d877.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.14.85-plamo@LV@" verify= digest= -branch[3]=aufs4.13 -commitid[3]=78cbc7f +branch[3]=aufs4.14.73+ +commitid[3]=df6d0ef pkgbase=kernel_headers -vers=4.13.16_plamo@LV@ +vers=4.14.85_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.13.16 +src=linux-4.14.85 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170909-4.13.patch + patch -Np1 -i $W/vd_unicon-kernel-20171118-4.14.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -59,17 +59,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.13-panic_beep.patch - patch -Np1 -i $W/4.13-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.14-panic_beep.patch + patch -Np1 -i $W/4.14-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.13.16-20170906-c9b4367.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.14.85-20181205-802d877.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.13.16-plamo$lv .config + cp -p $W/config-4.14.85-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20181216/PlamoBuild.kernel_headers-4.14.85_plamo@LV@ 2018-12-16 12:14:55.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.15.18_plamo@LV@ 2018-12-19 09:05:30.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.85.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20171118-4.14.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180203-4.15.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.14.85-20181205-802d877.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.14.85-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.15.18-20180521-1b75d3e.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.15.18-plamo@LV@" verify= digest= -branch[3]=aufs4.14.73+ -commitid[3]=df6d0ef +branch[3]=aufs4.15 +commitid[3]=8289398 pkgbase=kernel_headers -vers=4.14.85_plamo@LV@ +vers=4.15.18_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.14.85 +src=linux-4.15.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20171118-4.14.patch + patch -Np1 -i $W/vd_unicon-kernel-20180203-4.15.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -59,17 +59,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.14-panic_beep.patch - patch -Np1 -i $W/4.14-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.15-panic_beep.patch + patch -Np1 -i $W/4.15-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.14.85-20181205-802d877.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.15.18-20180521-1b75d3e.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.14.85-plamo$lv .config + cp -p $W/config-4.15.18-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20181219/PlamoBuild.kernel_headers-4.15.18_plamo@LV@ 2018-12-19 09:05:30.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.16.18_plamo@LV@ 2018-12-23 20:53:16.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180203-4.15.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180407-4.16.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.15.18-20180521-1b75d3e.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.15.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.16.18-20180614-fd4f278.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.16.18-plamo@LV@" verify= digest= -branch[3]=aufs4.15 -commitid[3]=8289398 +branch[3]=aufs4.16 +commitid[3]=e0f5222 pkgbase=kernel_headers -vers=4.15.18_plamo@LV@ +vers=4.16.18_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.15.18 +src=linux-4.16.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180203-4.15.patch + patch -Np1 -i $W/vd_unicon-kernel-20180407-4.16.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -59,17 +59,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.15-panic_beep.patch - patch -Np1 -i $W/4.15-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.16-panic_beep.patch + patch -Np1 -i $W/4.16-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.15.18-20180521-1b75d3e.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.16.18-20180614-fd4f278.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.15.18-plamo$lv .config + cp -p $W/config-4.16.18-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20181223/PlamoBuild.kernel_headers-4.16.18_plamo@LV@ 2018-12-23 20:53:16.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.17.19_plamo@LV@ 2020-10-23 15:01:24.000000000 +0900 @@ -1,25 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180407-4.16.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.17.19.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180609-4.17.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.16.18-20180614-fd4f278.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.16.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.17.19-20180630-b0b5a34.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.17.19-plamo@LV@" verify= digest= -branch[3]=aufs4.16 -commitid[3]=e0f5222 +branch[4]=aufs4.17 +commitid[4]=4662af5 pkgbase=kernel_headers -vers=4.16.18_plamo@LV@ +vers=4.17.19_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.16.18 +src=linux-4.17.19 patchfiles="" OPT_CONFIG="" DOCS="" @@ -43,6 +44,12 @@ prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources + cat <<- "EOF" | patch aufs4-standalone/aufs4-mmap.patch + 304c304 + < kmem_cache_free(vm_area_cachep, vma); + --- + > vm_area_free(vma); + EOF fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -50,7 +57,8 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180407-4.16.patch + patch -Np1 -i $W/vd_unicon-kernel-20180609-4.17.patch + patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -59,17 +67,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.16-panic_beep.patch - patch -Np1 -i $W/4.16-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.17-panic_beep.patch + patch -Np1 -i $W/4.17-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.16.18-20180614-fd4f278.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.17.19-20180630-b0b5a34.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.16.18-plamo$lv .config + cp -p $W/config-4.17.19-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20201023/PlamoBuild.kernel_headers-4.17.19_plamo@LV@ 2020-10-23 15:01:24.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.18.20_plamo@LV@ 2021-02-18 20:05:14.000000000 +0900 @@ -1,26 +1,27 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.17.19.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180609-4.17.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.18.20.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180818-4.18.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.17.19-20180630-b0b5a34.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.17.19-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/4.18.20-revert-drm-i915-ringbuffer.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.18.20-20181023-d58c595.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.18.20-plamo@LV@" verify= digest= -branch[4]=aufs4.17 -commitid[4]=4662af5 +branch[4]=aufs4.18 +commitid[4]=c0cdacc pkgbase=kernel_headers -vers=4.17.19_plamo@LV@ +vers=4.18.20_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.17.19 +src=linux-4.18.20 patchfiles="" OPT_CONFIG="" DOCS="" @@ -44,12 +45,6 @@ prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources - cat <<- "EOF" | patch aufs4-standalone/aufs4-mmap.patch - 304c304 - < kmem_cache_free(vm_area_cachep, vma); - --- - > vm_area_free(vma); - EOF fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -57,7 +52,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180609-4.17.patch + patch -Np1 -i $W/vd_unicon-kernel-20180818-4.18.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -67,17 +62,18 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.17-panic_beep.patch - patch -Np1 -i $W/4.17-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.18-panic_beep.patch + patch -Np1 -i $W/4.18-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/4.18.20-revert-drm-i915-ringbuffer.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.17.19-20180630-b0b5a34.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.18.20-20181023-d58c595.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.17.19-plamo$lv .config + cp -p $W/config-4.18.20-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20210218/PlamoBuild.kernel_headers-4.18.20_plamo@LV@ 2021-02-18 20:05:14.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.19.127_plamo@LV@ 2021-02-21 13:05:37.000000000 +0900 @@ -1,27 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.18.20.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180818-4.18.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.127.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181027-4.19.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/4.18.20-revert-drm-i915-ringbuffer.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.18.20-20181023-d58c595.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.18.20-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.19.127-20200717-cc39f1c.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.19.127-plamo@LV@" verify= digest= -branch[4]=aufs4.18 -commitid[4]=c0cdacc +branch[4]=aufs4.19.63+ +commitid[4]=1bb4caf pkgbase=kernel_headers -vers=4.18.20_plamo@LV@ +vers=4.19.127_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.18.20 +src=linux-4.19.127 patchfiles="" OPT_CONFIG="" DOCS="" @@ -52,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180818-4.18.patch + patch -Np1 -i $W/vd_unicon-kernel-20181027-4.19.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -62,18 +61,21 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.18-panic_beep.patch - patch -Np1 -i $W/4.18-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.19-panic_beep.patch + patch -Np1 -i $W/4.19-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 | patch -Np1 -i - + cp -p kernel/power/snapshot.c{,.orig} + sed -i 's@indx@index@g' kernel/power/snapshot.c chmod 755 scripts/tuxonice_output_to_csv.sh + rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - patch -Np1 -i $W/4.18.20-revert-drm-i915-ringbuffer.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.18.20-20181023-d58c595.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.19.127-20200717-cc39f1c.patch.xz | patch -Np1 -i - + rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.18.20-plamo$lv .config + cp -p $W/config-4.19.127-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20210221/PlamoBuild.kernel_headers-4.19.127_plamo@LV@ 2021-02-21 13:05:37.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-4.20.17_plamo@LV@ 2021-06-27 16:05:33.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.127.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181027-4.19.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181229-4.20.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.19.127-20200717-cc39f1c.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.19.127-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.20.17-20190923-41f5d37.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.20.17-plamo@LV@" verify= digest= -branch[4]=aufs4.19.63+ -commitid[4]=1bb4caf +branch[4]=aufs4.20.4+ +commitid[4]=51f87f2 pkgbase=kernel_headers -vers=4.19.127_plamo@LV@ +vers=4.20.17_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.19.127 +src=linux-4.20.17 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20181027-4.19.patch + patch -Np1 -i $W/vd_unicon-kernel-20181229-4.20.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -61,21 +61,19 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.19-panic_beep.patch - patch -Np1 -i $W/4.19-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 | patch -Np1 -i - - cp -p kernel/power/snapshot.c{,.orig} - sed -i 's@indx@index@g' kernel/power/snapshot.c + patch -Np1 -i $W/4.20-panic_beep.patch + patch -Np1 -i $W/4.20-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.19.127-20200717-cc39f1c.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.20.17-20190923-41f5d37.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.19.127-plamo$lv .config + cp -p $W/config-4.20.17-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20210627/PlamoBuild.kernel_headers-4.20.17_plamo@LV@ 2021-06-27 16:05:33.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-5.0.21_plamo@LV@ 2021-07-01 11:06:10.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181229-4.20.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190309-5.0.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 - https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 + https://github.com/sfjro/aufs5-standalone.git + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.20.17-20190923-41f5d37.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.20.17-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.0.21-20190923-0222b82.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.0.21-plamo@LV@" verify= digest= -branch[4]=aufs4.20.4+ -commitid[4]=51f87f2 +branch[4]=aufs5.0 +commitid[4]=25f304c pkgbase=kernel_headers -vers=4.20.17_plamo@LV@ +vers=5.0.21_plamo@LV@ arch=`uname -m` build=P1 -src=linux-4.20.17 +src=linux-5.0.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,29 +51,28 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20181229-4.20.patch + patch -Np1 -i $W/vd_unicon-kernel-20190309-5.0.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-mmap.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-standalone.patch - cp -av $W/aufs4-standalone/Documentation . - cp -av $W/aufs4-standalone/fs . - cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.20-panic_beep.patch - patch -Np1 -i $W/4.20-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch + cp -av $W/aufs5-standalone/Documentation . + cp -av $W/aufs5-standalone/fs . + cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux + patch -Np1 -i $W/5.0-panic_beep.patch + patch -Np1 -i $W/5.0-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh - rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.20.17-20190923-41f5d37.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.0.21-20190923-0222b82.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.20.17-plamo$lv .config + cp -p $W/config-5.0.21-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20210701/PlamoBuild.kernel_headers-5.0.21_plamo@LV@ 2021-07-01 11:06:10.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-5.1.21_plamo@LV@ 2021-07-06 09:05:26.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190309-5.0.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190511-5.1.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.0.21-20190923-0222b82.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.0.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.1.21-20190923-29ee73a.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.1.21-plamo@LV@" verify= digest= -branch[4]=aufs5.0 -commitid[4]=25f304c +branch[4]=aufs5.1 +commitid[4]=d051ff3 pkgbase=kernel_headers -vers=5.0.21_plamo@LV@ +vers=5.1.21_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.0.21 +src=linux-5.1.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190309-5.0.patch + patch -Np1 -i $W/vd_unicon-kernel-20190511-5.1.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -61,18 +61,18 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.0-panic_beep.patch - patch -Np1 -i $W/5.0-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.1-panic_beep.patch + patch -Np1 -i $W/5.1-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.0.21-20190923-0222b82.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.1.21-20190923-29ee73a.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.0.21-plamo$lv .config + cp -p $W/config-5.1.21-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20210706/PlamoBuild.kernel_headers-5.1.21_plamo@LV@ 2021-07-06 09:05:26.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-5.2.21_plamo@LV@ 2021-07-13 10:49:59.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190511-5.1.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190713-5.2.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.1.21-20190923-29ee73a.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.1.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.2.21-20191029-94dbfa7.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.2.21-plamo@LV@" verify= digest= -branch[4]=aufs5.1 -commitid[4]=d051ff3 +branch[4]=aufs5.2.5+ +commitid[4]=40a8029 pkgbase=kernel_headers -vers=5.1.21_plamo@LV@ +vers=5.2.21_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.1.21 +src=linux-5.2.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190511-5.1.patch + patch -Np1 -i $W/vd_unicon-kernel-20190713-5.2.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -61,18 +61,18 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.1-panic_beep.patch - patch -Np1 -i $W/5.1-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.2-panic_beep.patch + patch -Np1 -i $W/5.2-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.1.21-20190923-29ee73a.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.2.21-20191029-94dbfa7.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.1.21-plamo$lv .config + cp -p $W/config-5.2.21-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20210713/PlamoBuild.kernel_headers-5.2.21_plamo@LV@ 2021-07-13 10:49:59.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-5.3.18_plamo@LV@ 2021-07-21 13:29:11.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190713-5.2.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.3.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190921-5.3.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.2.21-20191029-94dbfa7.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.2.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.3.18-20191201-32ba05a.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.3.18-plamo@LV@" verify= digest= -branch[4]=aufs5.2.5+ -commitid[4]=40a8029 +branch[4]=aufs5.3.16 +commitid[4]=28e5d4e pkgbase=kernel_headers -vers=5.2.21_plamo@LV@ +vers=5.3.18_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.2.21 +src=linux-5.3.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190713-5.2.patch + patch -Np1 -i $W/vd_unicon-kernel-20190921-5.3.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -61,18 +61,17 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.2-panic_beep.patch - patch -Np1 -i $W/5.2-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.3-panic_beep.patch + patch -Np1 -i $W/5.3-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.2.21-20191029-94dbfa7.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.3.18-20191201-32ba05a.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} - chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.2.21-plamo$lv .config + cp -p $W/config-5.3.18-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/kernel_headers-20210721/PlamoBuild.kernel_headers-5.3.18_plamo@LV@ 2021-07-21 13:29:11.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-5.4.51_plamo@LV@ 2021-07-24 12:01:12.000000000 +0900 @@ -1,26 +1,28 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.3.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190921-5.3.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.51.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20191130-5.4.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.4-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.4-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.3.18-20191201-32ba05a.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.3.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/5.4-mt7615-define-to_rssi-macro.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.4.51-20200715-7d9a391.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/5.4-CLK_BCM2835-RESET_CONTROLLER.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.4.51-plamo@LV@" verify= digest= -branch[4]=aufs5.3.16 -commitid[4]=28e5d4e +branch[4]=aufs5.4.3 +commitid[4]=1d622ad pkgbase=kernel_headers -vers=5.3.18_plamo@LV@ +vers=5.4.51_plamo@LV@ arch=`uname -m` build=P1 -src=linux-5.3.18 +src=linux-5.4.51 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,7 +53,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190921-5.3.patch + patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -61,17 +63,19 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.3-panic_beep.patch - patch -Np1 -i $W/5.3-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.4-panic_beep.patch + patch -Np1 -i $W/5.4-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.3.18-20191201-32ba05a.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - + patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} fi - cp -p $W/config-5.3.18-plamo$lv .config + cp -p $W/config-5.4.51-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -97,7 +101,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make headers_install INSTALL_HDR_PATH=$P/usr + LANG=C make headers_install INSTALL_HDR_PATH=$P/usr fi done find $P/usr/include \( -name ".install" -o -name "..install.cmd" \) \ --- plamo/01_minimum/devel.txz/old/autoconf-20160622/PlamoBuild.autoconf-2.69 2016-06-22 16:17:41.000000000 +0900 +++ plamo/01_minimum/devel.txz/autoconf/PlamoBuild.autoconf-2.69 2017-05-28 07:54:24.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz" +verify= +digest= +commitid= pkgbase=autoconf vers=2.69 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="THANKS NEWS ChangeLog.2 ChangeLog COPYING ChangeLog.3 README AUTHORS COPYINGv3 BUGS ChangeLog.0 ChangeLog.1 TODO COPYING.EXCEPTION INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/autoconf tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/emacs/site-lisp | tail -n+2` @@ -305,6 +81,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/autoconf213-20160622/PlamoBuild.autoconf213-2.13 2016-06-22 19:51:00.000000000 +0900 +++ plamo/01_minimum/devel.txz/autoconf213/PlamoBuild.autoconf213-2.13 2017-05-28 08:58:21.000000000 +0900 @@ -2,250 +2,47 @@ ###################################################################### url="http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz" +verify= +digest= +commitid= pkgbase=autoconf213 vers=2.13 arch=`uname -m` -build=P2 +build=P3 src=autoconf-$vers patchfiles="" OPT_CONFIG="--program-suffix=-2.13" DOCS="ChangeLog AUTHORS COPYING ChangeLog.0 ChangeLog.1 INSTALL NEWS README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile.in{,.orig} sed -i -e 's@$(bindir)@$(DESTDIR)&@g' -e 's@$(infodir)@$(DESTDIR)&@g' \ -e 's@ \($(acdatadir)\)@ $(DESTDIR)\1@g' Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -285,30 +77,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/autoconf tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/automake-20160623/PlamoBuild.automake-1.14.1 2016-06-23 12:56:09.000000000 +0900 +++ plamo/01_minimum/devel.txz/automake/PlamoBuild.automake-1.14.1 2017-05-28 09:07:43.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.xz" +verify= +digest= +commitid= pkgbase=automake vers=1.14.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="THANKS ChangeLog HACKING NEWS AUTHORS README INSTALL COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,30 +69,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/automake/amhello-1.0.tar.gz $docdir/$src mv $docdir/$src/{amhello-1.0.tar.gz,{AUTHORS,README}.gz} $C - mv $docdir/$src/{INSTALL,COPYING,$myname}.gz $C + mv $docdir/$src/{INSTALL,COPYING,$func,$myname,$spec}.gz $C mv $C/{amhello-1.0.tar.gz,{AUTHORS,README}.gz} $docdir/$src - mv $C/{INSTALL,COPYING,$myname}.gz $docdir/$src + mv $C/{INSTALL,COPYING,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/automake-${vers%.*} tar rvpf $pkg.tar -C $P usr/share/aclocal{-${vers%.*},} @@ -309,6 +85,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/binutils-20160623/PlamoBuild.binutils-2.25 2016-06-23 11:32:29.000000000 +0900 +++ plamo/01_minimum/devel.txz/binutils/PlamoBuild.binutils-2.25 2017-05-28 15:20:40.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/devel.txz/binutils/pr16825.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/binutils/pr16825.patch.gz" +verify= +digest= +commitid= pkgbase=binutils vers=2.25 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="pr16825.patch.gz" OPT_CONFIG="--enable-shared" DOCS="ChangeLog COPYING* MAINTAINERS README*" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,30 +72,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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 | tail -n+2` - if [ $arch == x86_64 ] ; then - tar rvpf $pkg.tar -C $P usr/lib/ldscripts - fi + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name lib* | tail -n+2` + tar rvpf $pkg.tar -C $P usr/lib/ldscripts tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` 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` @@ -312,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/bison-20160811/PlamoBuild.bison-3.0.4 2016-08-11 16:10:13.000000000 +0900 +++ plamo/01_minimum/devel.txz/bison/PlamoBuild.bison-3.0.4 2017-05-29 19:53:04.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.xz" +verify= +digest= +commitid= pkgbase=bison vers=3.0.4 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ABOUT-NLS AUTHORS ChangeLog* COPYING INSTALL NEWS PACKAGING README* THANKS TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,30 +70,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/bison/examples $docdir/$src mv $docdir/$src/{examples,{INSTALL,NEWS,PACKAGING,README}.gz} $C - mv $docdir/$src/{README-{alpha,release},THANKS,TODO,$myname}.gz $C + mv $docdir/$src/{README-{alpha,release},THANKS,TODO}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{examples,{INSTALL,NEWS,PACKAGING,README}.gz} $docdir/$src - mv $C/{README-{alpha,release},THANKS,TODO,$myname}.gz $docdir/$src + mv $C/{README-{alpha,release},THANKS,TODO}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -312,6 +90,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/cloog-20160902/PlamoBuild.cloog-0.17.0 2016-09-02 18:30:13.000000000 +0900 +++ plamo/01_minimum/devel.txz/cloog/PlamoBuild.cloog-0.17.0 2017-05-29 19:57:16.000000000 +0900 @@ -2,237 +2,40 @@ ###################################################################### url="http://www.bastoul.net/cloog/pages/download/cloog-0.17.0.tar.gz" +verify= +digest= +commitid= pkgbase=cloog vers=0.17.0 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p isl/Makefile.in{,.orig} cat <<- "EOF" | patch isl/Makefile.in @@ -247,12 +50,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -269,12 +66,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -289,24 +81,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -316,6 +92,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/cvs-20160624/PlamoBuild.cvs-1.11.23 2016-06-24 13:23:07.000000000 +0900 +++ plamo/01_minimum/devel.txz/cvs/PlamoBuild.cvs-1.11.23 2017-05-29 20:00:41.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="http://ftp.gnu.org/non-gnu/cvs/source/stable/1.11.23/cvs-1.11.23.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/devel.txz/cvs/cvs-1.11.23-getline.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/cvs/cvs-1.11.23-getline.patch.gz" +verify= +digest= +commitid= pkgbase=cvs vers=1.11.23 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="cvs-1.11.23-getline.patch.gz" OPT_CONFIG="" DOCS="README AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS TODO BUGS ChangeLog.zoo DEVEL-CVS FAQ HACKING MINOR-BUGS PROJECTS README.VMS TESTS " +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/cvs tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` @@ -308,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/diffutils-20160624/PlamoBuild.diffutils-3.2 2016-06-24 16:11:20.000000000 +0900 +++ plamo/01_minimum/devel.txz/diffutils/PlamoBuild.diffutils-3.2 2017-05-29 20:03:33.000000000 +0900 @@ -2,249 +2,46 @@ ###################################################################### url="http://ftp.gnu.org/gnu/diffutils/diffutils-3.2.tar.xz" +verify= +digest= +commitid= pkgbase=diffutils vers=3.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="TODO INSTALL COPYING ChangeLog-2008 README-release ChangeLog ABOUT-NLS THANKS NEWS README AUTHORS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p lib/stdio.in.h{,.orig} sed -i '/gets is a security hole/d' lib/stdio.in.h for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,24 +73,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/info | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -306,6 +82,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/elfutils-20160624/PlamoBuild.elfutils-0.161 2016-06-24 16:42:29.000000000 +0900 +++ plamo/01_minimum/devel.txz/elfutils/PlamoBuild.elfutils-0.161 2017-05-29 20:07:28.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="https://fedorahosted.org/releases/e/l/elfutils/0.161/elfutils-0.161.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/devel.txz/elfutils/elfutils-portability-0.161.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/devel.txz/elfutils/CVE-2014-9447.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/elfutils/elfutils-portability-0.161.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/elfutils/CVE-2014-9447.patch.gz" +verify= +digest= +commitid= pkgbase=elfutils vers=0.161 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="elfutils-portability-0.161.patch.gz CVE-2014-9447.patch.gz" OPT_CONFIG="--program-prefix=eu-" DOCS="COPYING THANKS NOTES AUTHORS ABOUT-NLS COPYING-GPLV2 NEWS COPYING-LGPLV3 CONTRIBUTING INSTALL TODO README ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,24 +73,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/elfutils - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links touch -t `date '+%m%d0900'` $P/usr/$libdir/elfutils 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 -maxdepth 1 | tail -n+2` @@ -308,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/flex-20160624/PlamoBuild.flex-2.5.35 2016-06-24 17:27:59.000000000 +0900 +++ plamo/01_minimum/devel.txz/flex/PlamoBuild.flex-2.5.35 2017-05-29 23:53:47.000000000 +0900 @@ -1,248 +1,45 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/flex/flex-2.5.35.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/flex/flex-2.5.35-gcc44-1.patch.gz" +url="http://repository.timesys.com/buildsources/f/flex/flex-2.5.35/flex-2.5.35.tar.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/flex/flex-2.5.35-gcc44-1.patch.gz" +verify= +digest= +commitid= pkgbase=flex vers=2.5.35 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="flex-2.5.35-gcc44-1.patch.gz" OPT_CONFIG="" DOCS="README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README-alpha THANKS TODO ONEWS README.cvs" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,24 +78,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -314,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/g++-20170408/PlamoBuild.g++-4.8.5 2017-04-08 16:52:11.000000000 +0900 +++ plamo/01_minimum/devel.txz/g++/PlamoBuild.g++-4.8.5 2017-10-15 19:51:57.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2" verify= +digest= +branch= commitid= pkgbase=g++ vers=4.8.5 arch=`uname -m` -build=P3 +build=P4 src=gcc-$vers -patchfiles="gcc-4.8-filename-output.patch" +patchfiles="" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -18,7 +19,7 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/devel.txz/old/gcc-20170408/PlamoBuild.gcc-4.8.5 2017-04-08 16:50:35.000000000 +0900 +++ plamo/01_minimum/devel.txz/gcc/PlamoBuild.gcc-4.8.5 2017-10-15 19:51:07.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2" verify= +digest= +branch= commitid= pkgbase=gcc vers=4.8.5 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers -patchfiles="gcc-4.8-filename-output.patch" +patchfiles="" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -18,7 +19,7 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/devel.txz/old/gdb-20160702/PlamoBuild.gdb-7.11 2016-07-02 02:43:15.000000000 +0900 +++ plamo/01_minimum/devel.txz/gdb/PlamoBuild.gdb-7.11 2017-05-30 00:20:59.000000000 +0900 @@ -1,247 +1,44 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.xz" +url="http://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.xz" +verify= +digest= +commitid= pkgbase=gdb vers=7.11 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-host-shared --enable-shared --with-system-readline" DOCS="ChangeLog COPYING.LIB README MAINTAINERS COPYING COPYING3.LIB COPYING3 README-maintainer-mode" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,25 +70,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` @@ -309,6 +85,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/gettext-20170227/PlamoBuild.gettext-0.19.7 2017-02-27 20:42:08.000000000 +0900 +++ plamo/01_minimum/devel.txz/gettext/PlamoBuild.gettext-0.19.7 2017-05-29 20:22:39.000000000 +0900 @@ -2,240 +2,41 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gettext/gettext-0.19.7.tar.gz" +verify= +digest= +commitid= pkgbase=gettext vers=0.19.7 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--with-included-glib --with-included-libcroco" DOCS="ChangeLog.0 DEPENDENCIES ChangeLog HACKING README INSTALL AUTHORS README.woe32 THANKS COPYING PACKAGING NEWS" -template=20170204 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p gettext-tools/src/Makefile.in{,.orig} sed -i 's@$(GCJ)@LANG=C &@g' gettext-tools/src/Makefile.in @@ -243,12 +44,6 @@ | sed 's@.*/@@'` for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -265,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -285,48 +75,18 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/{libasprintf,gettext} $docdir/$src mv $docdir/$src/{libasprintf,{ChangeLog.0,DEPENDENCIES,ChangeLog}.gz} $C mv $docdir/$src/{HACKING,README,INSTALL,AUTHORS,README.woe32}.gz $C mv $docdir/$src/{{THANKS,COPYING,PACKAGING,NEWS}.gz,gettext} $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{libasprintf,{ChangeLog.0,DEPENDENCIES,ChangeLog}.gz} $docdir/$src mv $C/{HACKING,README,INSTALL,AUTHORS,README.woe32}.gz $docdir/$src mv $C/{{THANKS,COPYING,PACKAGING,NEWS}.gz,gettext} $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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 -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -342,6 +102,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/gmp-20160705/PlamoBuild.gmp-6.0.0a 2016-07-05 00:38:48.000000000 +0900 +++ plamo/01_minimum/devel.txz/gmp/PlamoBuild.gmp-6.0.0a 2017-05-29 20:27:06.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="https://gmplib.org/download/gmp/gmp-6.0.0a.tar.xz" +verify= +digest= +commitid= pkgbase=gmp vers=6.0.0a arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-6.0.0 patchfiles="" OPT_CONFIG="--enable-cxx" DOCS="INSTALL COPYINGv3 INSTALL.autoconf AUTHORS README COPYING NEWS COPYINGv2 ChangeLog COPYING.LESSERv3" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/include tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` @@ -304,6 +80,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/indent-20160704/PlamoBuild.indent-2.2.10 2016-07-04 10:47:38.000000000 +0900 +++ plamo/01_minimum/devel.txz/indent/PlamoBuild.indent-2.2.10 2017-06-01 10:53:13.000000000 +0900 @@ -1,247 +1,44 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.gnu.org/gnu/indent/indent-2.2.10.tar.gz" +url="http://ftp.gnu.org/gnu/indent/indent-2.2.10.tar.gz" +verify= +digest= +commitid= pkgbase=indent vers=2.2.10 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog ChangeLog-1990 NEWS AUTHORS ChangeLog-1998 ABOUT-NLS COPYING ChangeLog-2001 INSTALL README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,28 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $P/usr/doc/indent/indent.html $docdir/$src - mv $docdir/$src/{indent.html,{README,$myname}.gz} $C - mv $C/{indent.html,{README,$myname}.gz} $docdir/$src + mv $docdir/$src/{indent.html,{README,$func,$myname,$spec}.gz} $C + mv $C/{indent.html,{README,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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/share/locale -name *.mo` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` @@ -307,6 +83,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/intltool-20160704/PlamoBuild.intltool-0.50.2 2016-07-04 07:52:12.000000000 +0900 +++ plamo/01_minimum/devel.txz/intltool/PlamoBuild.intltool-0.50.2 2017-06-01 10:57:11.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="https://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz" +verify= +digest= +commitid= pkgbase=intltool vers=0.50.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS README ChangeLog COPYING NEWS TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/aclocal | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/intltool @@ -302,6 +78,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/kernel_headers-20210724/PlamoBuild.kernel_headers-5.4.51_plamo@LV@ 2021-07-24 12:01:12.000000000 +0900 +++ plamo/01_minimum/devel.txz/kernel_headers/PlamoBuild.kernel_headers-5.4.51_plamo@LV@ 2021-09-22 19:59:13.000000000 +0900 @@ -21,7 +21,7 @@ pkgbase=kernel_headers vers=5.4.51_plamo@LV@ arch=`uname -m` -build=P1 +build=P2 src=linux-5.4.51 patchfiles="" OPT_CONFIG="" @@ -52,30 +52,32 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches - cd $B - patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch - patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch - bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch - cp -av $W/aufs5-standalone/Documentation . - cp -av $W/aufs5-standalone/fs . - cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.4-panic_beep.patch - patch -Np1 -i $W/5.4-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - - chmod 755 scripts/tuxonice_output_to_csv.sh - patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch - if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - - patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch - rm -rf .github - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} - fi - cp -p $W/config-5.4.51-plamo$lv .config + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} + patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch + patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch + bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch + cp -av $W/aufs5-standalone/Documentation . + cp -av $W/aufs5-standalone/fs . + cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux + patch -Np1 -i $W/5.4-panic_beep.patch + patch -Np1 -i $W/5.4-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - + chmod 755 scripts/tuxonice_output_to_csv.sh + patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch + if [ `uname -m` == armv7l ] ; then + unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - + patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch + rm -rf .github + chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} + fi + cp -p $W/config-5.4.51-plamo$lv .config + done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/devel.txz/old/libc-20180108/PlamoBuild.libc-2.20 2018-01-08 06:20:02.000000000 +0900 +++ plamo/01_minimum/devel.txz/libc/PlamoBuild.libc-2.20 2018-04-21 17:04:23.000000000 +0900 @@ -18,7 +18,7 @@ pkgbase=libc vers=2.20 arch=`uname -m` -build=P8 +build=P9 src=glibc-$vers patchfiles="glibc-2.19-fhs-1.patch glibc-2.20-do_ftell_wide-memleak.patch glibc-2.20-getifaddrs_internal-segfault.patch --- plamo/01_minimum/devel.txz/old/libtool-20160705/PlamoBuild.libtool-2.4.6 2016-07-05 00:24:29.000000000 +0900 +++ plamo/01_minimum/devel.txz/libtool/PlamoBuild.libtool-2.4.6 2017-06-01 11:00:24.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz" +verify= +digest= +commitid= pkgbase=libtool vers=2.4.6 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` @@ -307,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/m4-20160705/PlamoBuild.m4-1.4.16 2016-07-05 00:21:32.000000000 +0900 +++ plamo/01_minimum/devel.txz/m4/PlamoBuild.m4-1.4.16 2017-06-01 11:03:30.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.xz" +verify= +digest= +commitid= pkgbase=m4 vers=1.4.16 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="THANKS NEWS ChangeLog COPYING BACKLOG README AUTHORS TODO INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p lib/stdio.in.h{,.orig} sed -i '/gets is a security hole/d' lib/stdio.in.h for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,30 +72,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/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 usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/make-20160704/PlamoBuild.make-4.1 2016-07-04 23:39:43.000000000 +0900 +++ plamo/01_minimum/devel.txz/make/PlamoBuild.make-4.1 2017-06-01 11:08:00.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://ftp.gnu.org/gnu/make/make-4.1.tar.bz2" +verify= +digest= +commitid= pkgbase=make vers=4.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING README README.W32 ABOUT-NLS INSTALL NEWS README.customs README.Amiga README.DOS README.VMS AUTHORS README.OS2" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -304,6 +80,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/mpc-20160705/PlamoBuild.mpc-1.0.2 2016-07-05 00:18:43.000000000 +0900 +++ plamo/01_minimum/devel.txz/mpc/PlamoBuild.mpc-1.0.2 2017-06-01 11:13:05.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/mpc/mpc-1.0.2.tar.gz" +verify= +digest= +commitid= pkgbase=mpc vers=1.0.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING.LESSER NEWS ChangeLog README TODO INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` @@ -302,6 +78,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/mpfr-20160705/PlamoBuild.mpfr-3.1.2 2016-07-05 01:06:51.000000000 +0900 +++ plamo/01_minimum/devel.txz/mpfr/PlamoBuild.mpfr-3.1.2 2017-06-01 11:16:39.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/devel.txz/mpfr/mpfr-3.1.2-upstream_fixes-1.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/mpfr/mpfr-3.1.2-upstream_fixes-1.patch.gz" +verify= +digest= +commitid= pkgbase=mpfr vers=3.1.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="mpfr-3.1.2-upstream_fixes-1.patch.gz" OPT_CONFIG="--enable-thread-safe" DOCS="INSTALL BUGS AUTHORS TODO ChangeLog COPYING.LESSER COPYING README NEWS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,32 +71,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/mpfr/{FAQ.html,examples} $docdir/$src mv $docdir/$src/{FAQ.html,{INSTALL,BUGS,AUTHORS,TODO,ChangeLog}.gz} $C mv $docdir/$src/{COPYING.LESSER.gz,examples,{COPYING,README,NEWS}.gz} $C - mv $docdir/$src/$myname.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{FAQ.html,{INSTALL,BUGS,AUTHORS,TODO,ChangeLog}.gz} $docdir/$src mv $C/{COPYING.LESSER.gz,examples,{COPYING,README,NEWS}.gz} $docdir/$src - mv $C/$myname.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` @@ -312,6 +88,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/onig-20160707/PlamoBuild.onig-5.9.3 2016-07-07 08:36:37.000000000 +0900 +++ plamo/01_minimum/devel.txz/onig/PlamoBuild.onig-5.9.3 2017-06-01 11:21:04.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://download.openpkg.org/components/cache/onig/onig-5.9.3.tar.gz" +verify= +digest= +commitid= pkgbase=onig vers=5.9.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL `echo doc/{RE,API,FAQ,{RE,API,FAQ}.ja}` README.ja README index.html index_ja.html COPYING HISTORY AUTHORS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -303,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/patch-20170601/PlamoBuild.patch-2.7.3 2017-06-01 11:24:04.000000000 +0900 +++ plamo/01_minimum/devel.txz/patch/PlamoBuild.patch-2.7.5 2017-07-23 10:51:00.000000000 +0900 @@ -1,19 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/patch/patch-2.7.3.tar.gz" +url="http://ftp.gnu.org/gnu/patch/patch-2.7.5.tar.gz" verify= digest= +branch= commitid= pkgbase=patch -vers=2.7.3 +vers=2.7.5 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README INSTALL COPYING ChangeLog NEWS ChangeLog-2011 AUTHORS" -template=20170415 +DOCS="README INSTALL COPYING ChangeLog NEWS TODO ChangeLog-2011 AUTHORS" +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/devel.txz/old/pkg_config-20160707/PlamoBuild.pkg_config-0.28 2016-07-07 09:25:55.000000000 +0900 +++ plamo/01_minimum/devel.txz/pkg_config/PlamoBuild.pkg_config-0.28 2017-06-01 11:30:15.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" +verify= +digest= +commitid= pkgbase=pkg_config vers=0.28 arch=`uname -m` -build=P2 +build=P3 src=pkg-config-$vers patchfiles="" OPT_CONFIG="--disable-host-tool --with-internal-glib" DOCS="README.win32 NEWS INSTALL COPYING README AUTHORS ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - if [ ! -f ${i##*/} ] ; then - wget --no-check-certificate $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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,36 +69,19 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/pkg-config/pkg-config-guide.html $docdir/$src mv $docdir/$src/{pkg-config-guide.html,{NEWS,INSTALL,COPYING}.gz} $C - mv $docdir/$src/{README,AUTHORS,ChangeLog,$myname}.gz $C + mv $docdir/$src/{README,AUTHORS,ChangeLog,$func,$myname,$spec}.gz $C mv $C/{pkg-config-guide.html,{NEWS,INSTALL,COPYING}.gz} $docdir/$src - mv $C/{README,AUTHORS,ChangeLog,$myname}.gz $docdir/$src + mv $C/{README,AUTHORS,ChangeLog,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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/share/aclocal | 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 usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/plamobuild-20170713/PlamoBuild.plamobuild-git_20170713 2017-07-13 13:31:09.000000000 +0900 +++ plamo/01_minimum/devel.txz/plamobuild/PlamoBuild.plamobuild-git_20180815 2018-08-15 16:56:35.000000000 +0900 @@ -6,16 +6,16 @@ verify= digest= branch[0]=master -commitid[0]=ed54465 +commitid[0]=ed8dff5 pkgbase=plamobuild -vers=git_20170713 +vers=git_20180815 arch=noarch build=P1 src=Plamo-src patchfiles="" OPT_CONFIG="" DOCS="ChangeLog" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -80,22 +80,22 @@ install -m 644 README $docdir/$src~ touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir mv $docdir/$src~/README $docdir/$src gzip_one $docdir/$src/README mv $docdir/$src/{README,$func,$myname,$spec}.gz $C mv $C/{README,$func,$myname,$spec}.gz $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src + TZ=UTC touch -t `date -u '+%m%d0000'` $docdir/$src convert_links prune_symlink $P/usr/share tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/plamo{,build_functions.sh} 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/devel.txz/old/ppl-20160708/PlamoBuild.ppl-0.12 2016-07-08 08:07:35.000000000 +0900 +++ plamo/01_minimum/devel.txz/ppl/PlamoBuild.ppl-0.12 2017-06-02 08:44:36.000000000 +0900 @@ -1,249 +1,46 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.cs.unipr.it/pub/ppl/releases/0.12/ppl-0.12.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/devel.txz/ppl/0001-GMP-version-5.1.0-and-presumably-later-versions-defi.patch" +url="http://bugseng.com/external/ppl/download/ftp/releases/0.12/ppl-0.12.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/ppl/0001-GMP-version-5.1.0-and-presumably-later-versions-defi.patch" +verify= +digest= +commitid= pkgbase=ppl vers=0.12 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="0001-GMP-version-5.1.0-and-presumably-later-versions-defi.patch" OPT_CONFIG="" DOCS="README.configure README.arm README NEWS README.solaris BUGS STANDARDS CREDITS COPYING ChangeLog README.alpha TODO INSTALL ChangeLog_2001-2008" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,34 +72,18 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/ppl $docdir/$src/doc rm $docdir/$src/doc/{BUGS,COPYING,CREDITS,ChangeLog,NEWS,README*,TODO} touch -t `date '+%m%d0900'` $docdir/$src/doc mv $docdir/$src/{doc,{NEWS,README.solaris,BUGS,STANDARDS,CREDITS}.gz} $C mv $docdir/$src/{COPYING,ChangeLog,README.alpha,TODO,INSTALL}.gz $C - mv $docdir/$src/{ChangeLog_2001-2008,$myname}.gz $C + mv $docdir/$src/{ChangeLog_2001-2008,$func,$myname,$spec}.gz $C mv $C/{doc,{NEWS,README.solaris,BUGS,STANDARDS,CREDITS}.gz} $docdir/$src mv $C/{COPYING,ChangeLog,README.alpha,TODO,INSTALL}.gz $docdir/$src - mv $C/{ChangeLog_2001-2008,$myname}.gz $docdir/$src + mv $C/{ChangeLog_2001-2008,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -318,6 +94,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/pth-20160707/PlamoBuild.pth-2.0.7 2016-07-07 13:05:29.000000000 +0900 +++ plamo/01_minimum/devel.txz/pth/PlamoBuild.pth-2.0.7 2017-06-01 11:41:32.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz" +verify= +digest= +commitid= pkgbase=pth vers=2.0.7 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ANNOUNCE AUTHORS COPYING ChangeLog HACKING HISTORY INSTALL NEWS PORTING README SUPPORT TESTS THANKS USERS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,25 +70,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -307,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/slang-20160707/PlamoBuild.slang-2.2.4 2016-07-07 14:22:25.000000000 +0900 +++ plamo/01_minimum/devel.txz/slang/PlamoBuild.slang-2.2.4 2017-06-02 09:51:30.000000000 +0900 @@ -1,247 +1,44 @@ #!/bin/sh ###################################################################### -url="ftp://space.mit.edu/pub/davis/slang/v2.2/slang-2.2.4.tar.bz2" +url="http://ftp.lyx.org/pub/unix/news/readers/slrn/slang/v2.2/slang-2.2.4.tar.bz2" +verify= +digest= +commitid= pkgbase=slang vers=2.2.4 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL.pc NEWS COPYING changes.txt INSTALL.unx README UPGRADE.txt INSTALL.vms" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,31 +72,17 @@ compress strip_libdir $P/usr/$libdir/slang/v2/modules touch -t `date '+%m%d0900'` $P/usr/$libdir/slang/v2/modules - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/slsh $docdir/$src mv $docdir/slang $docdir/$src/doc rm $docdir/$src/doc/v2/COPYING touch -t `date '+%m%d0900'` $docdir/$src/doc/v2 - mv $docdir/$src/{slsh,doc,{README,UPGRADE.txt,INSTALL.vms,$myname}.gz} $C - mv $C/{slsh,doc,{README,UPGRADE.txt,INSTALL.vms,$myname}.gz} $docdir/$src + mv $docdir/$src/{slsh,doc,{README,UPGRADE.txt,INSTALL.vms}.gz} $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C + mv $C/{slsh,doc,{README,UPGRADE.txt,INSTALL.vms}.gz} $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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 "libslang.*"` tar rvpf $pkg.tar -C $P usr/$libdir/slang @@ -317,6 +95,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/strace-20160707/PlamoBuild.strace-4.6 2016-07-07 16:12:39.000000000 +0900 +++ plamo/01_minimum/devel.txz/strace/PlamoBuild.strace-4.6 2017-06-01 11:53:29.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://downloads.sourceforge.net/strace/strace-4.6.tar.xz" +verify= +digest= +commitid= pkgbase=strace vers=4.6 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README-svr4 README-sunos4 README-linux README-freebsd PORTING CREDITS COPYRIGHT ChangeLog-CVS ChangeLog TODO NEWS INSTALL AUTHORS README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,29 +71,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/devel.txz/old/yasm-20160707/PlamoBuild.yasm-1.3.0 2016-07-07 16:25:19.000000000 +0900 +++ plamo/01_minimum/devel.txz/yasm/PlamoBuild.yasm-1.3.0 2017-06-01 11:57:35.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" +verify= +digest= +commitid= pkgbase=yasm vers=1.3.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL NEWS GNU_LGPL-2.0 ChangeLog AUTHORS README COPYING GNU_GPL-2.0 BSD.txt Artistic.txt ABOUT-NLS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` @@ -304,6 +80,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/emacs_bin-20170606/PlamoBuild.emacs_bin-24.5 2017-06-06 11:41:56.000000000 +0900 +++ plamo/01_minimum/emacs_bin/PlamoBuild.emacs_bin-24.5 2018-08-17 10:54:39.000000000 +0900 @@ -4,16 +4,17 @@ url="http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz" verify= digest= +branch= commitid= pkgbase=emacs_bin vers=24.5 arch=`uname -m` -build=P4 +build=P5 src=emacs-$vers patchfiles="" OPT_CONFIG="--without-all --without-x" DOCS="README INSTALL COPYING BUGS ChangeLog" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -67,17 +68,17 @@ rm $P/usr/bin/emacs{-$vers,} touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_bindir $P/usr/libexec/emacs/$vers/* - touch -t `date '+%m%d0900'` $P/usr/libexec/emacs/$vers/* + TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/libexec/emacs/$vers/* setup_docdir convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/libexec/emacs tar rvpf $pkg.tar -C $P usr/share/doc/$src - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/old/emacs_lib-20170606/PlamoBuild.emacs_lib-24.5 2017-06-06 20:12:07.000000000 +0900 +++ plamo/01_minimum/emacs_lib/PlamoBuild.emacs_lib-24.5 2018-08-17 10:39:31.000000000 +0900 @@ -5,16 +5,17 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/emacs_lib/wb-line-number.el" verify= digest= +branch= commitid= pkgbase=emacs_lib vers=24.5 arch=noarch -build=P4 +build=P5 src=emacs-$vers patchfiles="" OPT_CONFIG="--without-all --without-x" DOCS="README INSTALL COPYING BUGS ChangeLog" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -81,15 +82,15 @@ install -m 644 $W/wb-line-number.el $P/usr/share/emacs/site-lisp touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links tar cvpf $pkg.tar -C $P usr/share/emacs tar rvpf $pkg.tar -C $P var/games/emacs tar rvpf $pkg.tar -C $P usr/share/doc/$src - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/old/emacs_mini-20170606/PlamoBuild.emacs_mini-24.5 2017-06-06 11:49:09.000000000 +0900 +++ plamo/01_minimum/emacs_mini/PlamoBuild.emacs_mini-24.5 2018-08-17 10:50:31.000000000 +0900 @@ -4,16 +4,17 @@ url="http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz" verify= digest= +branch= commitid= pkgbase=emacs_mini vers=24.5 arch=`uname -m` -build=P4 +build=P5 src=emacs-$vers patchfiles="" OPT_CONFIG="--without-all --without-x" DOCS="README INSTALL COPYING BUGS ChangeLog" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -67,10 +68,11 @@ rm $P/usr/bin/{{e,c}tags,emacsclient,ebrowse,grep-changelog,emacs} mv $P/usr/bin/emacs{,_mini}-$vers ln -s emacs_mini-$vers $P/usr/bin/emacs_mini + ln -s emacs_mini-$vers $P/usr/bin/emacs touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -79,7 +81,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/old/expat-20170105/PlamoBuild.expat-2.1.1 2017-01-05 17:07:59.000000000 +0900 +++ plamo/01_minimum/expat/PlamoBuild.expat-2.1.1 2017-06-07 12:01:49.000000000 +0900 @@ -5,248 +5,43 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/expat/CVE-2015-1283-refix.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/expat/CVE-2016-0718-v2-2-1.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/expat/cve-2012-6702-plus-cve-2016-5300-v1.patch.gz" +verify= +digest= +commitid= pkgbase=expat vers=2.1.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="CVE-2015-1283-refix.patch.gz CVE-2016-0718-v2-2-1.patch.gz cve-2012-6702-plus-cve-2016-5300-v1.patch.gz" OPT_CONFIG="" DOCS="COPYING MANIFEST README Changes CMake.README" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -283,38 +73,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -324,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/fortune_mod-20170606/PlamoBuild.fortune_mod-1.99.1 2017-06-06 12:58:41.000000000 +0900 +++ plamo/01_minimum/fortune_mod/PlamoBuild.fortune_mod-1.99.1 2017-06-24 15:03:52.000000000 +0900 @@ -39,7 +39,7 @@ apply_patches cd $B patch -Np0 -i $W/01_all_fortune_all-fix.patch - cp -p Makefile Makefile.orig + cp -p 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' \ --- plamo/01_minimum/old/gc-20160712/PlamoBuild.gc-7.1 2016-07-12 13:18:56.000000000 +0900 +++ plamo/01_minimum/gc/PlamoBuild.gc-7.1 2017-06-06 13:02:29.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://www.hboehm.info/gc/gc_source/gc-7.1.tar.gz" +verify= +digest= +commitid= pkgbase=gc vers=7.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog README.QUICK" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` @@ -303,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/gdbm-20160903/PlamoBuild.gdbm-1.10 2016-09-03 23:08:19.000000000 +0900 +++ plamo/01_minimum/gdbm/PlamoBuild.gdbm-1.10 2017-06-06 13:06:17.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gdbm/gdbm-1.10.tar.gz" +verify= +digest= +commitid= pkgbase=gdbm vers=1.10 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-libgdbm-compat" DOCS="NEWS README THANKS AUTHORS INSTALL ABOUT-NLS ChangeLog COPYING NOTE-WARNING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -306,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/get_pkginfo-20170324/PlamoBuild.get_pkginfo-git_20160222 2017-03-24 22:19:42.000000000 +0900 +++ plamo/01_minimum/get_pkginfo/PlamoBuild.get_pkginfo-git_20160222 2017-06-06 13:11:20.000000000 +0900 @@ -3,16 +3,17 @@ ###################################################################### url="https://github.com/plamolinux/get_pkginfo.git" verify= +digest= commitid=facec2d pkgbase=get_pkginfo vers=git_20160222 arch=noarch -build=P3 +build=P4 src=$pkgbase patchfiles="" OPT_CONFIG="" DOCS="ChangeLog" -template=20170323 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/gnupg_tls.txz/old/gnutls-20160719/PlamoBuild.gnutls-2.12.23 2016-07-19 22:27:14.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/gnutls/PlamoBuild.gnutls-3.5.5 2016-10-27 12:45:03.000000000 +0900 @@ -1,23 +1,18 @@ #!/bin/sh ###################################################################### -url="http://mirrors.dotsrc.org/gnupg/gnutls/v2.12/gnutls-2.12.23.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/gnutls/cve-2014-1959.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/gnutls/cve-2014-0092.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/gnutls/cve-2014-3466.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/gnutls/CVE-2015-0294.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/gnutls/CVE-2015-0282.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/gnutls/Fix-build-with-perl-5.18.patch" +url="http://mirrors.dotsrc.org/gnupg/gnutls/v3.5/gnutls-3.5.5.tar.xz" pkgbase=gnutls -vers=2.12.23 +vers=3.5.5 arch=`uname -m` -build=P6 +build=P1 src=$pkgbase-$vers -patchfiles="`echo cve-2014-{1959,0092,3466}.patch.gz` - `echo CVE-2015-{0294,0282}.patch.gz`" -OPT_CONFIG="--with-libgcrypt --without-p11-kit" -DOCS="THANKS ChangeLog COPYING INSTALL AUTHORS TODO ABOUT-NLS NEWS - README" +patchfiles="" +OPT_CONFIG="--disable-guile --without-p11-kit" +DOCS="LICENSE ABOUT-NLS NEWS INSTALL AUTHORS README.md THANKS + ChangeLog INSTALL.md CONTRIBUTING.md" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -241,7 +236,6 @@ esac done done - patch -Np0 -i $W/Fix-build-with-perl-5.18.patch for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -297,9 +291,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/gnupg_tls.txz/old/gnupg-20160714/PlamoBuild.gnupg-2.0.29 2016-07-14 22:53:35.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/gnupg/PlamoBuild.gnupg-2.0.30 2016-09-04 23:16:19.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.0.29.tar.bz2" +url="https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.0.30.tar.bz2" pkgbase=gnupg -vers=2.0.29 +vers=2.0.30 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -273,6 +273,7 @@ make install DESTDIR=$P fi done + ln -s gpg2 $P/usr/bin/gpg touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -312,6 +313,7 @@ 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/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 read -p "Do you want to keep work files? [y/N] " ans --- plamo/01_minimum/gnupg_tls.txz/old/gnutls-20161027/PlamoBuild.gnutls-3.5.5 2016-10-27 12:45:03.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/gnutls/PlamoBuild.gnutls-3.5.5 2016-10-28 10:04:16.000000000 +0900 @@ -1,14 +1,24 @@ #!/bin/sh ###################################################################### -url="http://mirrors.dotsrc.org/gnupg/gnutls/v3.5/gnutls-3.5.5.tar.xz" +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" pkgbase=gnutls vers=3.5.5 arch=`uname -m` -build=P1 -src=$pkgbase-$vers -patchfiles="" -OPT_CONFIG="--disable-guile --without-p11-kit" +build=P2 +src[0]=$pkgbase-$vers +src[1]=$pkgbase-2.12.23 +patchfiles[0]="" +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=20161020 @@ -272,7 +282,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 --- plamo/01_minimum/gnupg_tls.txz/old/libgcrypt-20160715/PlamoBuild.libgcrypt-1.5.4 2016-07-15 10:26:39.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/libgcrypt/PlamoBuild.libgcrypt-1.5.6 2016-09-06 14:56:54.000000000 +0900 @@ -1,20 +1,19 @@ #!/bin/sh ###################################################################### -url="https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.5.4.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2014-3591.patch.gz +url="https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.5.6.tar.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-1.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-2.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-3.patch.gz" pkgbase=libgcrypt -vers=1.5.4 +vers=1.5.6 arch=`uname -m` -build=P3 +build=P2 src=$pkgbase-$vers -patchfiles="`echo CVE-{2014-3591,2015-0837-{1,2,3}}.patch.gz`" +patchfiles="`echo CVE-2015-0837-{1,2,3}.patch.gz`" OPT_CONFIG="--with-capabilities" -DOCS="NEWS INSTALL COPYING COPYING.LIB AUTHORS ChangeLog THANKS - README.GIT README ChangeLog-2011 TODO" +DOCS="README ChangeLog-2011 COPYING ChangeLog TODO NEWS README.GIT + COPYING.LIB THANKS AUTHORS INSTALL" ###################################################################### fscheck() { --- plamo/01_minimum/gnupg_tls.txz/old/libtasn1-20160715/PlamoBuild.libtasn1-2.14 2016-07-15 11:31:04.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/libtasn1/PlamoBuild.libtasn1-4.9 2016-10-26 11:19:08.000000000 +0900 @@ -1,19 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.14.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls/libtasn1/CVE-2014-3467.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls/libtasn1/CVE-2014-3468.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls/libtasn1/CVE-2014-3469.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls/libtasn1/CVE-2015-2806.patch.gz" +url="http://ftp.gnu.org/gnu/libtasn1/libtasn1-4.9.tar.gz" pkgbase=libtasn1 -vers=2.14 +vers=4.9 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers -patchfiles="`echo CVE-2014-346{7,8,9}.patch.gz` CVE-2015-2806.patch.gz" +patchfiles="" OPT_CONFIG="" -DOCS="ChangeLog COPYING.LIB INSTALL THANKS README COPYING AUTHORS NEWS" +DOCS="COPYING.LIB COPYING NEWS INSTALL AUTHORS THANKS ChangeLog README" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -292,9 +290,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/gnupg_tls.txz/old/gnupg-20160904/PlamoBuild.gnupg-2.0.30 2016-09-04 23:16:19.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/gnupg/PlamoBuild.gnupg-2.0.30 2017-06-06 13:22:42.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.0.30.tar.bz2" +verify= +digest= +commitid= pkgbase=gnupg vers=2.0.30 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-gpgtar" DOCS="ABOUT-NLS README ChangeLog-2011 COPYING ChangeLog TODO NEWS README.GIT COPYING.LIB THANKS AUTHORS INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,30 +72,14 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_bindir $P/usr/libexec - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/gnupg $docdir/$src/doc rm $docdir/$src/doc/README touch -t `date '+%m%d0900'` $docdir/$src/doc - mv $docdir/$src/{doc,{THANKS,AUTHORS,INSTALL,$myname}.gz} $C - mv $C/{doc,{THANKS,AUTHORS,INSTALL,$myname}.gz} $docdir/$src + mv $docdir/$src/{doc,{THANKS,AUTHORS,INSTALL,$func,$myname,$spec}.gz} $C + mv $C/{doc,{THANKS,AUTHORS,INSTALL,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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/sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/libexec | tail -n+2` @@ -316,6 +92,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/gnutls-20161028/PlamoBuild.gnutls-3.5.5 2016-10-28 10:04:16.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/gnutls/PlamoBuild.gnutls-3.5.5 2017-06-06 13:32:40.000000000 +0900 @@ -8,252 +8,47 @@ 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=gnutls vers=3.5.5 arch=`uname -m` -build=P2 +build=P3 src[0]=$pkgbase-$vers src[1]=$pkgbase-2.12.23 -patchfiles[0]="" +patchfiles="" 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=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -270,12 +65,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -294,38 +84,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -338,6 +98,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/gpgme-20160715/PlamoBuild.gpgme-1.4.3 2016-07-15 10:48:32.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/gpgme/PlamoBuild.gpgme-1.4.3 2017-06-06 13:44:18.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.4.3.tar.bz2" +verify= +digest= +commitid= pkgbase=gpgme vers=1.4.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-fd-passing --with-gpg=/usr/bin/gpg2" DOCS="COPYING.LESSER NEWS README ChangeLog-2011 ChangeLog INSTALL TODO AUTHORS THANKS COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -306,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/libassuan-20160715/PlamoBuild.libassuan-2.0.3 2016-07-15 10:10:54.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/libassuan/PlamoBuild.libassuan-2.0.3 2017-06-06 14:00:38.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-2.0.3.tar.bz2" +verify= +digest= +commitid= pkgbase=libassuan vers=2.0.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS README COPYING.LIB ChangeLog-2011 ChangeLog INSTALL TODO AUTHORS THANKS COPYING README.GIT" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/libgcrypt-20160906/PlamoBuild.libgcrypt-1.5.6 2016-09-06 14:56:54.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/libgcrypt/PlamoBuild.libgcrypt-1.5.6 2017-06-06 14:04:17.000000000 +0900 @@ -2,249 +2,46 @@ ###################################################################### url="https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.5.6.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-1.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-2.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-3.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-2.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/gnupg_tls.txz/libgcrypt/CVE-2015-0837-3.patch.gz" +verify= +digest= +commitid= pkgbase=libgcrypt vers=1.5.6 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="`echo CVE-2015-0837-{1,2,3}.patch.gz`" OPT_CONFIG="--with-capabilities" DOCS="README ChangeLog-2011 COPYING ChangeLog TODO NEWS README.GIT COPYING.LIB THANKS AUTHORS INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,24 +73,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -308,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/libgpg_error-20160715/PlamoBuild.libgpg_error-1.17 2016-07-15 10:43:56.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/libgpg_error/PlamoBuild.libgpg_error-1.17 2017-06-06 14:10:41.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.17.tar.bz2" +verify= +digest= +commitid= pkgbase=libgpg_error vers=1.17 arch=`uname -m` -build=P2 +build=P3 src=libgpg-error-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS INSTALL ABOUT-NLS COPYING COPYING.LIB AUTHORS ChangeLog THANKS README ChangeLog-2011" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -308,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/libksba-20160715/PlamoBuild.libksba-1.3.2 2016-07-15 11:06:45.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/libksba/PlamoBuild.libksba-1.3.2 2017-06-06 14:16:03.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="https://www.gnupg.org/ftp/gcrypt/libksba/libksba-1.3.2.tar.bz2" +verify= +digest= +commitid= pkgbase=libksba vers=1.3.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS COPYING.GPLv2 INSTALL COPYING COPYING.GPLv3 COPYING.LGPLv3 AUTHORS ChangeLog THANKS README ChangeLog-2011 TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/libtasn1-20161026/PlamoBuild.libtasn1-4.9 2016-10-26 11:19:08.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/libtasn1/PlamoBuild.libtasn1-4.9 2017-06-06 14:22:32.000000000 +0900 @@ -2,247 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/libtasn1/libtasn1-4.9.tar.gz" +verify= +digest= +commitid= pkgbase=libtasn1 vers=4.9 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING.LIB COPYING NEWS INSTALL AUTHORS THANKS ChangeLog README" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -322,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/nettle-20161026/PlamoBuild.nettle-3.3 2016-10-26 11:01:21.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/nettle/PlamoBuild.nettle-3.3 2017-06-06 14:26:23.000000000 +0900 @@ -2,248 +2,43 @@ ###################################################################### url="https://ftp.gnu.org/gnu/nettle/nettle-3.3.tar.gz" +verify= +digest= +commitid= pkgbase=nettle vers=3.3 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="TODO nettle.html descore.README COPYINGv3 README INSTALL COPYING.LESSERv3 nettle.pdf COPYINGv2 NEWS AUTHORS ChangeLog" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -321,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/gnupg_tls.txz/old/pinentry-20160716/PlamoBuild.pinentry-0.9.0 2016-07-16 10:17:20.000000000 +0900 +++ plamo/01_minimum/gnupg_tls.txz/pinentry/PlamoBuild.pinentry-0.9.0 2017-06-06 14:30:04.000000000 +0900 @@ -2,238 +2,41 @@ ###################################################################### url="https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-0.9.0.tar.bz2" +verify= +digest= +commitid= pkgbase=pinentry vers=0.9.0 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS INSTALL ChangeLog-old COPYING AUTHORS ChangeLog THANKS README.GIT README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p configure{,.orig} cat <<- "EOF" | patch configure @@ -247,12 +50,6 @@ qt4/{pinentrydialog,qsecurelineedit,pinentryconfirm}.moc for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -269,12 +66,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -289,30 +81,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/info | 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/gpm-20170205/PlamoBuild.gpm-1.20.7 2018-02-05 15:12:35.000000000 +0900 +++ plamo/01_minimum/gpm/PlamoBuild.gpm-1.20.7 2018-04-23 17:31:55.000000000 +0900 @@ -9,7 +9,7 @@ pkgbase=gpm vers=1.20.7 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -51,7 +51,8 @@ if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + CFLAGS="-g -O2 -fPIC" fi done fi --- plamo/01_minimum/old/hddtemp-20160717/PlamoBuild.hddtemp-0.3_beta15 2016-07-17 00:47:06.000000000 +0900 +++ plamo/01_minimum/hddtemp/PlamoBuild.hddtemp-0.3_beta15 2017-06-11 10:35:48.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="http://download.savannah.gnu.org/releases/hddtemp/hddtemp-0.3-beta15.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/hddtemp/hddtemp-0.3-beta15-reg-eip.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/hddtemp/hddtemp-0.3-beta15-reg-eip.patch.gz http://download.savannah.gnu.org/releases/hddtemp/hddtemp.db" +verify= +digest= +commitid= pkgbase=hddtemp vers=0.3_beta15 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-0.3-beta15 patchfiles="hddtemp-0.3-beta15-reg-eip.patch.gz" OPT_CONFIG="" DOCS="README COPYING ABOUT-NLS AUTHORS TODO INSTALL ChangeLog LICENSE GPL-2 NEWS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -283,24 +75,8 @@ install -d $P/usr/share/misc cp -p $W/hddtemp.db $P/usr/share/misc chown root.root $P/usr/share/misc/hddtemp.db - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` 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/misc | tail -n+2` @@ -308,6 +84,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/hdparm-20160717/PlamoBuild.hdparm-9.38 2016-07-17 01:28:48.000000000 +0900 +++ plamo/01_minimum/hdparm/PlamoBuild.hdparm-9.38 2017-06-11 10:45:26.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/hdparm/hdparm-9.38.tar.gz" +verify= +digest= +commitid= pkgbase=hdparm vers=9.38 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="TODO README.acoustic LICENSE.TXT Changelog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/keyutils-20160801/PlamoBuild.keyutils-1.5.1 2016-08-01 17:17:50.000000000 +0900 +++ plamo/01_minimum/keyutils/PlamoBuild.keyutils-1.5.1 2017-06-12 19:01:27.000000000 +0900 @@ -2,249 +2,47 @@ ###################################################################### url="http://people.redhat.com/dhowells/keyutils/keyutils-1.5.1.tar.bz2" +verify= +digest= +commitid= pkgbase=keyutils vers=1.5.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="LICENCE.GPL LICENCE.LGPL README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches + cd $B if [ $arch != i686 -a $arch != x86_64 ] ; then cp -p Makefile{,.orig} sed -i '/m\(32\|64\)/s@^@#@' Makefile fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,24 +74,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find 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 $libdir | tail -n+2` @@ -314,6 +91,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/libelf-20170611/PlamoBuild.libelf-0.8.13 2017-06-11 10:53:13.000000000 +0900 +++ plamo/01_minimum/libelf/PlamoBuild.libelf-0.8.13 2018-12-07 20:23:39.000000000 +0900 @@ -4,16 +4,17 @@ url="http://www.mr511.de/software/libelf-0.8.13.tar.gz" verify= digest= +branch= commitid= pkgbase=libelf vers=0.8.13 arch=`uname -m` -build=P4 +build=P6 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="MANIFEST INSTALL README ChangeLog COPYING.LIB" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -64,10 +65,11 @@ make install instroot=$P fi done + rm $P/usr/$libdir/libelf.so touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -77,7 +79,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/old/libieee1284-20160717/PlamoBuild.libieee1284-0.2.11 2016-07-17 04:42:50.000000000 +0900 +++ plamo/01_minimum/libieee1284/PlamoBuild.libieee1284-0.2.11 2017-06-11 11:07:57.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://downloads.sourceforge.net/libieee1284/libieee1284-0.2.11.tar.bz2" +verify= +digest= +commitid= pkgbase=libieee1284 vers=0.2.11 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS TODO README.FreeBSD README.OpenBSD README.Solaris README.win95 README.winNT README.VC6" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/python*/site-packages - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 -type f` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -306,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/libusb-20160717/PlamoBuild.libusb-1.0.20 2016-07-17 04:59:41.000000000 +0900 +++ plamo/01_minimum/libusb/PlamoBuild.libusb-1.0.20 2017-06-11 11:13:13.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/libusb/libusb-1.0.20.tar.bz2" +verify= +digest= +commitid= pkgbase=libusb vers=1.0.20 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog README PORTING AUTHORS INSTALL NEWS TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/libusb-${vers%.*} @@ -302,6 +78,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/libusb_compat-20160717/PlamoBuild.libusb_compat-0.1.3 2016-07-17 05:11:41.000000000 +0900 +++ plamo/01_minimum/libusb_compat/PlamoBuild.libusb_compat-0.1.3 2017-06-11 11:17:50.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/libusb/libusb-compat-0.1.3.tar.bz2" +verify= +digest= +commitid= pkgbase=libusb_compat vers=0.1.3 arch=`uname -m` -build=P2 +build=P3 src=libusb-compat-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog README NEWS INSTALL LICENSE AUTHORS COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -303,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/libxml2-20160717/PlamoBuild.libxml2-2.9.4 2016-07-17 10:41:32.000000000 +0900 +++ plamo/01_minimum/libxml2/PlamoBuild.libxml2-2.9.4 2017-06-11 11:25:31.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz" +verify= +digest= +commitid= pkgbase=libxml2 vers=2.9.4 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--with-history" DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO Copyright TODO_SCHEMAS README.tests" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,32 +72,16 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/python*/site-packages - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libxml2/examples $docdir/$src mv $docdir/libxml2/html $docdir/$src/doc mv $docdir/libxml2-python-$vers $docdir/$src/python mv $docdir/$src/{examples,{Copyright,TODO_SCHEMAS,README.tests}.gz} $C - mv $docdir/$src/{doc,python,$myname.gz} $C + mv $docdir/$src/{doc,python,{$func,$myname,$spec}.gz} $C mv $C/{examples,{Copyright,TODO_SCHEMAS,README.tests}.gz} $docdir/$src - mv $C/{doc,python,$myname.gz} $docdir/$src + mv $C/{doc,python,{$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + 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 -maxdepth 1 -name libxml2.*` @@ -323,6 +99,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/libzip-20160717/PlamoBuild.libzip-0.11.2 2016-07-17 10:58:19.000000000 +0900 +++ plamo/01_minimum/libzip/PlamoBuild.libzip-0.11.2 2017-06-11 11:42:55.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://www.nih.at/libzip/libzip-0.11.2.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/libzip/CVE-2015-2331.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/libzip/CVE-2015-2331.patch.gz" +verify= +digest= +commitid= pkgbase=libzip vers=0.11.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="CVE-2015-2331.patch.gz" OPT_CONFIG="" DOCS="AUTHORS INSTALL NEWS README THANKS TODO API-CHANGES LICENSE" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 -maxdepth 1 -name libzip.*` tar rvpf $pkg.tar -C $P usr/$libdir/libzip @@ -307,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/lm_sensors-20160717/PlamoBuild.lm_sensors-3.3.1 2016-07-17 12:47:31.000000000 +0900 +++ plamo/01_minimum/lm_sensors/PlamoBuild.lm_sensors-3.3.1 2017-06-11 11:48:51.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://repository.timesys.com/buildsources/l/lm_sensors/lm_sensors-3.3.1/lm_sensors-3.3.1.tar.bz2" +verify= +digest= +commitid= pkgbase=lm_sensors vers=3.3.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README INSTALL COPYING COPYING.LGPL CONTRIBUTORS CHANGES" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- "EOF" >> $P/install/doinst.sh mv etc/sensors3.conf.new /tmp @@ -321,6 +97,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/lshw-20160717/PlamoBuild.lshw-B.02.16 2016-07-17 14:50:03.000000000 +0900 +++ plamo/01_minimum/lshw/PlamoBuild.lshw-B.02.16 2017-06-11 20:54:58.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://ezix.org/software/files/lshw-B.02.16.tar.gz" +verify= +digest= +commitid= pkgbase=lshw vers=B.02.16 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README `echo docs/{TODO,IODC.txt,Changelog,proc_usb_info.txt}` COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -300,24 +92,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/lshw tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -326,6 +102,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/lsof-20160717/PlamoBuild.lsof-4.81.dfsg.1 2016-07-17 19:19:03.000000000 +0900 +++ plamo/01_minimum/lsof/PlamoBuild.lsof-4.81.dfsg.1 2017-06-11 21:01:54.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.uni-erlangen.de/ubuntu/pool/main/l/lsof/lsof_4.81.dfsg.1.orig.tar.gz" +verify= +digest= +commitid= pkgbase=lsof vers=4.81.dfsg.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="00*" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,29 +74,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/lv-20160717/PlamoBuild.lv-451 2016-07-17 21:42:10.000000000 +0900 +++ plamo/01_minimum/lv/PlamoBuild.lv-451 2017-06-11 21:12:19.000000000 +0900 @@ -2,237 +2,41 @@ ###################################################################### url="http://pkgs.fedoraproject.org/repo/pkgs/lv/lv451.tar.gz/85b70ae797f935741ec9a1cbe92f00e9/lv451.tar.gz" +verify= +digest= +commitid= pkgbase=lv vers=451 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase$vers patchfiles="" OPT_CONFIG="" DOCS="README GPL.txt" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches + cd $B cp -p src/Makefile.in{,.orig} cat <<- "EOF" | patch src/Makefile.in 67,69c67,70 @@ -264,12 +68,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/build - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x ../src/configure ] ; then ../src/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -286,12 +84,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -306,30 +99,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/lv 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/man_pages-20160727/PlamoBuild.man_pages-3.47 2016-07-27 10:03:08.000000000 +0900 +++ plamo/01_minimum/man_pages/PlamoBuild.man_pages-3.47 2017-06-11 21:18:40.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="https://www.kernel.org/pub/linux/docs/man-pages/Archive/man-pages-3.47.tar.xz" +verify= +digest= +commitid= pkgbase=man_pages vers=3.47 arch=noarch -build=P2 +build=P3 src=man-pages-$vers patchfiles="" OPT_CONFIG="" DOCS="Changes.old README man-pages-3.47.Announce Changes" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $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/man2 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` @@ -306,6 +82,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/man_pages_ja-20160727/PlamoBuild.man_pages_ja-20100415 2016-07-27 10:03:26.000000000 +0900 +++ plamo/01_minimum/man_pages_ja/PlamoBuild.man_pages_ja-20100415 2017-06-11 21:45:24.000000000 +0900 @@ -2,247 +2,48 @@ ###################################################################### url="https://pkgs.fedoraproject.org/repo/pkgs/man-pages-ja/man-pages-ja-20100415.tar.gz/78041d36eb491cd5b0eaf16aac34361a/man-pages-ja-20100415.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/man_pages_ja/manpage_list - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/man_pages_ja/man-pages-ja-20100828-plamo.tar.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/man_pages_ja/manpage_list + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/man_pages_ja/man-pages-ja-20100828-plamo.tar.gz" +verify= +digest= +commitid= pkgbase=man_pages_ja vers=20100415 arch=noarch -build=P4 +build=P5 src=man-pages-ja-$vers patchfiles="" OPT_CONFIG="" DOCS="manual/LDP_man-pages/translation_list ChangeLog README INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then + false && download_sources for i in $url ; do - if [ ! -f ${i##*/} ] ; then - wget --no-check-certificate $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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac + if [ ! -f ${i##*/} ] ; then wget --no-check-certificate $i ; fi done + for i in $url ; do case ${i##*.} in gz) tar xvpzf ${i##*/} ;; esac done fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -288,24 +84,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress for i in `seq 8` ; do gzip_dir $mandir/ja_JP.eucJP/man$i ; done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/share/man/ja_JP.eucJP/man1 | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -325,6 +105,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/mcelog-20161013/PlamoBuild.mcelog-git_20160907 2016-10-13 16:30:39.000000000 +0900 +++ plamo/01_minimum/mcelog/PlamoBuild.mcelog-git_20160907 2017-06-11 22:01:13.000000000 +0900 @@ -1,251 +1,41 @@ #!/bin/sh ###################################################################### -url="https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/mcelog/gitlog2changelog.py" +url="https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git" +verify= +digest= +commitid=e6386a0 pkgbase=mcelog vers=git_20160907 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase patchfiles="" OPT_CONFIG="" DOCS="CHANGES README.md README.releases TODO ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; else - ( cd `basename ${i##*/} .git` ; git pull origin master ) ; 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 - ;; - esac - done - if [ ! -x gitlog2changelog.py ] ; then - chmod 755 gitlog2changelog.py - fi - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard e6386a0 - git set-file-times ; TZ=UTC ../gitlog2changelog.py) ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p mcelog.init{,.orig} cat <<- "EOF" | patch mcelog.init @@ -265,12 +55,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -287,12 +71,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -310,25 +89,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P etc/mcelog tar rvpf $pkg.tar -C $P etc/rc.d/init.d/mcelog @@ -337,6 +100,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/mtools-20160729/PlamoBuild.mtools-4.0.18 2016-07-29 22:55:22.000000000 +0900 +++ plamo/01_minimum/mtools/PlamoBuild.mtools-4.0.18 2017-06-11 22:09:40.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/mtools/mtools-4.0.18.tar.bz2" +verify= +digest= +commitid= pkgbase=mtools vers=4.0.18 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README.BEBOX README NEWS COPYING Release.notes INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man5 | tail -n+2` @@ -303,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/bind-20160806/PlamoBuild.bind-9.9.9_P2 2016-08-06 07:20:47.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.9_P2 2016-08-09 16:37:24.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=bind vers=9.9.9_P2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-9.9.9-P2 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" @@ -412,7 +412,7 @@ for i in master.localhost localhost.rev ; do named_config $i done - mv var/named/named.conf.new /tmp + mv var/named/named.root.new /tmp if [ -f var/named/named.root ] ; then if diff -q var/named/named.root{.internic,} > /dev/null 2>&1 ; then mv var/named/named.root{,.old} --- plamo/01_minimum/network.txz/old/bind-20160809/PlamoBuild.bind-9.9.9_P2 2016-08-09 16:37:24.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.9_P2 2016-09-07 23:52:22.000000000 +0900 @@ -6,7 +6,7 @@ pkgbase=bind vers=9.9.9_P2 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-9.9.9-P2 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" @@ -414,10 +414,11 @@ done mv var/named/named.root.new /tmp if [ -f var/named/named.root ] ; then - if diff -q var/named/named.root{.internic,} > /dev/null 2>&1 ; then - mv var/named/named.root{,.old} + if diff -q var/named/named.root.internic var/named/named.root \ + > /dev/null 2>&1 ; then + mv var/named/named.root var/named/named.root.old mv /tmp/named.root.new var/named/named.root - cp -p var/named/named.root{,.internic} + cp -p var/named/named.root var/named/named.root.internic echo "New root hint file has been installed." echo "Old one has been moved to /var/named/named.root.old." else @@ -427,7 +428,7 @@ fi else mv /tmp/named.root.new var/named/named.root - cp -p var/named/named.root{,.internic} + cp -p var/named/named.root var/named/named.root.internic echo "New root hint file has been installed." fi EOF --- plamo/01_minimum/network.txz/old/curl-20160806/PlamoBuild.curl-7.49.1 2016-08-06 13:24:23.000000000 +0900 +++ plamo/01_minimum/network.txz/curl/PlamoBuild.curl-7.50.1 2016-09-06 20:58:44.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="http://curl.haxx.se/download/curl-7.49.1.tar.bz2" +url="http://curl.haxx.se/download/curl-7.50.1.tar.bz2" pkgbase=curl -vers=7.49.1 +vers=7.50.1 arch=`uname -m` build=P2 src=$pkgbase-$vers --- plamo/01_minimum/network.txz/old/cyrus_sasl-20160806/PlamoBuild.cyrus_sasl-2.1.23 2016-08-06 16:57:10.000000000 +0900 +++ plamo/01_minimum/network.txz/cyrus_sasl/PlamoBuild.cyrus_sasl-2.1.26 2016-09-25 07:18:16.000000000 +0900 @@ -1,18 +1,16 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.23.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-blfs.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-64bit-plugindir.patch.gz" +url="ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz" pkgbase=cyrus_sasl -vers=2.1.23 +vers=2.1.26 arch=`uname -m` -build=P4 +build=P1 src=cyrus-sasl-$vers -patchfiles="cyrus-sasl-blfs.patch.gz cyrus-sasl-64bit-plugindir.patch.gz" +patchfiles="" OPT_CONFIG="--with-dbpath=/var/lib/sasl/sasldb2 --with-saslauthd=/var/run/saslauthd" -DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS" +DOCS="ChangeLog INSTALL AUTHORS INSTALL.TXT COPYING NEWS README" ###################################################################### fscheck() { @@ -236,6 +234,10 @@ esac done done + cp -p Makefile.in{,.orig} + sed -i 's@$(prefix)/lib@$(libdir)@g' Makefile.in + cp -p plugins/Makefile.in{,.orig} + sed -i 's@$(prefix)/lib/sasl2@$(plugindir)@g' plugins/Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -348,7 +350,10 @@ convert touch -t `date '+%m%d0900'` $P/usr/$libdir/sasl2 tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/$libdir -maxdepth 1 -name libsasl2.*` + tar rvpf $pkg.tar -C $P usr/$libdir/sasl2 + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/sasl tar rvpf $pkg.tar -C $P etc/sasl2 tar rvpf $pkg.tar -C $P etc/rc.d/init.d/saslauthd --- plamo/01_minimum/network.txz/old/ntp-20160928/PlamoBuild.ntp-4.2.8p7 2016-09-28 13:52:23.000000000 +0900 +++ plamo/01_minimum/network.txz/ntp/PlamoBuild.ntp-4.2.8p8 2016-09-28 16:36:03.000000000 +0900 @@ -1,18 +1,18 @@ #!/bin/sh ###################################################################### -url="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p7.tar.gz" +url="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p8.tar.gz" pkgbase=ntp -vers=4.2.8p7 +vers=4.2.8p8 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README.leapsmear ChangeLog NEWS CommitLog README readme.y2kfixes - COPYRIGHT README.hackers CommitLog-4.1.0 WHERE-TO-START - README.patches TODO README.refclocks INSTALL README.pullrequests - README.versions README.bk NOTES.y2kfixes" +DOCS="README.hackers README.bk NEWS WHERE-TO-START README.leapsmear + readme.y2kfixes CommitLog-4.1.0 README NOTES.y2kfixes CommitLog + COPYRIGHT INSTALL README.refclocks TODO ChangeLog README.versions + README.patches README.pullrequests" ###################################################################### fscheck() { @@ -347,12 +347,14 @@ done mv $docdir/sntp $docdir/$src mv $docdir/ntp $docdir/$src/html - mv $docdir/$src/{sntp,{WHERE-TO-START,README.patches,TODO}.gz} $C - mv $docdir/$src/{{README.refclocks,INSTALL,README.pullrequests}.gz,html} $C - mv $docdir/$src/{README.versions,README.bk,NOTES.y2kfixes,$myname}.gz $C - mv $C/{sntp,{WHERE-TO-START,README.patches,TODO}.gz} $docdir/$src - mv $C/{{README.refclocks,INSTALL,README.pullrequests}.gz,html} $docdir/$src - mv $C/{README.versions,README.bk,NOTES.y2kfixes,$myname}.gz $docdir/$src + mv $docdir/$src/{sntp,README.gz,html,{NOTES.y2kfixes,CommitLog}.gz} $C + mv $docdir/$src/{COPYRIGHT,INSTALL,README.refclocks,TODO,ChangeLog}.gz $C + mv $docdir/$src/{README.versions,README.patches,README.pullrequests}.gz $C + mv $docdir/$src/$myname.gz $C + mv $C/{sntp,README.gz,html,{NOTES.y2kfixes,CommitLog}.gz} $docdir/$src + mv $C/{COPYRIGHT,INSTALL,README.refclocks,TODO,ChangeLog}.gz $docdir/$src + mv $C/{README.versions,README.patches,README.pullrequests}.gz $docdir/$src + mv $C/$myname.gz $docdir/$src touch -r $S $docdir/$src convert install -d $P/install --- plamo/01_minimum/network.txz/old/curl-20160906/PlamoBuild.curl-7.50.1 2016-09-06 20:58:44.000000000 +0900 +++ plamo/01_minimum/network.txz/curl/PlamoBuild.curl-7.50.3 2016-09-24 08:32:13.000000000 +0900 @@ -1,9 +1,9 @@ #!/bin/sh ###################################################################### -url="http://curl.haxx.se/download/curl-7.50.1.tar.bz2" +url="http://curl.haxx.se/download/curl-7.50.3.tar.bz2" pkgbase=curl -vers=7.50.1 +vers=7.50.3 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -11,12 +11,12 @@ OPT_CONFIG="--disable-ldap --disable-rtsp --with-gssapi-includes=/usr/heimdal/include --without-librtmp" DOCS="`echo docs/{VERSIONS,MAIL-ETIQUETTE,HTTP-COOKIES.md,BINDINGS}` - `echo docs/{RELEASE-PROCEDURE,BUGS,CODE_STYLE.md,KNOWN_BUGS}` - `echo docs/{SSLCERTS,LICENSE-MIXING,HTTP2.md,README.win32}` - `echo docs/{INTERNALS,THANKS,README.netware,TheArtOfHttpScripting}` - `echo docs/{INSTALL.devcpp,SECURITY,CHECKSRC.md,FAQ,INSTALL}` - `echo docs/{ROADMAP.md,FEATURES,MANUAL,CODE_OF_CONDUCT.md}` - `echo docs/{RESOURCES,CONTRIBUTE,HISTORY,TODO,SSL-PROBLEMS}` + `echo docs/{RELEASE-PROCEDURE,BUGS,SSL-PROBLEMS.md,CODE_STYLE.md}` + `echo docs/{KNOWN_BUGS,HTTP2.md,README.win32,INTERNALS.md}` + `echo docs/{LICENSE-MIXING.md,THANKS,README.netware,TheArtOfHttpScripting}` + `echo docs/{INSTALL.devcpp,CHECKSRC.md,FAQ,INSTALL,ROADMAP.md,FEATURES}` + `echo docs/{MANUAL,CODE_OF_CONDUCT.md,RESOURCES,SECURITY.md,TODO}` + `echo docs/{CONTRIBUTE.md,HISTORY.md,SSLCERTS.md}` README CHANGES RELEASE-NOTES COPYING" ###################################################################### --- plamo/01_minimum/network.txz/old/bind-20160907/PlamoBuild.bind-9.9.9_P2 2016-09-07 23:52:22.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.9_P3 2016-10-01 07:53:30.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.9-P2/bind-9.9.9-P2.tar.gz +url="http://ftp.isc.org/isc/bind/9.9.9-P3/bind-9.9.9-P3.tar.gz http://www.internic.net/domain/named.root" pkgbase=bind -vers=9.9.9_P2 +vers=9.9.9_P3 arch=`uname -m` -build=P4 -src=$pkgbase-9.9.9-P2 +build=P2 +src=$pkgbase-9.9.9-P3 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" DOCS="CHANGES COPYRIGHT FAQ HISTORY README" --- plamo/01_minimum/network.txz/old/bind-20161001/PlamoBuild.bind-9.9.9_P3 2016-10-01 07:53:30.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.9_P4 2016-11-10 08:49:35.000000000 +0900 @@ -1,16 +1,18 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.9-P3/bind-9.9.9-P3.tar.gz +url="http://ftp.isc.org/isc/bind/9.9.9-P4/bind-9.9.9-P4.tar.gz http://www.internic.net/domain/named.root" pkgbase=bind -vers=9.9.9_P3 +vers=9.9.9_P4 arch=`uname -m` build=P2 -src=$pkgbase-9.9.9-P3 +src=$pkgbase-9.9.9-P4 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" DOCS="CHANGES COPYRIGHT FAQ HISTORY README" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -385,9 +387,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/network.txz/old/ntp-20160928a/PlamoBuild.ntp-4.2.8p8 2016-09-28 16:36:03.000000000 +0900 +++ plamo/01_minimum/network.txz/ntp/PlamoBuild.ntp-4.2.8p8 2016-10-13 08:06:33.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=ntp vers=4.2.8p8 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -289,7 +289,7 @@ #!/bin/sh start() { - if ps ax | grep -q ntpd ; then + if ps ax | grep ntpd | grep -vq grep ; then echo "NTP daemon already running. NTP start aborted." exit 0 fi --- plamo/01_minimum/network.txz/old/wpa_supplicant-20160929/PlamoBuild.wpa_supplicant-2.0 2016-09-29 14:41:35.000000000 +0900 +++ plamo/01_minimum/network.txz/wpa_supplicant/PlamoBuild.wpa_supplicant-2.5 2016-09-29 16:25:35.000000000 +0900 @@ -1,18 +1,17 @@ #!/bin/sh ###################################################################### -url="http://hostap.epitest.fi/releases/wpa_supplicant-2.0.tar.gz" +url="http://hostap.epitest.fi/releases/wpa_supplicant-2.5.tar.gz" pkgbase=wpa_supplicant -vers=2.0 +vers=2.5 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README - `echo wpa_supplicant/{README-HS20,eap_testing.txt,todo.txt,ChangeLog}` - `echo wpa_supplicant/README{-P2P,,-WPS,-Windows.txt}` - COPYING" +DOCS="`echo wpa_supplicant/{README-HS20,eap_testing.txt,README-Windows.txt}` + `echo wpa_supplicant/{ChangeLog,README-WPS,todo.txt,README-P2P,README}` + CONTRIBUTIONS COPYING README" ###################################################################### fscheck() { @@ -237,41 +236,36 @@ done done cd $B - cp -p wpa_supplicant/Makefile{,.orig} - sed '/^export/s@/local\(.*\)/$@\1@g' wpa_supplicant/Makefile.orig \ - > wpa_supplicant/Makefile cp -p wpa_supplicant/{defconfig,.config} cat <<- "EOF" | patch wpa_supplicant/.config - 10a11 - > CFLAGS += -I/usr/include/libnl3 - 199c200 + 44c44 + < #CONFIG_LIBNL32=y + --- + > CONFIG_LIBNL32=y + 151c151 < #CONFIG_WPS=y --- > CONFIG_WPS=y - 245c246 + 203c203 < #CONFIG_READLINE=y --- > CONFIG_READLINE=y - 376c377 + 331c331 < #CONFIG_CTRL_IFACE_DBUS=y --- > CONFIG_CTRL_IFACE_DBUS=y - 380c381 + 335c335 < #CONFIG_CTRL_IFACE_DBUS_NEW=y --- > CONFIG_CTRL_IFACE_DBUS_NEW=y - 383c384 + 338c338 < #CONFIG_CTRL_IFACE_DBUS_INTRO=y --- > CONFIG_CTRL_IFACE_DBUS_INTRO=y - 410c411 + 365c365 < #CONFIG_DEBUG_FILE=y --- > CONFIG_DEBUG_FILE=y - 523a525,527 - > - > CONFIG_IPV6=y - > CONFIG_LIBNL32=y EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/wpa_supplicant @@ -295,7 +289,7 @@ make fi done - ( cd wpa_gui-qt4 ; qmake ; make ) + make wpa_gui-qt4 fi if [ $opt_package -eq 1 ] ; then if [ `id -u` -ne 0 ] ; then @@ -310,7 +304,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/wpa_supplicant if [ -f Makefile ] ; then - make install DESTDIR=$P + make install DESTDIR=$P BINDIR=/usr/sbin fi done wpadir=$B/wpa_supplicant @@ -343,6 +337,7 @@ install -m 644 $wpadir/doc/docbook/wpa_priv.8 $mandir/man8 install -m 644 $wpadir/doc/docbook/wpa_gui.8 $mandir/man8 install -m 644 $wpadir/doc/docbook/wpa_background.8 $mandir/man8 + install -m 644 $wpadir/doc/docbook/eapol_test.8 $mandir/man8 install -d $P/etc/rc.d/init.d cat <<- "EOF" > $P/etc/rc.d/init.d/wpa_supplicant #!/bin/sh @@ -382,7 +377,7 @@ exit 0 EOF chmod 644 $P/etc/rc.d/init.d/wpa_supplicant - cat <<- "EOF" | unexpand > $P/etc/wpa_supplicant.conf.dist + cat <<- "EOF" | unexpand > $P/etc/wpa_supplicant.conf.new ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel network={ @@ -416,17 +411,15 @@ cp -a $S/wpa_supplicant/examples $docdir/$src/wpa_supplicant chmod -R g-w $docdir/$src/wpa_supplicant/examples chown -R root.root $docdir/$src/wpa_supplicant/examples - mv $docdir/$src/wpa_supplicant/{examples,README-{WPS,Windows.txt}.gz} $C - mv $C/{examples,README-{WPS,Windows.txt}.gz} $docdir/$src/wpa_supplicant touch -r $S $docdir/$src/wpa_supplicant convert install -d $P/install cat <<- "EOF" > $P/install/doinst.sh + mv etc/wpa_supplicant.conf.new /tmp if [ -f etc/wpa_supplicant.conf ] ; then - rm etc/wpa_supplicant.conf.dist + mv /tmp/wpa_supplicant.conf.new etc/wpa_supplicant.conf.dist else - mv etc/wpa_supplicant.conf.dist /tmp - mv /tmp/wpa_supplicant.conf.dist etc/wpa_supplicant.conf + mv /tmp/wpa_supplicant.conf.new etc/wpa_supplicant.conf fi EOF touch -t `date '+%m%d0900'` $P/install/doinst.sh @@ -434,7 +427,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/dbus-1/system-services | tail -n+2` tar rvpf $pkg.tar -C $P etc/dbus-1/system.d/wpa_supplicant.conf tar rvpf $pkg.tar -C $P etc/rc.d/init.d/wpa_supplicant - tar rvpf $pkg.tar -C $P etc/wpa_supplicant.conf.dist + tar rvpf $pkg.tar -C $P etc/wpa_supplicant.conf.new 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 --- plamo/01_minimum/network.txz/old/libpcap-20160921/PlamoBuild.libpcap-1.7.2 2016-09-21 15:26:37.000000000 +0900 +++ plamo/01_minimum/network.txz/libpcap/PlamoBuild.libpcap-1.8.0 2016-09-24 06:23:18.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="http://www.tcpdump.org/release/libpcap-1.7.2.tar.gz" +url="http://www.tcpdump.org/release/libpcap-1.8.0.tar.gz" pkgbase=libpcap -vers=1.7.2 +vers=1.8.0 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README.sita README.tru64 CHANGES README.hpux README pcap-sita.html - README.macosx README.dag INSTALL.txt README.linux TODO README.septel - VERSION LICENSE CREDITS README.aix README.Win32" +DOCS="README.Win32 VERSION LICENSE README.tru64 README.dag README + pcap-sita.html CHANGES README.septel README.macosx README.hpux + README.sita README.linux INSTALL.txt CREDITS TODO README.aix" ###################################################################### fscheck() { --- plamo/01_minimum/network.txz/old/bind-20161110/PlamoBuild.bind-9.9.9_P4 2016-11-10 08:49:35.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.9_P5 2017-01-16 19:46:13.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.9-P4/bind-9.9.9-P4.tar.gz +url="http://ftp.isc.org/isc/bind/9.9.9-P5/bind-9.9.9-P5.tar.gz http://www.internic.net/domain/named.root" pkgbase=bind -vers=9.9.9_P4 +vers=9.9.9_P5 arch=`uname -m` build=P2 -src=$pkgbase-9.9.9-P4 +src=$pkgbase-9.9.9-P5 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" DOCS="CHANGES COPYRIGHT FAQ HISTORY README" --- plamo/01_minimum/network.txz/old/bind-20170116/PlamoBuild.bind-9.9.9_P5 2017-01-16 19:46:13.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.9_P6 2017-03-01 08:21:21.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.9-P5/bind-9.9.9-P5.tar.gz +url="http://ftp.isc.org/isc/bind/9.9.9-P6/bind-9.9.9-P6.tar.gz http://www.internic.net/domain/named.root" pkgbase=bind -vers=9.9.9_P5 +vers=9.9.9_P6 arch=`uname -m` build=P2 -src=$pkgbase-9.9.9-P5 +src=$pkgbase-9.9.9-P6 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" DOCS="CHANGES COPYRIGHT FAQ HISTORY README" -template=20161020 +template=20170204 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -230,7 +230,7 @@ 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 - ;; + bz2) bunzip2 -c $W/$j | patch -Np1 -i - ;; xz) unxz -c $W/$j | patch -Np1 -i - ;; *) patch -Np1 -i $W/$j ;; esac --- plamo/01_minimum/network.txz/old/curl-20160924/PlamoBuild.curl-7.50.3 2016-09-24 08:32:13.000000000 +0900 +++ plamo/01_minimum/network.txz/curl/PlamoBuild.curl-7.51.0 2016-11-07 11:03:09.000000000 +0900 @@ -1,23 +1,24 @@ #!/bin/sh ###################################################################### -url="http://curl.haxx.se/download/curl-7.50.3.tar.bz2" +url="http://curl.haxx.se/download/curl-7.51.0.tar.bz2" pkgbase=curl -vers=7.50.3 +vers=7.51.0 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-ldap --disable-rtsp --with-gssapi-includes=/usr/heimdal/include --without-librtmp" -DOCS="`echo docs/{VERSIONS,MAIL-ETIQUETTE,HTTP-COOKIES.md,BINDINGS}` - `echo docs/{RELEASE-PROCEDURE,BUGS,SSL-PROBLEMS.md,CODE_STYLE.md}` - `echo docs/{KNOWN_BUGS,HTTP2.md,README.win32,INTERNALS.md}` - `echo docs/{LICENSE-MIXING.md,THANKS,README.netware,TheArtOfHttpScripting}` - `echo docs/{INSTALL.devcpp,CHECKSRC.md,FAQ,INSTALL,ROADMAP.md,FEATURES}` - `echo docs/{MANUAL,CODE_OF_CONDUCT.md,RESOURCES,SECURITY.md,TODO}` - `echo docs/{CONTRIBUTE.md,HISTORY.md,SSLCERTS.md}` +DOCS="`echo docs/{VERSIONS,MAIL-ETIQUETTE,HTTP-COOKIES.md,RELEASE-PROCEDURE}` + `echo docs/{BUGS,SSL-PROBLEMS.md,CODE_STYLE.md,KNOWN_BUGS,HTTP2.md}` + `echo docs/{README.win32,{INTERNALS,INSTALL,LICENSE-MIXING}.md,THANKS}` + `echo docs/{README.netware,TheArtOfHttpScripting,{CHECKSRC,BINDINGS}.md}` + `echo docs/{FAQ,INSTALL,ROADMAP.md,FEATURES,MANUAL,CODE_OF_CONDUCT.md}` + `echo docs/{RESOURCES,SECURITY.md,TODO,{CONTRIBUTE,HISTORY,SSLCERTS}.md}` README CHANGES RELEASE-NOTES COPYING" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -297,9 +298,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/network.txz/old/dnsmasq-20160806/PlamoBuild.dnsmasq-2.66 2016-08-06 18:26:45.000000000 +0900 +++ plamo/01_minimum/network.txz/dnsmasq/PlamoBuild.dnsmasq-2.76 2016-09-25 07:54:28.000000000 +0900 @@ -1,17 +1,16 @@ #!/bin/sh ###################################################################### -url="http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.66.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/dnsmasq/cve-2015-3294.patch.gz" +url="http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.76.tar.gz" pkgbase=dnsmasq -vers=2.66 +vers=2.76 arch=`uname -m` -build=P3 +build=P1 src=$pkgbase-$vers -patchfiles="cve-2015-3294.patch.gz" +patchfiles="" OPT_CONFIG="" -DOCS="CHANGELOG CHANGELOG.archive COPYING COPYING-v3 FAQ VERSION - dnsmasq.conf.example doc.html setup.html" +DOCS="FAQ COPYING setup.html CHANGELOG COPYING-v3 CHANGELOG.archive + doc.html" ###################################################################### fscheck() { @@ -271,7 +270,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install-i18n PREFIX=/usr DESTDIR=$P + make install-i18n DESTDIR=$P PREFIX=/usr fi done install -d $P/etc --- plamo/01_minimum/network.txz/old/ethtool-20160923/PlamoBuild.ethtool-3.10 2016-09-23 15:47:42.000000000 +0900 +++ plamo/01_minimum/network.txz/ethtool/PlamoBuild.ethtool-4.6 2016-09-23 16:36:42.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/software/network/ethtool/ethtool-3.10.tar.gz" +url="https://www.kernel.org/pub/software/network/ethtool/ethtool-4.6.tar.xz" pkgbase=ethtool -vers=3.10 +vers=4.6 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS LICENSE" +DOCS="AUTHORS NEWS INSTALL COPYING README ChangeLog LICENSE" ###################################################################### fscheck() { --- plamo/01_minimum/network.txz/old/hostapd-20160920/PlamoBuild.hostapd-2.0 2016-09-20 15:52:27.000000000 +0900 +++ plamo/01_minimum/network.txz/hostapd/PlamoBuild.hostapd-2.5 2016-10-01 20:43:06.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://hostap.epitest.fi/releases/hostapd-2.0.tar.gz" +url="http://hostap.epitest.fi/releases/hostapd-2.5.tar.gz" pkgbase=hostapd -vers=2.0 +vers=2.5 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="COPYING README +DOCS="CONTRIBUTIONS COPYING README `echo hostapd/{ChangeLog,README{,-WPS},{eap_testing,hlr_auc_gw}.txt}`" ###################################################################### @@ -235,28 +235,24 @@ done done cd $B - cp -p hostapd/Makefile{,.orig} - sed 's@/local@@g' hostapd/Makefile.orig \ - | sed 's@\@sbin@g' > hostapd/Makefile cp -p hostapd/{defconfig,.config} cat <<- "EOF" | patch hostapd/.config - 10a11 - > CFLAGS += -I/usr/include/libnl3 - 16c17 + 16c16 < #CONFIG_DRIVER_WIRED=y --- > CONFIG_DRIVER_WIRED=y - 106c107 + 31c31 + < #CONFIG_LIBNL32=y + --- + > CONFIG_LIBNL32=y + 114c114 < #CONFIG_WPS=y --- > CONFIG_WPS=y - 155c156 + 164c164 < #CONFIG_DEBUG_FILE=y --- > CONFIG_DEBUG_FILE=y - 269a271,272 - > - > CONFIG_LIBNL32=y EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/hostapd @@ -277,7 +273,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/hostapd if [ -f Makefile ] ; then - make + make BINDIR=/usr/sbin fi done fi @@ -294,13 +290,37 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/hostapd if [ -f Makefile ] ; then - make install DESTDIR=$P + make install DESTDIR=$P BINDIR=/usr/sbin fi done install -d $mandir/man1 install -m 644 $B/hostapd/hostapd_cli.1 $mandir/man1 install -d $mandir/man8 install -m 644 $B/hostapd/hostapd.8 $mandir/man8 + install -d $P/etc + cat <<- "EOF" > $P/etc/hostapd.conf.new + interface=wlan0 + ctrl_interface=/var/run/hostapd + ctrl_interface_group=wheel + ssid="replace SSID" + country_code=JP + ieee80211d=1 + hw_mode=g + macaddr_acl=0 + accept_mac_file=/etc/hostapd.accept + deny_mac_file=/etc/hostapd.deny + auth_algs=1 + wpa=2 + wpa_psk_file=/etc/hostapd.wpa_psk + wpa_key_mgmt=WPA-PSK + rsn_pairwise=CCMP + EOF + install -m 644 $B/hostapd/hostapd.accept $P/etc/hostapd.accept.new + sed -i '/^00/s/^/#/' $P/etc/hostapd.accept.new + install -m 644 $B/hostapd/hostapd.deny $P/etc/hostapd.deny.new + sed -i '/^00/s/^/#/' $P/etc/hostapd.deny.new + install -m 644 $B/hostapd/hostapd.wpa_psk $P/etc/hostapd.wpa_psk.new + sed -i '/^00/s/^/#/' $P/etc/hostapd.wpa_psk.new install -d $P/etc/rc.d/init.d cat <<- "EOF" > $P/etc/rc.d/init.d/hostapd #!/bin/sh @@ -336,48 +356,6 @@ exit 0 EOF chmod 644 $P/etc/rc.d/init.d/hostapd - cat <<- "EOF" > $P/etc/hostapd.conf.new - interface=wlan0 - ctrl_interface=/var/run/hostapd - ctrl_interface_group=wheel - ssid="replace SSID" - country_code=JP - ieee80211d=1 - hw_mode=g - macaddr_acl=0 - accept_mac_file=/etc/hostapd.accept - deny_mac_file=/etc/hostapd.deny - auth_algs=1 - wpa=2 - wpa_psk_file=/etc/hostapd.wpa_psk - wpa_key_mgmt=WPA-PSK - rsn_pairwise=CCMP - EOF - cat <<- "EOF" > $P/etc/hostapd.accept.new - # List of MAC addresses that are allowed to authenticate (IEEE 802.11) - # with the AP. - #00:11:22:33:44:55 - #00:66:77:88:99:aa - #00:00:22:33:44:55 - EOF - cat <<- "EOF" > $P/etc/hostapd.deny.new - # List of MAC addresses that are not allowed to authenticate (IEEE 802.11) - # with the AP. - #00:20:30:40:50:60 - #00:ab:cd:ef:12:34 - #00:00:30:40:50:60 - EOF - cat <<- "EOF" > $P/etc/hostapd.wpa_psk.new - # List of WPA PSKs. Each line, except for empty lines and lines starting - # with #, must contain a MAC address and PSK separated with a space. - # Special MAC address 00:00:00:00:00:00 can be used to configure PSKs that - # anyone can use. PSK can be configured as an ASCII passphrase of 8..63 - # characters or as a 256-bit hex PSK (64 hex digits). - #00:00:00:00:00:00 secret passphrase - #00:11:22:33:44:55 another passphrase - #00:22:33:44:55:66 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef - #00:00:00:00:00:00 another passphrase for all STAs - EOF touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -417,7 +395,7 @@ fi } - for in conf accept deny wpa_psk; do + for i in conf accept deny wpa_psk ; do hostapd_config $i done EOF --- plamo/01_minimum/network.txz/old/iw-20160920/PlamoBuild.iw-3.10 2016-09-20 18:21:59.000000000 +0900 +++ plamo/01_minimum/network.txz/iw/PlamoBuild.iw-4.7 2016-09-23 21:11:34.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/software/network/iw/iw-3.10.tar.bz2" +url="https://www.kernel.org/pub/software/network/iw/iw-4.7.tar.xz" pkgbase=iw -vers=3.10 +vers=4.7 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="COPYING README" +DOCS="CONTRIBUTING COPYING README" ###################################################################### fscheck() { --- plamo/01_minimum/network.txz/old/libidn-20160921/PlamoBuild.libidn-1.32 2016-09-21 14:30:36.000000000 +0900 +++ plamo/01_minimum/network.txz/libidn/PlamoBuild.libidn-1.33 2016-09-23 21:26:08.000000000 +0900 @@ -1,11 +1,11 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/libidn/libidn-1.32.tar.gz" +url="http://ftp.gnu.org/gnu/libidn/libidn-1.33.tar.gz" pkgbase=libidn -vers=1.32 +vers=1.33 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" --- plamo/01_minimum/network.txz/old/libnl3-20160923/PlamoBuild.libnl3-3.2.9 2016-09-23 11:16:26.000000000 +0900 +++ plamo/01_minimum/network.txz/libnl3/PlamoBuild.libnl3-3.2.25 2016-09-23 23:56:11.000000000 +0900 @@ -1,11 +1,11 @@ #!/bin/sh ###################################################################### -url="http://www.infradead.org/~tgr/libnl/files/libnl-3.2.9.tar.gz" +url="http://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz" pkgbase=libnl3 -vers=3.2.9 +vers=3.2.25 arch=`uname -m` -build=P2 +build=P1 src=libnl-$vers patchfiles="" OPT_CONFIG="" --- plamo/01_minimum/network.txz/old/libpcap-20160924/PlamoBuild.libpcap-1.8.0 2016-09-24 06:23:18.000000000 +0900 +++ plamo/01_minimum/network.txz/libpcap/PlamoBuild.libpcap-1.8.1 2017-03-01 08:16:05.000000000 +0900 @@ -1,17 +1,19 @@ #!/bin/sh ###################################################################### -url="http://www.tcpdump.org/release/libpcap-1.8.0.tar.gz" +url="http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz" pkgbase=libpcap -vers=1.8.0 +vers=1.8.1 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README.Win32 VERSION LICENSE README.tru64 README.dag README - pcap-sita.html CHANGES README.septel README.macosx README.hpux - README.sita README.linux INSTALL.txt CREDITS TODO README.aix" +DOCS="README.sita README.tru64 CHANGES README.hpux README + pcap-sita.html README.macosx README.dag INSTALL.txt README.linux + TODO README.septel VERSION LICENSE CREDITS README.aix README.Win32" +template=20170204 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -229,7 +231,7 @@ 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 - ;; + bz2) bunzip2 -c $W/$j | patch -Np1 -i - ;; xz) unxz -c $W/$j | patch -Np1 -i - ;; *) patch -Np1 -i $W/$j ;; esac @@ -290,9 +292,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/network.txz/old/libraw1394-20160921/PlamoBuild.libraw1394-2.0.5 2016-09-21 15:44:17.000000000 +0900 +++ plamo/01_minimum/network.txz/libraw1394/PlamoBuild.libraw1394-2.1.2 2016-09-24 06:39:39.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/libs/ieee1394/libraw1394-2.0.5.tar.xz" +url="https://www.kernel.org/pub/linux/libs/ieee1394/libraw1394-2.1.2.tar.xz" pkgbase=libraw1394 -vers=2.0.5 +vers=2.1.2 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="ChangeLog COPYING.LIB AUTHORS README NEWS INSTALL" +DOCS="AUTHORS COPYING.LIB ChangeLog INSTALL NEWS README" ###################################################################### fscheck() { --- plamo/01_minimum/network.txz/old/libssh-20160921/PlamoBuild.libssh-0.7.2 2016-09-21 21:02:17.000000000 +0900 +++ plamo/01_minimum/network.txz/libssh/PlamoBuild.libssh-0.7.3 2016-09-24 06:53:59.000000000 +0900 @@ -1,15 +1,16 @@ #!/bin/sh ###################################################################### -url="https://red.libssh.org/attachments/download/177/libssh-0.7.2.tar.xz" +url="https://red.libssh.org/attachments/download/195/libssh-0.7.3.tar.xz" pkgbase=libssh -vers=0.7.2 +vers=0.7.3 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="BSD COPYING AUTHORS INSTALL README README.CodingStyle ChangeLog" +DOCS="BSD COPYING AUTHORS INSTALL README README.CodingStyle + SubmittingPatches ChangeLog" ###################################################################### fscheck() { --- plamo/01_minimum/network.txz/old/libssh2-20160924/PlamoBuild.libssh2-1.5.0 2016-09-24 07:36:49.000000000 +0900 +++ plamo/01_minimum/network.txz/libssh2/PlamoBuild.libssh2-1.7.0 2016-09-24 07:29:19.000000000 +0900 @@ -1,15 +1,16 @@ #!/bin/sh ###################################################################### -url="https://www.libssh2.org/download/libssh2-1.5.0.tar.gz" +url="https://www.libssh2.org/download/libssh2-1.7.0.tar.gz" pkgbase=libssh2 -vers=1.5.0 +vers=1.7.0 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="`echo docs/{BINDINGS,HACKING,INSTALL,AUTHORS,TODO}` +DOCS="`echo docs/{BINDINGS,HACKING,INSTALL_CMAKE,AUTHORS,TODO}` + `echo docs/{INSTALL_AUTOTOOLS,HACKING.CRYPTO}` README RELEASE-NOTES ChangeLog COPYING NEWS" ###################################################################### --- plamo/01_minimum/network.txz/old/ntp-20161013/PlamoBuild.ntp-4.2.8p8 2016-10-13 08:06:33.000000000 +0900 +++ plamo/01_minimum/network.txz/ntp/PlamoBuild.ntp-4.2.8p9 2017-01-16 20:53:07.000000000 +0900 @@ -1,18 +1,20 @@ #!/bin/sh ###################################################################### -url="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p8.tar.gz" +url="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p9.tar.gz" pkgbase=ntp -vers=4.2.8p8 +vers=4.2.8p9 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README.hackers README.bk NEWS WHERE-TO-START README.leapsmear - readme.y2kfixes CommitLog-4.1.0 README NOTES.y2kfixes CommitLog - COPYRIGHT INSTALL README.refclocks TODO ChangeLog README.versions - README.patches README.pullrequests" +DOCS="NEWS WHERE-TO-START COPYRIGHT README.hackers CommitLog-4.1.0 + README.pullrequests readme.y2kfixes CommitLog README ChangeLog + README.leapsmear README.versions NOTES.y2kfixes TODO README.bk + INSTALL README.refclocks README.patches" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -277,25 +279,34 @@ done install -d $P/etc cat <<- "EOF" > $P/etc/ntp.conf.new - # peer configuration for your host - # (expected to operate at stratum 3) + # Location of drift file + driftfile /var/lib/ntp/ntp.drift + + # NTP Servers server ntp1.jst.mfeed.ad.jp server ntp2.jst.mfeed.ad.jp server ntp3.jst.mfeed.ad.jp - driftfile /etc/ntp.drift + + # Restriction + restrict -4 default kod limited notrap nomodify nopeer noquery + restrict -6 default kod limited notrap nomodify nopeer noquery + restrict 127.0.0.1 + restrict ::1 EOF install -d $P/etc/rc.d/init.d cat <<- "EOF" > $P/etc/rc.d/init.d/ntp #!/bin/sh + NTPD_OPTS="-u ntp:ntp -p /var/run/ntpd.pid -g" + start() { - if ps ax | grep ntpd | grep -vq grep ; then + if pgrep -u ntp ntpd > /dev/null 2>&1 ; then echo "NTP daemon already running. NTP start aborted." exit 0 fi if [ -x /usr/bin/ntpd -a -f /etc/ntp.conf ] ; then ntpdate -s `sed -n '/^server/p' /etc/ntp.conf | cut -d' ' -f2` - ntpd -c /etc/ntp.conf + ntpd $NTPD_OPTS fi } @@ -303,6 +314,16 @@ killall ntpd } + status() { + if pgrep -u ntp ntpd > /dev/null 2>&1 ; then + echo "NTP daemon is running." + exit 0 + else + echo "NTP daemon is not running." + exit 1 + fi + } + case "$1" in start) start @@ -315,14 +336,19 @@ sleep 3 start ;; + status) + status + ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo $"Usage: $0 {start|stop|restart|status}" exit 1 ;; esac exit 0 EOF chmod 755 $P/etc/rc.d/init.d/ntp + install -d $P/var/lib/ntp + chown ntp.ntp $P/var/lib/ntp touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -339,22 +365,34 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done mv $docdir/sntp $docdir/$src mv $docdir/ntp $docdir/$src/html - mv $docdir/$src/{sntp,README.gz,html,{NOTES.y2kfixes,CommitLog}.gz} $C - mv $docdir/$src/{COPYRIGHT,INSTALL,README.refclocks,TODO,ChangeLog}.gz $C - mv $docdir/$src/{README.versions,README.patches,README.pullrequests}.gz $C - mv $docdir/$src/$myname.gz $C - mv $C/{sntp,README.gz,html,{NOTES.y2kfixes,CommitLog}.gz} $docdir/$src - mv $C/{COPYRIGHT,INSTALL,README.refclocks,TODO,ChangeLog}.gz $docdir/$src - mv $C/{README.versions,README.patches,README.pullrequests}.gz $docdir/$src - mv $C/$myname.gz $docdir/$src + mv $docdir/$src/{sntp,{README,ChangeLog,README.{leapsmear,versions}}.gz} $C + mv $docdir/$src/{NOTES.y2kfixes.gz,html,{TODO,README.bk,INSTALL}.gz} $C + mv $docdir/$src/{README.{refclocks,patches},$myname,$spec}.gz $C + mv $C/{sntp,{README,ChangeLog,README.{leapsmear,versions}}.gz} $docdir/$src + mv $C/{NOTES.y2kfixes.gz,html,{TODO,README.bk,INSTALL}.gz} $docdir/$src + mv $C/{README.{refclocks,patches},$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src convert install -d $P/install @@ -370,6 +408,7 @@ tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/ntp tar rvpf $pkg.tar -C $P `cd $P ; find etc -type f` + tar rvpf $pkg.tar -C $P var/lib/ntp 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/man5 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` --- plamo/01_minimum/network.txz/old/ntrack-20161005/PlamoBuild.ntrack-016 2016-10-05 09:10:09.000000000 +0900 +++ plamo/01_minimum/network.txz/ntrack/PlamoBuild.ntrack-016 2017-01-18 10:07:29.000000000 +0900 @@ -5,11 +5,13 @@ pkgbase=ntrack vers=016 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README COPYING AUTHORS COPYING.LESSER NEWS ChangeLog INSTALL" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -304,9 +306,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/network.txz/old/ppp-20160928/PlamoBuild.ppp-2.4.6 2016-09-28 15:56:58.000000000 +0900 +++ plamo/01_minimum/network.txz/ppp/PlamoBuild.ppp-2.4.7 2016-09-28 16:41:13.000000000 +0900 @@ -1,12 +1,12 @@ #!/bin/sh ###################################################################### -url="https://download.samba.org/pub/ppp/ppp-2.4.6.tar.gz +url="https://download.samba.org/pub/ppp/ppp-2.4.7.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/ppp/plamo-ppp-scripts.tgz" pkgbase=ppp -vers=2.4.6 +vers=2.4.7 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -294,8 +294,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_libdir $P/usr/$libdir/pppd/2.4.6 - touch -t `date '+%m%d0900'` $P/usr/$libdir/pppd/2.4.6 + strip_libdir $P/usr/$libdir/pppd/$vers + touch -t `date '+%m%d0900'` $P/usr/$libdir/pppd/$vers for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do --- plamo/01_minimum/network.txz/old/socat-20160929/PlamoBuild.socat-1.7.2.3 2016-09-29 11:10:19.000000000 +0900 +++ plamo/01_minimum/network.txz/socat/PlamoBuild.socat-1.7.3.1 2016-09-29 11:20:15.000000000 +0900 @@ -1,16 +1,16 @@ #!/bin/sh ###################################################################### -url="http://www.dest-unreach.org/socat/download/Archive/socat-1.7.2.3.tar.gz" +url="http://www.dest-unreach.org/socat/download/socat-1.7.3.1.tar.bz2" pkgbase=socat -vers=1.7.2.3 +vers=1.7.3.1 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="FAQ CHANGES VERSION DEVELOPMENT PORTING SECURITY README - BUGREPORTS README.FIPS EXAMPLES FILES COPYING COPYING.OpenSSL" +DOCS="FAQ DEVELOPMENT PORTING COPYING.OpenSSL FILES README.FIPS + README CHANGES SECURITY BUGREPORTS COPYING EXAMPLES" ###################################################################### fscheck() { --- plamo/01_minimum/network.txz/old/stunnel-20160929/PlamoBuild.stunnel-5.20 2016-09-29 12:57:48.000000000 +0900 +++ plamo/01_minimum/network.txz/stunnel/PlamoBuild.stunnel-5.36 2016-09-29 13:04:18.000000000 +0900 @@ -1,11 +1,11 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.stunnel.org/stunnel/archive/5.x/stunnel-5.20.tar.gz" +url="https://www.stunnel.org/downloads/stunnel-5.36.tar.gz" pkgbase=stunnel -vers=5.20 +vers=5.36 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" --- plamo/01_minimum/network.txz/old/wget-20160929/PlamoBuild.wget-1.18 2016-09-29 14:09:55.000000000 +0900 +++ plamo/01_minimum/network.txz/wget/PlamoBuild.wget-1.18 2016-10-27 08:21:01.000000000 +0900 @@ -1,16 +1,19 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/wget/wget-1.18.tar.xz" +url="http://ftp.gnu.org/gnu/wget/wget-1.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/wget/CVE-2016-7098.patch.gz" pkgbase=wget vers=1.18 arch=`uname -m` -build=P2 +build=P4 src=$pkgbase-$vers -patchfiles="" +patchfiles="CVE-2016-7098.patch.gz" OPT_CONFIG="" DOCS="INSTALL COPYING README MAILING-LIST ChangeLog ABOUT-NLS AUTHORS NEWS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -289,9 +292,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/01_minimum/network.txz/old/wpa_supplicant-20160929a/PlamoBuild.wpa_supplicant-2.5 2016-09-29 16:25:35.000000000 +0900 +++ plamo/01_minimum/network.txz/wpa_supplicant/PlamoBuild.wpa_supplicant-2.5 2017-01-10 10:50:21.000000000 +0900 @@ -289,7 +289,7 @@ make fi done - make wpa_gui-qt4 + #make wpa_gui-qt4 fi if [ $opt_package -eq 1 ] ; then if [ `id -u` -ne 0 ] ; then @@ -308,7 +308,7 @@ fi done wpadir=$B/wpa_supplicant - install $wpadir/wpa_gui-qt4/wpa_gui $P/usr/sbin + #install $wpadir/wpa_gui-qt4/wpa_gui $P/usr/sbin cat <<- "EOF" > $P/usr/sbin/wpa_action.sh #!/bin/sh --- plamo/01_minimum/network.txz/old/bind-20170301/PlamoBuild.bind-9.9.9_P6 2017-03-01 08:21:21.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.9_P8 2017-06-13 21:27:43.000000000 +0900 @@ -1,249 +1,44 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.9-P6/bind-9.9.9-P6.tar.gz +url="http://ftp.isc.org/isc/bind/9.9.9-P8/bind-9.9.9-P8.tar.gz http://www.internic.net/domain/named.root" +verify= +digest= +commitid= pkgbase=bind -vers=9.9.9_P6 +vers=9.9.9_P8 arch=`uname -m` build=P2 -src=$pkgbase-9.9.9-P6 +src=$pkgbase-9.9.9-P8 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" DOCS="CHANGES COPYRIGHT FAQ HISTORY README" -template=20170204 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -376,38 +166,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- "EOF" >> $P/install/doinst.sh named_config() { @@ -463,6 +223,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/parprouted-20160926/PlamoBuild.parprouted-0.7 2016-09-26 12:07:08.000000000 +0900 +++ plamo/01_minimum/network.txz/parprouted/PlamoBuild.parprouted-0.7 2017-06-15 23:17:58.000000000 +0900 @@ -2,241 +2,44 @@ ###################################################################### url="http://www.hazard.maks.net/parprouted/parprouted-0.7.tar.gz" +verify= +digest= +commitid= pkgbase=parprouted vers=0.7 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="CHANGELOG README COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile Makefile.orig cat <<- "EOF" | patch Makefile -16,17c16,19 + 16,17c16,19 < install parprouted /usr/local/sbin < install parprouted.8 /usr/local/man/man8 --- @@ -247,12 +50,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -269,12 +66,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -289,29 +81,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/ppp-20160928a/PlamoBuild.ppp-2.4.7 2016-09-28 16:41:13.000000000 +0900 +++ plamo/01_minimum/network.txz/ppp/PlamoBuild.ppp-2.4.7 2017-06-16 07:52:06.000000000 +0900 @@ -2,238 +2,42 @@ ###################################################################### url="https://download.samba.org/pub/ppp/ppp-2.4.7.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/ppp/plamo-ppp-scripts.tgz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/ppp/ppp-2.4.7-linux_in_h_fix.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/ppp/plamo-ppp-scripts.tgz" +verify= +digest= +commitid= pkgbase=ppp vers=2.4.7 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers -patchfiles="" +patchfiles="ppp-2.4.7-linux_in_h_fix.patch.gz" OPT_CONFIG="" DOCS="Changes-2.3 FAQ PLUGINS README.* SETUP" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B if [ "$arch" == "x86_64" ] ; then sed -i '/DESTDIR/s@lib@&64@g' pppd/pathnames.h @@ -244,12 +48,6 @@ sed -i 's/@DESTDIR@/$(INSTROOT)&/g' pppd/plugins/pppol2tp/Makefile.linux for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +64,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -296,30 +89,14 @@ compress strip_libdir $P/usr/$libdir/pppd/$vers touch -t `date '+%m%d0900'` $P/usr/$libdir/pppd/$vers - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -p $W/scripts/README.plamo.euc $docdir/$src chown root.root $docdir/$src/README.plamo.euc gzip_one $docdir/$src/README.plamo.euc - mv $docdir/$src/{README.plamo.euc,$myname}.gz $C - mv $C/{README.plamo.euc,$myname}.gz $docdir/$src + mv $docdir/$src/{README.plamo.euc,$func,$myname,$spec}.gz $C + mv $C/{README.plamo.euc,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links 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 usr/$libdir/pppd @@ -330,6 +107,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/w3m-20160929/PlamoBuild.w3m-0.5.3 2016-09-29 13:39:28.000000000 +0900 +++ plamo/01_minimum/network.txz/w3m/PlamoBuild.w3m-0.5.3 2017-06-16 09:06:09.000000000 +0900 @@ -2,11 +2,14 @@ ###################################################################### url="http://downloads.sourceforge.net/w3m/w3m-0.5.3.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/w3m/w3m-0.5.3-GC_fix.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/w3m/w3m-0.5.3-GC_fix.patch.gz" +verify= +digest= +commitid= pkgbase=w3m vers=0.5.3 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -18,241 +21,35 @@ `echo doc/README.{cygwin,dict,func,img,m17n,mouse,pre_form,tab}` `echo doc/{STORY.html,keymap.{default,lynx},menu.{default,submenu}}` `echo doc/README.{cookie,passwd}` ABOUT-NLS ChangeLog NEWS README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B sed -i '/w3mimgdisplay/s@$(LIBS)@& -lX11@g' Makefile.in sed -i 's@file_handle@w3m_&@g' istream.[ch] gunzip -c $W/w3m-0.5.3-GC_fix.patch.gz | patch -Np1 -i - for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -269,12 +66,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,24 +84,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress gzip_dir $mandir/ja_JP.eucJP/man1 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/libexec/w3m tar rvpf $pkg.tar -C $P usr/share/w3m @@ -319,6 +95,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/heimdal-20160923/PlamoBuild.heimdal-1.5.3 2016-09-23 09:54:57.000000000 +0900 +++ plamo/01_minimum/network.txz/heimdal/PlamoBuild.heimdal-1.5.3 2017-06-14 07:23:20.000000000 +0900 @@ -2,250 +2,47 @@ ###################################################################### url="http://www.h5l.org/dist/src/heimdal-1.5.3.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/heimdal/heimdal-1.5.3-texinfo_fix.patch" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/heimdal/heimdal-1.5.3-texinfo_fix.patch" +verify= +digest= +commitid= pkgbase=heimdal vers=1.5.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="heimdal-1.5.3-texinfo_fix.patch" OPT_CONFIG="--prefix=/usr/heimdal --infodir=/usr/share/info --mandir=/usr/share/man --with-sqlite3=/usr LIBS=-pthread" DOCS="ChangeLog* LICENSE NEWS README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p krb5.conf{,.orig} sed -i '/default_realm/s@^ *@\t@' krb5.conf for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -450,25 +242,9 @@ strip_bindir $P/usr/heimdal/libexec/heimdal strip_bindir $P/usr/heimdal/libexec strip_libdir $P/usr/heimdal/$libdir - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir prune_symlink $P/usr/heimdal - convert + convert_links touch -t `date '+%m%d0900'` \ $P/usr/heimdal/{{,s}bin,libexec{,/heimdal},$libdir} tar cvpf $pkg.tar -C $P usr/heimdal @@ -482,6 +258,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/wget-20161027/PlamoBuild.wget-1.18 2016-10-27 08:21:01.000000000 +0900 +++ plamo/01_minimum/network.txz/wget/PlamoBuild.wget-1.19.1 2017-06-16 09:49:53.000000000 +0900 @@ -1,250 +1,45 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/wget/wget-1.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/wget/CVE-2016-7098.patch.gz" +url="http://ftp.gnu.org/gnu/wget/wget-1.19.1.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/wget/CVE-2017-6508.patch.gz" +verify= +digest= +commitid= pkgbase=wget -vers=1.18 +vers=1.19.1 arch=`uname -m` -build=P4 +build=P2 src=$pkgbase-$vers -patchfiles="CVE-2016-7098.patch.gz" +patchfiles="CVE-2017-6508.patch.gz" OPT_CONFIG="" -DOCS="INSTALL COPYING README MAILING-LIST ChangeLog ABOUT-NLS AUTHORS - NEWS" -template=20161020 +DOCS="ChangeLog README NEWS ABOUT-NLS MAILING-LIST INSTALL AUTHORS + COPYING" +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/info | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -321,6 +81,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/curl-20161107/PlamoBuild.curl-7.51.0 2016-11-07 11:03:09.000000000 +0900 +++ plamo/01_minimum/network.txz/curl/PlamoBuild.curl-7.54.0 2017-06-13 22:29:10.000000000 +0900 @@ -1,255 +1,52 @@ #!/bin/sh ###################################################################### -url="http://curl.haxx.se/download/curl-7.51.0.tar.bz2" +url="http://curl.haxx.se/download/curl-7.54.0.tar.bz2" +verify= +digest= +commitid= pkgbase=curl -vers=7.51.0 +vers=7.54.0 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-ldap --disable-rtsp - --with-gssapi-includes=/usr/heimdal/include --without-librtmp" + --enable-threaded-resolver --with-gssapi-includes=/usr/heimdal/include + --without-librtmp --without-nghttp2" DOCS="`echo docs/{VERSIONS,MAIL-ETIQUETTE,HTTP-COOKIES.md,RELEASE-PROCEDURE}` `echo docs/{BUGS,SSL-PROBLEMS.md,CODE_STYLE.md,KNOWN_BUGS,HTTP2.md}` `echo docs/{README.win32,{INTERNALS,INSTALL,LICENSE-MIXING}.md,THANKS}` - `echo docs/{README.netware,TheArtOfHttpScripting,{CHECKSRC,BINDINGS}.md}` - `echo docs/{FAQ,INSTALL,ROADMAP.md,FEATURES,MANUAL,CODE_OF_CONDUCT.md}` - `echo docs/{RESOURCES,SECURITY.md,TODO,{CONTRIBUTE,HISTORY,SSLCERTS}.md}` - README CHANGES RELEASE-NOTES COPYING" -template=20161020 + `echo docs/{README.{md,netware},TheArtOfHttpScripting,CIPHERS.md}` + `echo docs/{{CHECKSRC,BINDINGS}.md,FAQ,INSTALL,ROADMAP.md,FEATURES}` + `echo docs/{INSTALL.cmake,MANUAL,CODE_OF_CONDUCT.md,RESOURCES}` + `echo docs/{README.cmake,SECURITY.md,TODO,{CONTRIBUTE,HISTORY}.md}` + docs/SSLCERTS.md README CHANGES RELEASE-NOTES COPYING" +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -267,12 +64,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -287,38 +79,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -330,6 +92,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/bind-20170613/PlamoBuild.bind-9.9.9_P8 2017-06-13 21:27:43.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.10_P1 2017-06-17 09:21:04.000000000 +0900 @@ -1,16 +1,16 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.9-P8/bind-9.9.9-P8.tar.gz +url="http://ftp.isc.org/isc/bind/9.9.10-P1/bind-9.9.10-P1.tar.gz http://www.internic.net/domain/named.root" verify= digest= commitid= pkgbase=bind -vers=9.9.9_P8 +vers=9.9.10_P1 arch=`uname -m` build=P2 -src=$pkgbase-9.9.9-P8 +src=$pkgbase-9.9.10-P1 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" DOCS="CHANGES COPYRIGHT FAQ HISTORY README" --- plamo/01_minimum/network.txz/old/bind-20170617/PlamoBuild.bind-9.9.10_P1 2017-06-17 09:21:04.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.9.13_P1 2018-12-27 11:43:18.000000000 +0900 @@ -1,20 +1,21 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.10-P1/bind-9.9.10-P1.tar.gz +url="http://ftp.isc.org/isc/bind/9.9.13-P1/bind-9.9.13-P1.tar.gz http://www.internic.net/domain/named.root" verify= digest= +branch= commitid= pkgbase=bind -vers=9.9.10_P1 +vers=9.9.13_P1 arch=`uname -m` build=P2 -src=$pkgbase-9.9.10-P1 +src=$pkgbase-9.9.13-P1 patchfiles="" OPT_CONFIG="--with-libxml2=no --with-libtool" -DOCS="CHANGES COPYRIGHT FAQ HISTORY README" -template=20170415 +DOCS="README CHANGES OPTIONS FAQ.xml HISTORY COPYRIGHT CONTRIBUTING" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -163,8 +164,8 @@ chown root.root $P/var/named/named.root.new touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -208,7 +209,7 @@ echo "New root hint file has been installed." fi EOF - touch -t `date '+%m%d0900'` $P/install/doinst.sh + TZ=UTC touch -t `date -u '+%m%d0000'` $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 usr/$libdir | tail -n+2` @@ -221,7 +222,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/network.txz/old/wpa_supplicant-20170110/PlamoBuild.wpa_supplicant-2.5 2017-01-10 10:50:21.000000000 +0900 +++ plamo/01_minimum/network.txz/wpa_supplicant/PlamoBuild.wpa_supplicant-2.5 2017-06-18 09:50:34.000000000 +0900 @@ -2,239 +2,42 @@ ###################################################################### url="http://hostap.epitest.fi/releases/wpa_supplicant-2.5.tar.gz" +verify= +digest= +commitid= pkgbase=wpa_supplicant vers=2.5 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="`echo wpa_supplicant/{README-HS20,eap_testing.txt,README-Windows.txt}` `echo wpa_supplicant/{ChangeLog,README-WPS,todo.txt,README-P2P,README}` CONTRIBUTIONS COPYING README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p wpa_supplicant/{defconfig,.config} cat <<- "EOF" | patch wpa_supplicant/.config @@ -269,12 +72,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/wpa_supplicant - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -287,17 +84,12 @@ cd ${B[$i]}/wpa_supplicant if [ -f Makefile ] ; then make + #make wpa_gui-qt4 fi done - #make wpa_gui-qt4 fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -391,28 +183,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/wpa_supplicant/examples $docdir/$src/wpa_supplicant chmod -R g-w $docdir/$src/wpa_supplicant/examples chown -R root.root $docdir/$src/wpa_supplicant/examples touch -r $S $docdir/$src/wpa_supplicant - convert + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh mv etc/wpa_supplicant.conf.new /tmp @@ -434,6 +210,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/wget-20170616/PlamoBuild.wget-1.19.1 2017-06-16 09:49:53.000000000 +0900 +++ plamo/01_minimum/network.txz/wget/PlamoBuild.wget-1.19.2 2018-12-27 12:50:00.000000000 +0900 @@ -1,21 +1,21 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/wget/wget-1.19.1.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/wget/CVE-2017-6508.patch.gz" +url="http://ftp.gnu.org/gnu/wget/wget-1.19.2.tar.gz" verify= digest= +branch= commitid= pkgbase=wget -vers=1.19.1 +vers=1.19.2 arch=`uname -m` build=P2 src=$pkgbase-$vers -patchfiles="CVE-2017-6508.patch.gz" +patchfiles="" OPT_CONFIG="" -DOCS="ChangeLog README NEWS ABOUT-NLS MAILING-LIST INSTALL AUTHORS - COPYING" -template=20170415 +DOCS="MAILING-LIST README COPYING INSTALL NEWS ABOUT-NLS ChangeLog + AUTHORS" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -68,8 +68,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -79,7 +79,7 @@ tar rvpf $pkg.tar -C $P etc/wgetrc 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 - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/network.txz/old/bind-20181227/PlamoBuild.bind-9.9.13_P1 2018-12-27 11:43:18.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.12.3_P4 2019-03-13 11:10:23.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.9.13-P1/bind-9.9.13-P1.tar.gz +url="http://ftp.isc.org/isc/bind/9.12.3-P4/bind-9.12.3-P4.tar.gz http://www.internic.net/domain/named.root" verify= digest= branch= commitid= pkgbase=bind -vers=9.9.13_P1 +vers=9.12.3_P4 arch=`uname -m` build=P2 -src=$pkgbase-9.9.13-P1 +src=$pkgbase-9.12.3-P4 patchfiles="" -OPT_CONFIG="--with-libxml2=no --with-libtool" -DOCS="README CHANGES OPTIONS FAQ.xml HISTORY COPYRIGHT CONTRIBUTING" +OPT_CONFIG="--with-libtool --with-libxml2=no" +DOCS="HISTORY LICENSE CONTRIBUTING CHANGES OPTIONS README COPYRIGHT" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -217,7 +217,6 @@ tar rvpf $pkg.tar -C $P `cd $P ; find etc | tail -n+2` tar rvpf $pkg.tar -C $P var/named 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 --- plamo/01_minimum/network.txz/old/bind-20190313/PlamoBuild.bind-9.12.3_P4 2019-03-13 11:10:23.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.12.4_P1 2019-06-07 04:54:40.000000000 +0900 @@ -1,19 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.12.3-P4/bind-9.12.3-P4.tar.gz +url="http://ftp.isc.org/isc/bind/9.12.4-P1/bind-9.12.4-P1.tar.gz + https://gitlab.isc.org/isc-projects/bind9/merge_requests/1879.patch http://www.internic.net/domain/named.root" verify= digest= branch= commitid= pkgbase=bind -vers=9.12.3_P4 +vers=9.12.4_P1 arch=`uname -m` build=P2 -src=$pkgbase-9.12.3-P4 -patchfiles="" -OPT_CONFIG="--with-libtool --with-libxml2=no" +src=$pkgbase-9.12.4-P1 +patchfiles="1879.patch" +OPT_CONFIG="--without-python --with-libtool --without-libxml2" DOCS="HISTORY LICENSE CONTRIBUTING CHANGES OPTIONS README COPYRIGHT" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin --- plamo/01_minimum/network.txz/old/procmail-20160929/PlamoBuild.procmail-3.22 2016-09-29 01:04:34.000000000 +0900 +++ plamo/01_minimum/network.txz/procmail/PlamoBuild.procmail-3.22 2017-06-16 08:03:08.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://www.ring.gr.jp/archives/net/mail/procmail/procmail-3.22.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/procmail/procmail-3.22-glibc-2.10.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/procmail/CVE-2014-3618.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/procmail/procmail-3.22-glibc-2.10.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/procmail/CVE-2014-3618.patch.gz" +verify= +digest= +commitid= pkgbase=procmail vers=3.22 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="procmail-3.22-glibc-2.10.patch.gz CVE-2014-3618.patch.gz" OPT_CONFIG="" DOCS="Artistic COPYING FAQ FEATURES HISTORY INSTALL KNOWN_BUGS README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,30 +74,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | 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 usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/bind-20190607/PlamoBuild.bind-9.12.4_P1 2019-06-07 04:54:40.000000000 +0900 +++ plamo/01_minimum/network.txz/bind/PlamoBuild.bind-9.12.4_P2 2019-06-21 21:37:50.000000000 +0900 @@ -1,7 +1,7 @@ #!/bin/sh ###################################################################### -url="http://ftp.isc.org/isc/bind/9.12.4-P1/bind-9.12.4-P1.tar.gz +url="http://ftp.isc.org/isc/bind/9.12.4-P2/bind-9.12.4-P2.tar.gz https://gitlab.isc.org/isc-projects/bind9/merge_requests/1879.patch http://www.internic.net/domain/named.root" verify= @@ -9,10 +9,10 @@ branch= commitid= pkgbase=bind -vers=9.12.4_P1 +vers=9.12.4_P2 arch=`uname -m` build=P2 -src=$pkgbase-9.12.4-P1 +src=$pkgbase-9.12.4-P2 patchfiles="1879.patch" OPT_CONFIG="--without-python --with-libtool --without-libxml2" DOCS="HISTORY LICENSE CONTRIBUTING CHANGES OPTIONS README COPYRIGHT" --- plamo/01_minimum/network.txz/old/bridge_utils-20160806/PlamoBuild.bridge_utils-1.5 2016-08-06 09:15:41.000000000 +0900 +++ plamo/01_minimum/network.txz/bridge_utils/PlamoBuild.bridge_utils-1.5 2017-06-13 21:47:53.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="http://downloads.sourceforge.net/bridge/bridge-utils-1.5.tar.gz" +verify= +digest= +commitid= pkgbase=bridge_utils vers=1.5 arch=`uname -m` -build=P2 +build=P3 src=bridge-utils-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog README THANKS TODO `echo doc/{FAQ,FIREWALL,HOWTO,PROJECTS,SMPNOTES,WISHLIST}`" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B autoreconf for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,29 +72,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/curl-20170613/PlamoBuild.curl-7.54.0 2017-06-13 22:29:10.000000000 +0900 +++ plamo/01_minimum/network.txz/curl/PlamoBuild.curl-7.60.0 2018-12-27 12:37:46.000000000 +0900 @@ -1,12 +1,13 @@ #!/bin/sh ###################################################################### -url="http://curl.haxx.se/download/curl-7.54.0.tar.bz2" +url="http://curl.haxx.se/download/curl-7.60.0.tar.bz2" verify= digest= +branch= commitid= pkgbase=curl -vers=7.54.0 +vers=7.60.0 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -15,14 +16,14 @@ --enable-threaded-resolver --with-gssapi-includes=/usr/heimdal/include --without-librtmp --without-nghttp2" DOCS="`echo docs/{VERSIONS,MAIL-ETIQUETTE,HTTP-COOKIES.md,RELEASE-PROCEDURE}` - `echo docs/{BUGS,SSL-PROBLEMS.md,CODE_STYLE.md,KNOWN_BUGS,HTTP2.md}` + `echo docs/{BUGS,{SSL-PROBLEMS,CODE_STYLE}.md,KNOWN_BUGS,HTTP2.md}` `echo docs/{README.win32,{INTERNALS,INSTALL,LICENSE-MIXING}.md,THANKS}` - `echo docs/{README.{md,netware},TheArtOfHttpScripting,CIPHERS.md}` - `echo docs/{{CHECKSRC,BINDINGS}.md,FAQ,INSTALL,ROADMAP.md,FEATURES}` - `echo docs/{INSTALL.cmake,MANUAL,CODE_OF_CONDUCT.md,RESOURCES}` - `echo docs/{README.cmake,SECURITY.md,TODO,{CONTRIBUTE,HISTORY}.md}` - docs/SSLCERTS.md README CHANGES RELEASE-NOTES COPYING" -template=20170415 + `echo docs/{{README,HELP-US}.md,README.netware,TheArtOfHttpScripting}` + `echo docs/{{CIPHERS,CHECKSRC,BINDINGS,SECURITY-PROCESS}.md,FAQ,INSTALL}` + `echo docs/{ROADMAP.md,FEATURES,INSTALL.cmake,MANUAL,CODE_OF_CONDUCT.md}` + `echo docs/{RESOURCES,README.cmake,TODO,{CONTRIBUTE,HISTORY,SSLCERTS}.md}` + README CHANGES RELEASE-NOTES COPYING" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -76,8 +77,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -90,7 +91,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/network.txz/old/cyrus_sasl-20160806/PlamoBuild.cyrus_sasl-2.1.23 2016-08-06 16:57:10.000000000 +0900 +++ plamo/01_minimum/network.txz/cyrus_sasl/PlamoBuild.cyrus_sasl-2.1.23 2017-06-14 06:29:43.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.23.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-blfs.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-64bit-plugindir.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-blfs.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-64bit-plugindir.patch.gz" +verify= +digest= +commitid= pkgbase=cyrus_sasl vers=2.1.23 arch=`uname -m` -build=P4 +build=P5 src=cyrus-sasl-$vers patchfiles="cyrus-sasl-blfs.patch.gz cyrus-sasl-64bit-plugindir.patch.gz" OPT_CONFIG="--with-dbpath=/var/lib/sasl/sasldb2 --with-saslauthd=/var/run/saslauthd" DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -328,24 +120,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/sasl2 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links touch -t `date '+%m%d0900'` $P/usr/$libdir/sasl2 tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 | tail -n+2` @@ -360,6 +136,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/dnsmasq-20160925/PlamoBuild.dnsmasq-2.76 2016-09-25 07:54:28.000000000 +0900 +++ plamo/01_minimum/network.txz/dnsmasq/PlamoBuild.dnsmasq-2.76 2017-06-14 07:09:26.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.76.tar.gz" +verify= +digest= +commitid= pkgbase=dnsmasq vers=2.76 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="FAQ COPYING setup.html CHANGELOG COPYING-v3 CHANGELOG.archive doc.html" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -314,24 +106,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh mv etc/dnsmasq.conf.new /tmp @@ -352,6 +128,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/ethtool-20160923a/PlamoBuild.ethtool-4.6 2016-09-23 16:36:42.000000000 +0900 +++ plamo/01_minimum/network.txz/ethtool/PlamoBuild.ethtool-4.6 2017-06-14 07:13:08.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="https://www.kernel.org/pub/software/network/ethtool/ethtool-4.6.tar.xz" +verify= +digest= +commitid= pkgbase=ethtool vers=4.6 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS NEWS INSTALL COPYING README ChangeLog LICENSE" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/fetchmail-20160920/PlamoBuild.fetchmail-6.3.26 2016-09-20 10:57:00.000000000 +0900 +++ plamo/01_minimum/network.txz/fetchmail/PlamoBuild.fetchmail-6.3.26 2017-06-20 07:13:55.000000000 +0900 @@ -1,11 +1,14 @@ #!/bin/sh ###################################################################### -url="http://download.sourceforge.net/fetchmail/fetchmail-6.3.26.tar.xz" +url="http://downloads.sourceforge.net/fetchmail/fetchmail-6.3.26.tar.xz" +verify= +digest= +commitid= pkgbase=fetchmail vers=6.3.26 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--with-ssl" @@ -18,237 +21,31 @@ fetchmail-SA-2006-01.txt README.SSL fetchmail-SA-2009-01.txt fetchmail-SA-2008-01.txt README README.NTLM fetchmail-SA-2010-01.txt README.packaging NEWS OLDNEWS COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -265,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -285,24 +77,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/python*/site-packages | tail -n+2` @@ -311,6 +87,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/heimdal-20170614/PlamoBuild.heimdal-1.5.3 2017-06-14 07:23:20.000000000 +0900 +++ plamo/01_minimum/network.txz/heimdal/PlamoBuild.heimdal-1.5.3 2017-10-29 17:04:30.000000000 +0900 @@ -5,17 +5,18 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/heimdal/heimdal-1.5.3-texinfo_fix.patch" verify= digest= +branch= commitid= pkgbase=heimdal vers=1.5.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="heimdal-1.5.3-texinfo_fix.patch" OPT_CONFIG="--prefix=/usr/heimdal --infodir=/usr/share/info --mandir=/usr/share/man --with-sqlite3=/usr LIBS=-pthread" DOCS="ChangeLog* LICENSE NEWS README TODO" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -97,15 +98,15 @@ EOF cat <<- "EOF" > $P/etc/profile.d/heimdal.csh # add /usr/heimdal/bin to $PATH for tcsh - set heimdal=/usr/heimdal + set heimdal = /usr/heimdal if ($?PATH) then - setenv PATH $PATH:$heimdal/bin + set path = ( $path $heimdal/bin ) else - setenv PATH /bin:/usr/bin:$heimdal/bin + set path = ( /bin /usr/bin $heimdal/bin ) endif if (`id -u` == 0) then - setenv PATH $PATH:$heimdal/sbin + set path = ( $path $heimdal/sbin ) endif EOF install -d $P/etc/rc.d/init.d --- plamo/01_minimum/network.txz/old/hostapd-20161001/PlamoBuild.hostapd-2.5 2016-10-01 20:43:06.000000000 +0900 +++ plamo/01_minimum/network.txz/hostapd/PlamoBuild.hostapd-2.5 2017-06-14 07:51:32.000000000 +0900 @@ -2,238 +2,41 @@ ###################################################################### url="http://hostap.epitest.fi/releases/hostapd-2.5.tar.gz" +verify= +digest= +commitid= pkgbase=hostapd vers=2.5 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="CONTRIBUTIONS COPYING README `echo hostapd/{ChangeLog,README{,-WPS},{eap_testing,hlr_auc_gw}.txt}`" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p hostapd/{defconfig,.config} cat <<- "EOF" | patch hostapd/.config @@ -256,12 +59,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/hostapd - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -278,12 +75,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -361,29 +153,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir install -d $docdir/$src/hostapd/examples cp -p $S/hostapd/hostapd.[a-z]* $docdir/$src/hostapd/examples chmod -R g-w $docdir/$src/hostapd/examples chown -R root.root $docdir/$src/hostapd/examples touch -r $S $docdir/$src/hostapd{/examples,} - convert + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh hostapd_config() { @@ -408,6 +184,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/iptables-20160923/PlamoBuild.iptables-1.4.21 2016-09-23 20:58:58.000000000 +0900 +++ plamo/01_minimum/network.txz/iptables/PlamoBuild.iptables-1.4.21 2017-06-14 07:57:31.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://ftp.netfilter.org/pub/iptables/iptables-1.4.21.tar.bz2" +verify= +digest= +commitid= pkgbase=iptables vers=1.4.21 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-libipq" DOCS="INSTALL INCOMPATIBILITIES COPYING COMMIT_NOTES" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ compress strip_libdir $P/usr/$libdir/xtables touch -t `date '+%m%d0900'` $P/usr/$libdir/xtables - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links 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 \ @@ -317,6 +93,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/iw-20160923/PlamoBuild.iw-4.7 2016-09-23 21:11:34.000000000 +0900 +++ plamo/01_minimum/network.txz/iw/PlamoBuild.iw-4.7 2017-06-14 08:01:10.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="https://www.kernel.org/pub/software/network/iw/iw-4.7.tar.xz" +verify= +digest= +commitid= pkgbase=iw vers=4.7 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="CONTRIBUTING COPYING README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/libidn-20160923/PlamoBuild.libidn-1.33 2016-09-23 21:26:08.000000000 +0900 +++ plamo/01_minimum/network.txz/libidn/PlamoBuild.libidn-1.33 2017-06-14 08:26:35.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://ftp.gnu.org/gnu/libidn/libidn-1.33.tar.gz" +verify= +digest= +commitid= pkgbase=libidn vers=1.33 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS FAQ COPYING.LESSERv2 THANKS ABOUT-NLS README AUTHORS COPYINGv2 TODO COPYING.LESSERv3 COPYING INSTALL COPYINGv3 HACKING ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -310,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/libiec61883-20160923/PlamoBuild.libiec61883-1.2.0 2016-09-23 21:35:52.000000000 +0900 +++ plamo/01_minimum/network.txz/libiec61883/PlamoBuild.libiec61883-1.2.0 2017-06-14 08:31:29.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="https://www.kernel.org/pub/linux/libs/ieee1394/libiec61883-1.2.0.tar.xz" +verify= +digest= +commitid= pkgbase=libiec61883 vers=1.2.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -304,6 +80,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/libnl3-20160923a/PlamoBuild.libnl3-3.2.25 2016-09-23 23:56:11.000000000 +0900 +++ plamo/01_minimum/network.txz/libnl3/PlamoBuild.libnl3-3.2.25 2017-06-14 08:35:38.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz" +verify= +digest= +commitid= pkgbase=libnl3 vers=3.2.25 arch=`uname -m` -build=P1 +build=P2 src=libnl-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ strip_libdir $P/usr/$libdir/libnl/cli/qdisc strip_libdir $P/usr/$libdir/libnl/cli/cls touch -t `date '+%m%d0900'` $P/usr/$libdir/libnl/cli/{qdisc,cls} - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 -name libnl*` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` @@ -308,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/libpcap-20170301/PlamoBuild.libpcap-1.8.1 2017-03-01 08:16:05.000000000 +0900 +++ plamo/01_minimum/network.txz/libpcap/PlamoBuild.libpcap-1.8.1 2017-06-14 08:41:34.000000000 +0900 @@ -2,249 +2,44 @@ ###################################################################### url="http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz" +verify= +digest= +commitid= pkgbase=libpcap vers=1.8.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README.sita README.tru64 CHANGES README.hpux README pcap-sita.html README.macosx README.dag INSTALL.txt README.linux TODO README.septel VERSION LICENSE CREDITS README.aix README.Win32" -template=20170204 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` @@ -324,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/libraw1394-20160924/PlamoBuild.libraw1394-2.1.2 2016-09-24 06:39:39.000000000 +0900 +++ plamo/01_minimum/network.txz/libraw1394/PlamoBuild.libraw1394-2.1.2 2017-06-14 08:45:04.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="https://www.kernel.org/pub/linux/libs/ieee1394/libraw1394-2.1.2.tar.xz" +verify= +digest= +commitid= pkgbase=libraw1394 vers=2.1.2 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING.LIB ChangeLog INSTALL NEWS README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/libssh-20160924/PlamoBuild.libssh-0.7.3 2016-09-24 06:53:59.000000000 +0900 +++ plamo/01_minimum/network.txz/libssh/PlamoBuild.libssh-0.7.3 2017-06-14 08:54:54.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="https://red.libssh.org/attachments/download/195/libssh-0.7.3.tar.xz" +verify= +digest= +commitid= pkgbase=libssh vers=0.7.3 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="BSD COPYING AUTHORS INSTALL README README.CodingStyle SubmittingPatches ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; mkdir ${B[$i]} done + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,25 +72,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/cmake/libssh tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 -name libssh*` @@ -307,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/libssh2-20160924a/PlamoBuild.libssh2-1.7.0 2016-09-24 07:29:19.000000000 +0900 +++ plamo/01_minimum/network.txz/libssh2/PlamoBuild.libssh2-1.7.0 2017-06-14 09:00:05.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="https://www.libssh2.org/download/libssh2-1.7.0.tar.gz" +verify= +digest= +commitid= pkgbase=libssh2 vers=1.7.0 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="`echo docs/{BINDINGS,HACKING,INSTALL_CMAKE,AUTHORS,TODO}` `echo docs/{INSTALL_AUTOTOOLS,HACKING.CRYPTO}` README RELEASE-NOTES ChangeLog COPYING NEWS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/mailx-20160925/PlamoBuild.mailx-12.5 2016-09-25 07:50:47.000000000 +0900 +++ plamo/01_minimum/network.txz/mailx/PlamoBuild.mailx-12.5 2017-06-15 15:19:53.000000000 +0900 @@ -2,21 +2,24 @@ ###################################################################### url="http://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/nail-11.25-config.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/mailx-12.3-pager.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/mailx-12.5-collect.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/mailx-12.5-fname-null.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/mailx-12.5-lzw.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/mailx-12.5-man-page-fixes.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/mailx-12.5-usage.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/0001-outof-Introduce-expandaddr-flag.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/0002-unpack-Disable-option-processing-for-email-addresses.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/0003-fio.c-Unconditionally-require-wordexp-support.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/mailx/0004-globname-Invoke-wordexp-with-WRDE_NOCMD-CVE-2004-277.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/nail-11.25-config.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/mailx-12.3-pager.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/mailx-12.5-collect.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/mailx-12.5-fname-null.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/mailx-12.5-lzw.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/mailx-12.5-man-page-fixes.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/mailx-12.5-usage.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/0001-outof-Introduce-expandaddr-flag.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/0002-unpack-Disable-option-processing-for-email-addresses.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/0003-fio.c-Unconditionally-require-wordexp-support.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/mailx/0004-globname-Invoke-wordexp-with-WRDE_NOCMD-CVE-2004-277.patch.gz" +verify= +digest= +commitid= pkgbase=mailx vers=12.5 arch=`uname -m` -build=P2 +build=P3 src=heirloom-mailx-$vers patchfiles="nail-11.25-config.patch.gz mailx-12.3-pager.patch.gz mailx-12.5-collect.patch.gz mailx-12.5-fname-null.patch.gz @@ -28,237 +31,31 @@ 0004-globname-Invoke-wordexp-with-WRDE_NOCMD-CVE-2004-277.patch.gz" OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog INSTALL README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -275,12 +72,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -295,30 +87,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P etc/nail.rc 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/metamail-20160925/PlamoBuild.metamail-2.7 2016-09-25 10:11:43.000000000 +0900 +++ plamo/01_minimum/network.txz/metamail/PlamoBuild.metamail-2.7 2017-06-15 15:27:12.000000000 +0900 @@ -3,249 +3,46 @@ ###################################################################### url="http://old-releases.ubuntu.com/ubuntu/pool/universe/m/metamail/metamail_2.7.orig.tar.gz http://old-releases.ubuntu.com/ubuntu/pool/universe/m/metamail/metamail_2.7-54.diff.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/metamail/metamail-2.7-uue.c_getline.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/metamail/metamail-2.7-uue.c_getline.patch.gz" +verify= +digest= +commitid= pkgbase=metamail vers=2.7 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers.orig patchfiles="metamail_2.7-54.diff.gz metamail-2.7-uue.c_getline.patch.gz" OPT_CONFIG="" DOCS="CREDITS README mailers.txt" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B chmod 755 bootstrap configure ./bootstrap for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,24 +78,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/metamail @@ -313,6 +89,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/ncftp-20160925/PlamoBuild.ncftp-3.2.5 2016-09-25 10:50:18.000000000 +0900 +++ plamo/01_minimum/network.txz/ncftp/PlamoBuild.ncftp-3.2.5 2017-06-15 15:38:23.000000000 +0900 @@ -1,11 +1,14 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.ncftpd.com/ncftp/ncftp-3.2.5-src.tar.bz2" +url="ftp://ftp.ncftp.com/ncftp/older_versions/ncftp-3.2.5-src.tar.gz" +verify= +digest= +commitid= pkgbase=ncftp vers=3.2.5 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -13,237 +16,31 @@ `echo doc/{Location_of_Programs_is_C_Windows,READLINE}.txt` `echo doc/{readme_{ncftpget_,}windows,what_changed_between_v2_v3}.txt` DONATE.txt README.txt" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,29 +72,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/ntp-20170116/PlamoBuild.ntp-4.2.8p9 2017-01-16 20:53:07.000000000 +0900 +++ plamo/01_minimum/network.txz/ntp/PlamoBuild.ntp-4.2.8p10 2017-06-17 08:43:53.000000000 +0900 @@ -1,255 +1,51 @@ #!/bin/sh ###################################################################### -url="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p9.tar.gz" +url="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p10.tar.gz" +verify= +digest= +commitid= pkgbase=ntp -vers=4.2.8p9 +vers=4.2.8p10 arch=`uname -m` -build=P3 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="NEWS WHERE-TO-START COPYRIGHT README.hackers CommitLog-4.1.0 - README.pullrequests readme.y2kfixes CommitLog README ChangeLog - README.leapsmear README.versions NOTES.y2kfixes TODO README.bk - INSTALL README.refclocks README.patches" -template=20161020 +DOCS="README.pullrequests ChangeLog README.patches readme.y2kfixes + CommitLog-4.1.0 COPYRIGHT NOTES.y2kfixes README CommitLog + README.leapsmear NEWS INSTALL README.versions WHERE-TO-START TODO + README.hackers README.bk README.refclocks" +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + CFLAGS="-g -O2 -fPIC" fi done fi @@ -262,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -354,47 +145,21 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/sntp $docdir/$src mv $docdir/ntp $docdir/$src/html - mv $docdir/$src/{sntp,{README,ChangeLog,README.{leapsmear,versions}}.gz} $C - mv $docdir/$src/{NOTES.y2kfixes.gz,html,{TODO,README.bk,INSTALL}.gz} $C - mv $docdir/$src/{README.{refclocks,patches},$myname,$spec}.gz $C - mv $C/{sntp,{README,ChangeLog,README.{leapsmear,versions}}.gz} $docdir/$src - mv $C/{NOTES.y2kfixes.gz,html,{TODO,README.bk,INSTALL}.gz} $docdir/$src - mv $C/{README.{refclocks,patches},$myname,$spec}.gz $docdir/$src + mv $docdir/$src/{sntp,{readme.y2kfixes,CommitLog-4.1.0,COPYRIGHT}.gz} $C + mv $docdir/$src/{NOTES.y2kfixes,README,CommitLog,README.leapsmear}.gz $C + mv $docdir/$src/{NEWS,INSTALL,README.versions,WHERE-TO-START,TODO}.gz $C + mv $docdir/$src/{README.{hackers,bk}.gz,html,README.refclocks.gz} $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C + mv $C/{sntp,{readme.y2kfixes,CommitLog-4.1.0,COPYRIGHT}.gz} $docdir/$src + mv $C/{NOTES.y2kfixes,README,CommitLog,README.leapsmear}.gz $docdir/$src + mv $C/{NEWS,INSTALL,README.versions,WHERE-TO-START,TODO}.gz $docdir/$src + mv $C/{README.{hackers,bk}.gz,html,README.refclocks.gz} $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh mv etc/ntp.conf.new /tmp @@ -416,6 +181,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/ntrack-20170118/PlamoBuild.ntrack-016 2017-01-18 10:07:29.000000000 +0900 +++ plamo/01_minimum/network.txz/ntrack/PlamoBuild.ntrack-016 2017-06-15 23:13:01.000000000 +0900 @@ -2,239 +2,40 @@ ###################################################################### url="http://launchpad.net/ntrack/main/016/+download/ntrack-016.tar.gz" +verify= +digest= +commitid= pkgbase=ntrack vers=016 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README COPYING AUTHORS COPYING.LESSER NEWS ChangeLog INSTALL" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p modules/ntrack-libnl.c{,.orig} cat <<- "EOF" | patch modules/ntrack-libnl.c @@ -245,16 +46,12 @@ > if ((diff_bits = (nl_object_get_id_attrs(nl_object_alloc(&route_obj_ops)) > | ROUTE_ATTR_OIF | ROUTE_ATTR_GATEWAY) & EOF - cp -p modules/Makefile.in{,.orig} - sed -i '/-Werror/d' modules/Makefile.in + for i in modules glib gobject ; do + cp -p $i/Makefile.in{,.orig} + sed -i '/-Werror/d' $i/Makefile.in + done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -271,12 +68,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -295,38 +87,8 @@ strip_libdir $P/usr/$libdir/python*/site-packages touch -t `date '+%m%d0900'` \ $P/usr/$libdir/{ntrack/modules,python*/site-packages} - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir -maxdepth 1 -name libntrack.*` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` @@ -342,6 +104,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/parprouted-20170615/PlamoBuild.parprouted-0.7 2017-06-15 23:17:58.000000000 +0900 +++ plamo/01_minimum/network.txz/parprouted/PlamoBuild.parprouted-0.7 2017-06-24 15:08:18.000000000 +0900 @@ -37,7 +37,7 @@ done apply_patches cd $B - cp -p Makefile Makefile.orig + cp -p Makefile{,.orig} cat <<- "EOF" | patch Makefile 16,17c16,19 < install parprouted /usr/local/sbin --- plamo/01_minimum/network.txz/old/postfix-20161001/PlamoBuild.postfix-2.11.8 2016-10-01 22:29:30.000000000 +0900 +++ plamo/01_minimum/network.txz/postfix/PlamoBuild.postfix-2.11.9 2017-06-16 07:06:20.000000000 +0900 @@ -1,9 +1,12 @@ #!/bin/sh ###################################################################### -url="http://mirror.postfix.jp/postfix-release/official/postfix-2.11.8.tar.gz" +url="http://ftp.unicamp.br/pub/postfix/official/postfix-2.11.9.tar.gz" +verify= +digest= +commitid= pkgbase=postfix -vers=2.11.8 +vers=2.11.9 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -11,237 +14,31 @@ OPT_CONFIG="" DOCS="AAAREADME COMPATIBILITY COPYRIGHT HISTORY INSTALL IPv6-ChangeLog LICENSE PORTING RELEASE_NOTES* TLS_* US_PATENT_6321267" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -267,12 +64,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -339,31 +131,15 @@ compress strip_bindir $P/usr/libexec/postfix touch -t `date '+%m%d0900'` $P/usr/libexec/postfix - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/postfix/html $docdir/$src mv $docdir/postfix/README_FILES $docdir/$src mv $docdir/$src/{README_FILES,{RELEASE_NOTES*,TLS_*}.gz} $C - mv $docdir/$src/{US_PATENT_6321267.gz,html,$myname.gz} $C + mv $docdir/$src/{US_PATENT_6321267.gz,html,{$func,$myname,$spec}.gz} $C mv $C/{README_FILES,{RELEASE_NOTES*,TLS_*}.gz} $docdir/$src - mv $C/{US_PATENT_6321267.gz,html,$myname.gz} $docdir/$src + mv $C/{US_PATENT_6321267.gz,html,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links prune_symlink $P/usr/lib prune_symlink $P/etc/rc.d/init.d cat <<- "EOF" >> $P/install/doinst.sh @@ -420,6 +196,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/ppp-20170616/PlamoBuild.ppp-2.4.7 2017-06-16 07:52:06.000000000 +0900 +++ plamo/01_minimum/network.txz/ppp/PlamoBuild.ppp-2.4.7 2017-06-24 15:26:13.000000000 +0900 @@ -39,13 +39,16 @@ done apply_patches cd $B - if [ "$arch" == "x86_64" ] ; then - sed -i '/DESTDIR/s@lib@&64@g' pppd/pathnames.h - find . -name "Makefile.linux" -exec sed -i 's@$(DESTDIR)/lib@&64@g' {} \; - fi + cp -p pppd/Makefile.linux{,.orig} sed -i -e 's@#\(USE_PAM\)@\1@g' -e 's@#\(CBCP\)@\1@g' \ -e 's@pppusers@tty@g' pppd/Makefile.linux + cp -p pppd/plugins/pppol2tp/Makefile.linux{,.orig} sed -i 's/@DESTDIR@/$(INSTROOT)&/g' pppd/plugins/pppol2tp/Makefile.linux + if [ $arch == x86_64 ] ; then + cp -p pppd/pathnames.h{,.orig} + sed -i '/DESTDIR/s@lib@&64@g' pppd/pathnames.h + find . -name "Makefile.linux" -exec sed -i 's@$(DESTDIR)/lib@&64@g' {} \; + fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/network.txz/old/pptpd-20160928/PlamoBuild.pptpd-1.4.0 2016-09-28 16:04:12.000000000 +0900 +++ plamo/01_minimum/network.txz/pptpd/PlamoBuild.pptpd-1.4.0 2017-06-16 07:58:20.000000000 +0900 @@ -2,249 +2,47 @@ ###################################################################### url="http://downloads.sourceforge.net/poptop/pptpd-1.4.0.tar.gz" +verify= +digest= +commitid= pkgbase=pptpd vers=1.4.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-bcrelay --with-libwrap" DOCS="NEWS COPYING AUTHORS README.inetd README.slirp README.bcrelay README.cvs TODO README.portslave README ChangeLog INSTALL README.logwtmp" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B + cp -p plugins/Makefile{,.orig} sed -i 's@$(LIBDIR)@$(DESTDIR)&@g' plugins/Makefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -283,24 +76,8 @@ compress strip_libdir $P/usr/$libdir/pptpd touch -t `date '+%m%d0900'` $P/usr/$libdir/pptpd - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/pptpd tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man5 | tail -n+2` @@ -308,6 +85,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/procmail-20170616/PlamoBuild.procmail-3.22 2017-06-16 08:03:08.000000000 +0900 +++ plamo/01_minimum/network.txz/procmail/PlamoBuild.procmail-3.22 2020-05-05 07:49:35.000000000 +0900 @@ -6,16 +6,17 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/procmail/CVE-2014-3618.patch.gz" verify= digest= +branch= commitid= pkgbase=procmail vers=3.22 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="procmail-3.22-glibc-2.10.patch.gz CVE-2014-3618.patch.gz" OPT_CONFIG="" DOCS="Artistic COPYING FAQ FEATURES HISTORY INSTALL KNOWN_BUGS README" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -68,11 +69,11 @@ fi done chgrp mail $P/usr/bin/{procmail,lockfile} - chmod +s $P/usr/bin/{procmail,lockfile} + chmod +s $P/usr/bin/procmail ; chmod g+s $P/usr/bin/lockfile touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -80,7 +81,7 @@ 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/man5 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/01_minimum/network.txz/old/rsync-20160929/PlamoBuild.rsync-3.1.2 2016-09-29 10:07:22.000000000 +0900 +++ plamo/01_minimum/network.txz/rsync/PlamoBuild.rsync-3.1.2 2017-06-16 08:16:58.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://rsync.samba.org/ftp/rsync/src/rsync-3.1.2.tar.gz" +verify= +digest= +commitid= pkgbase=rsync vers=3.1.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="TODO INSTALL COPYING rsyncsh.txt csprotocol.txt rsync3.txt OLDNEWS NEWS README tech_report.tex" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,30 +70,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | 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 usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/setserial-20160929/PlamoBuild.setserial-2.17 2016-09-29 10:37:31.000000000 +0900 +++ plamo/01_minimum/network.txz/setserial/PlamoBuild.setserial-2.17 2017-06-16 08:22:03.000000000 +0900 @@ -2,237 +2,40 @@ ###################################################################### url="http://repository.timesys.com/buildsources/s/setserial/setserial-2.17/setserial-2.17.tar.gz" +verify= +digest= +commitid= pkgbase=setserial vers=2.17 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README Documentation/byterunner-setup" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile.in{,.orig} cat <<- "EOF" | patch Makefile.in @@ -246,12 +49,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -268,12 +65,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -288,29 +80,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/socat-20160929a/PlamoBuild.socat-1.7.3.1 2016-09-29 11:20:15.000000000 +0900 +++ plamo/01_minimum/network.txz/socat/PlamoBuild.socat-1.7.3.1 2017-06-16 08:28:05.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://www.dest-unreach.org/socat/download/socat-1.7.3.1.tar.bz2" +verify= +digest= +commitid= pkgbase=socat vers=1.7.3.1 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="FAQ DEVELOPMENT PORTING COPYING.OpenSSL FILES README.FIPS README CHANGES SECURITY BUGREPORTS COPYING EXAMPLES" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,29 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/stunnel-20160929a/PlamoBuild.stunnel-5.36 2016-09-29 13:04:18.000000000 +0900 +++ plamo/01_minimum/network.txz/stunnel/PlamoBuild.stunnel-5.36 2017-06-16 09:00:36.000000000 +0900 @@ -1,247 +1,44 @@ #!/bin/sh ###################################################################### -url="https://www.stunnel.org/downloads/stunnel-5.36.tar.gz" +url="ftp://ftp.stunnel.org/stunnel/archive/5.x/stunnel-5.36.tar.gz" +verify= +digest= +commitid= pkgbase=stunnel vers=5.36 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README ChangeLog COPYING CREDITS INSTALL.FIPS COPYRIGHT.GPL AUTHORS TODO INSTALL.WCE NEWS INSTALL.W32 INSTALL BUGS PORTS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,33 +72,19 @@ compress strip_libdir $P/usr/$libdir/stunnel touch -t `date '+%m%d0900'` $P/usr/$libdir/stunnel - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mkdir $docdir/$src/doc mv $docdir/stunnel/stunnel{,.pl}.html $docdir/$src/doc touch -t `date '+%m%d0900'` $docdir/$src/doc mv $docdir/stunnel/examples $docdir/$src mv $docdir/$src/{doc,{COPYRIGHT.GPL,AUTHORS,TODO,INSTALL.WCE,NEWS}.gz} $C - mv $docdir/$src/{examples,{INSTALL.W32,INSTALL,BUGS,PORTS,$myname}.gz} $C + mv $docdir/$src/{examples,{INSTALL.W32,INSTALL,BUGS,PORTS}.gz} $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{doc,{COPYRIGHT.GPL,AUTHORS,TODO,INSTALL.WCE,NEWS}.gz} $docdir/$src - mv $C/{examples,{INSTALL.W32,INSTALL,BUGS,PORTS,$myname}.gz} $docdir/$src + mv $C/{examples,{INSTALL.W32,INSTALL,BUGS,PORTS}.gz} $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/stunnel tar rvpf $pkg.tar -C $P etc/stunnel @@ -315,6 +93,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/w3m-20170616/PlamoBuild.w3m-0.5.3 2017-06-16 09:06:09.000000000 +0900 +++ plamo/01_minimum/network.txz/w3m/PlamoBuild.w3m-0.5.3 2017-06-24 15:36:26.000000000 +0900 @@ -11,7 +11,7 @@ arch=`uname -m` build=P5 src=$pkgbase-$vers -patchfiles="" +patchfiles="w3m-0.5.3-GC_fix.patch.gz" OPT_CONFIG="" DOCS="`echo doc-jp/{FAQ.html,HISTORY,MANUAL.html,README}` `echo doc-jp/README.{SSL,cookie,cygwin,dict,func,img,keymap,m17n}` @@ -45,9 +45,10 @@ done apply_patches cd $B + cp -p Makefile.in{,.orig} sed -i '/w3mimgdisplay/s@$(LIBS)@& -lX11@g' Makefile.in + cp -p istream.c{,.orig} ; cp -p istream.h{,.orig} sed -i 's@file_handle@w3m_&@g' istream.[ch] - gunzip -c $W/w3m-0.5.3-GC_fix.patch.gz | patch -Np1 -i - for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/01_minimum/network.txz/old/wget-20181227/PlamoBuild.wget-1.19.2 2018-12-27 12:50:00.000000000 +0900 +++ plamo/01_minimum/network.txz/wget/PlamoBuild.wget-1.20.3 2019-06-06 09:59:54.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/wget/wget-1.19.2.tar.gz" +url="http://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.gz" verify= digest= branch= commitid= pkgbase=wget -vers=1.19.2 +vers=1.20.3 arch=`uname -m` build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="MAILING-LIST README COPYING INSTALL NEWS ABOUT-NLS ChangeLog - AUTHORS" +DOCS="INSTALL ABOUT-NLS NEWS AUTHORS COPYING README MAILING-LIST + ChangeLog" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/01_minimum/network.txz/old/wireless_tools-20160929/PlamoBuild.wireless_tools-29 2016-09-29 20:07:07.000000000 +0900 +++ plamo/01_minimum/network.txz/wireless_tools/PlamoBuild.wireless_tools-29 2017-06-16 09:57:30.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.tar.gz" +verify= +digest= +commitid= pkgbase=wireless_tools vers=29 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase.$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL README README.fr COPYING PCMCIA.txt CHANGELOG.h DISTRIBUTIONS.txt HOTPLUG.txt IFRENAME-VS-XXX.txt" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/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 | tail -n+2` @@ -307,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/network.txz/old/wpa_supplicant-20170618/PlamoBuild.wpa_supplicant-2.5 2017-06-18 09:50:34.000000000 +0900 +++ plamo/01_minimum/network.txz/wpa_supplicant/PlamoBuild.wpa_supplicant-2.5 2017-06-16 10:06:14.000000000 +0900 @@ -84,7 +84,7 @@ cd ${B[$i]}/wpa_supplicant if [ -f Makefile ] ; then make - #make wpa_gui-qt4 + make wpa_gui-qt4 fi done fi @@ -100,7 +100,7 @@ fi done wpadir=$B/wpa_supplicant - #install $wpadir/wpa_gui-qt4/wpa_gui $P/usr/sbin + install $wpadir/wpa_gui-qt4/wpa_gui $P/usr/sbin cat <<- "EOF" > $P/usr/sbin/wpa_action.sh #!/bin/sh --- plamo/01_minimum/nfs.txz/old/nfs_utils-20161005/PlamoBuild.nfs_utils-1.2.9 2016-10-05 16:03:34.000000000 +0900 +++ plamo/01_minimum/nfs.txz/nfs_utils/PlamoBuild.nfs_utils-1.3.4 2016-10-06 08:07:19.000000000 +0900 @@ -1,12 +1,12 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/linux/utils/nfs-utils/1.2.9/nfs-utils-1.2.9.tar.xz +url="https://www.kernel.org/pub/linux/utils/nfs-utils/1.3.4/nfs-utils-1.3.4.tar.xz https://raw.githubusercontent.com/pld-linux/nfs-utils/master/nfs-utils-heimdal.patch" pkgbase=nfs_utils -vers=1.2.9 +vers=1.3.4 arch=`uname -m` -build=P2 +build=P1 src=nfs-utils-$vers patchfiles="nfs-utils-heimdal.patch" OPT_CONFIG="--disable-nfsv4 --disable-gss --with-krb5=/usr/heimdal" @@ -237,7 +237,7 @@ cd $B cp -p configure{,.orig} cat <<- "EOF" | patch configure - 18769c18769 + 19966c19966 < -f $dir/lib/libroken.a; then --- > \( -f $dir/lib/libroken.so -o -f $dir/lib64/libroken.so \); then --- plamo/01_minimum/nfs.txz/old/rpcbind-20161005/PlamoBuild.rpcbind-0.2.0 2016-10-05 12:10:08.000000000 +0900 +++ plamo/01_minimum/nfs.txz/rpcbind/PlamoBuild.rpcbind-0.2.1 2016-10-06 08:13:20.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/rpcbind/rpcbind-0.2.0.tar.bz2" +url="http://downloads.sourceforge.net/rpcbind/rpcbind-0.2.1.tar.bz2" pkgbase=rpcbind -vers=0.2.0 +vers=0.2.1 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README NEWS ChangeLog INSTALL COPYING AUTHORS" +DOCS="README NEWS INSTALL ChangeLog COPYING AUTHORS" ###################################################################### fscheck() { --- plamo/01_minimum/nfs.txz/old/libevent-20161005/PlamoBuild.libevent-2.0.22 2016-10-05 11:35:59.000000000 +0900 +++ plamo/01_minimum/nfs.txz/libevent/PlamoBuild.libevent-2.0.22 2017-06-20 06:33:50.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/levent/libevent-2.0.22-stable.tar.gz" +verify= +digest= +commitid= pkgbase=libevent vers=2.0.22 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers-stable patchfiles="" OPT_CONFIG="" DOCS="whatsnew-2.0.txt README ChangeLog LICENSE" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -303,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/nfs.txz/old/libnfsidmap-20161005/PlamoBuild.libnfsidmap-0.25 2016-10-05 14:33:34.000000000 +0900 +++ plamo/01_minimum/nfs.txz/libnfsidmap/PlamoBuild.libnfsidmap-0.25 2017-06-20 06:41:39.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/libnfsidmap-0.25.tar.gz" +verify= +digest= +commitid= pkgbase=libnfsidmap vers=0.25 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL README ChangeLog AUTHORS NEWS BUILDING_FROM_CVS COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ compress strip_libdir $P/usr/$libdir/libnfsidmap touch -t `date '+%m%d0900'` $P/usr/$libdir/libnfsidmap - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 -name libnfsidmap*` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -307,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/nfs.txz/old/nfs_utils-20161005/PlamoBuild.nfs_utils-1.2.9 2016-10-05 16:03:34.000000000 +0900 +++ plamo/01_minimum/nfs.txz/nfs_utils/PlamoBuild.nfs_utils-1.2.9 2017-06-20 21:29:44.000000000 +0900 @@ -3,237 +3,40 @@ ###################################################################### url="https://www.kernel.org/pub/linux/utils/nfs-utils/1.2.9/nfs-utils-1.2.9.tar.xz https://raw.githubusercontent.com/pld-linux/nfs-utils/master/nfs-utils-heimdal.patch" +verify= +digest= +commitid= pkgbase=nfs_utils vers=1.2.9 arch=`uname -m` -build=P2 +build=P3 src=nfs-utils-$vers patchfiles="nfs-utils-heimdal.patch" OPT_CONFIG="--disable-nfsv4 --disable-gss --with-krb5=/usr/heimdal" DOCS="README NEWS INSTALL COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p configure{,.orig} cat <<- "EOF" | patch configure @@ -244,12 +47,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +63,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -319,24 +111,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg EOF @@ -362,6 +138,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/nfs.txz/old/rpcbind-20161005/PlamoBuild.rpcbind-0.2.0 2016-10-05 12:10:08.000000000 +0900 +++ plamo/01_minimum/nfs.txz/rpcbind/PlamoBuild.rpcbind-0.2.0 2017-06-20 21:33:19.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/rpcbind/rpcbind-0.2.0.tar.bz2" +verify= +digest= +commitid= pkgbase=rpcbind vers=0.2.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README NEWS ChangeLog INSTALL COPYING AUTHORS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,29 +69,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/nilfs_utils-20161007/PlamoBuild.nilfs_utils-2.2.5 2016-10-07 08:05:02.000000000 +0900 +++ plamo/01_minimum/nilfs_utils/PlamoBuild.nilfs_utils-2.2.5 2017-06-24 07:04:49.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://nilfs.sourceforge.net/download/nilfs-utils-2.2.5.tar.bz2" +verify= +digest= +commitid= pkgbase=nilfs_utils vers=2.2.5 arch=`uname -m` -build=P1 +build=P2 src=nilfs-utils-$vers patchfiles="" OPT_CONFIG="--without-selinux" DOCS="AUTHORS README COPYING NEWS ChangeLog INSTALL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $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` @@ -308,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/open_iscsi-20161006/PlamoBuild.open_iscsi-2.0.873 2016-10-06 11:28:10.000000000 +0900 +++ plamo/01_minimum/open_iscsi/PlamoBuild.open_iscsi-2.0.873 2017-06-24 07:33:11.000000000 +0900 @@ -1,240 +1,43 @@ #!/bin/sh ###################################################################### -url="http://fossies.org/linux/misc/open-iscsi-2.0-873.tar.gz" +url="http://distfiles.exherbo.org/distfiles/open-iscsi-2.0-873.tar.gz" +verify= +digest= +commitid= pkgbase=open_iscsi vers=2.0_873 arch=`uname -m` -build=P5 +build=P6 src=open-iscsi-2.0-873 patchfiles="" OPT_CONFIG="" DOCS="COPYING Changelog README THANKS TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - cp -p Makefile Makefile.orig + cp -p Makefile{,.orig} cat <<- "EOF" | patch Makefile 118c118 < if [ ! -f /etc/iscsi/iscsid.conf ]; then \ @@ -258,12 +61,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -280,12 +77,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -346,24 +138,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links install -d $P/install cat <<- "EOF" > $P/install/doinst.sh mv etc/iscsi/iscsid.conf.new /tmp @@ -391,6 +167,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/openslp-20161006/PlamoBuild.openslp-1.2.1 2016-10-06 12:56:48.000000000 +0900 +++ plamo/01_minimum/openslp/PlamoBuild.openslp-1.2.1 2017-06-24 07:39:38.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://downloads.sourceforge.net/openslp/openslp-1.2.1.tar.gz" +verify= +digest= +commitid= pkgbase=openslp vers=1.2.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="FAQ NEWS README THANKS README.W32 AUTHORS INSTALL ChangeLog COPYING" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,30 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/openslp $docdir/$src/doc mv $docdir/$src/{doc,{NEWS,README,THANKS,README.W32,AUTHORS}.gz} $C - mv $docdir/$src/{INSTALL,ChangeLog,$myname}.gz $C + mv $docdir/$src/{INSTALL,ChangeLog,$func,$myname,$spec}.gz $C mv $C/{doc,{NEWS,README,THANKS,README.W32,AUTHORS}.gz} $docdir/$src - mv $C/{INSTALL,ChangeLog,$myname}.gz $docdir/$src + mv $C/{INSTALL,ChangeLog,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links 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 usr/$libdir | tail -n+2` @@ -311,6 +87,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/pcre-20161008/PlamoBuild.pcre-8.39 2016-10-08 10:54:14.000000000 +0900 +++ plamo/01_minimum/pcre/PlamoBuild.pcre-8.39 2017-06-24 15:54:53.000000000 +0900 @@ -2,10 +2,13 @@ ###################################################################### url="http://downloads.sourceforge.net/pcre/pcre-8.39.tar.bz2" +verify= +digest= +commitid= pkgbase=pcre vers=8.39 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-pcre16 --enable-pcre32 --enable-unicode-properties @@ -13,237 +16,31 @@ --enable-pcretest-libreadline" DOCS="LICENCE README COPYING INSTALL ChangeLog HACKING AUTHORS NON-AUTOTOOLS-BUILD NEWS NON-UNIX-USE" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,30 +73,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mkdir $docdir/$src/doc mv $docdir/pcre/{pcre{,-config,grep,test}.txt,html} $docdir/$src/doc touch -t `date '+%m%d0900'` $docdir/$src/doc - mv $docdir/$src/{doc,{NON-UNIX-USE,$myname}.gz} $C - mv $C/{doc,{NON-UNIX-USE,$myname}.gz} $docdir/$src + mv $docdir/$src/{doc,{NON-UNIX-USE,$func,$myname,$spec}.gz} $C + mv $C/{doc,{NON-UNIX-USE,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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` @@ -315,6 +91,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/perl-20161008/PlamoBuild.perl-5.14.2 2016-10-08 16:41:52.000000000 +0900 +++ plamo/01_minimum/perl/PlamoBuild.perl-5.14.2 2017-06-24 16:09:00.000000000 +0900 @@ -2,12 +2,15 @@ ###################################################################### url="http://www.cpan.org/src/perl-5.14.2.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/perl/perl-5.12.1-Configure_multilib-1.patch.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/perl/CVE-2013-1667.patch.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/perl/perl-5.12.1-Configure_multilib-1.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/perl/CVE-2013-1667.patch.gz" +verify= +digest= +commitid= pkgbase=perl vers=5.14.2 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="perl-5.12.1-Configure_multilib-1.patch.gz CVE-2013-1667.patch.gz" @@ -19,229 +22,29 @@ `echo README.{beos,amiga,macos,qnx,vos,os400}` Copying `echo README.{jp,micro,os390,dos,freebsd,os2,uts,vms,netware}` AUTHORS `echo README.{tru64,ce}`" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p hints/linux.sh{,.orig} cat <<- EOF | patch hints/linux.sh @@ -269,12 +72,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -294,12 +91,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -319,24 +111,8 @@ strip_libdir ${i%/*} touch -t `date '+%m%d0900'` ${i%/*} done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/perl5 tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` @@ -344,6 +120,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/popt-20161012/PlamoBuild.popt-1.16 2016-10-12 10:07:27.000000000 +0900 +++ plamo/01_minimum/popt/PlamoBuild.popt-1.16 2017-06-24 16:56:14.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://rpm5.org/files/popt/popt-1.16.tar.gz" +verify= +digest= +commitid= pkgbase=popt vers=1.16 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING README ABOUT-NLS CHANGES" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -277,24 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -304,6 +80,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/psmisc-20161012/PlamoBuild.psmisc-22.21 2016-10-12 10:34:01.000000000 +0900 +++ plamo/01_minimum/psmisc/PlamoBuild.psmisc-22.21 2017-06-24 17:00:17.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/psmisc/psmisc-22.21.tar.gz" +verify= +digest= +commitid= pkgbase=psmisc vers=22.21 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README AUTHORS INSTALL NEWS COPYING ABOUT-NLS ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find bin | 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 usr/share/locale -name *.mo` @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/recode-20160714/PlamoBuild.recode-3.6 2016-07-14 20:50:25.000000000 +0900 +++ plamo/01_minimum/recode/PlamoBuild.recode-3.6 2017-06-06 12:53:29.000000000 +0900 @@ -3,248 +3,45 @@ ###################################################################### url="http://mirrors.tds.net/gentoo/distfiles/recode-3.6.tar.gz http://ftp.osuosl.org/pub/blfs/svn/r/recode-3.6-fixes-2.patch" +verify= +digest= +commitid= pkgbase=recode vers=3.6 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="recode-3.6-fixes-2.patch" OPT_CONFIG="--without-included-gettext" DOCS="README ABOUT-NLS AUTHORS BACKLOG COPYING ChangeLog INSTALL NEWS THANKS TODO COPYING-LIB" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p /usr/share/libtool/build-aux/config.{guess,sub} . for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,24 +73,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -309,6 +85,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/rpm2targz-20161014/PlamoBuild.rpm2targz-git_20120517 2016-10-14 07:46:27.000000000 +0900 +++ plamo/01_minimum/rpm2targz/PlamoBuild.rpm2targz-git_20120517 2017-06-26 20:58:39.000000000 +0900 @@ -2,259 +2,43 @@ ###################################################################### url="https://anongit.gentoo.org/git/proj/rpm2targz.git - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/rpm2targz/rpm2cpio - ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/rpm2targz/gitlog2changelog.py" + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/rpm2targz/rpm2cpio" +verify= +digest= +commitid[0]=e47270a pkgbase=rpm2targz vers=git_20120517 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase patchfiles="" OPT_CONFIG="" -DOCS="rpm2targz.README rpm2targz.README.Gentoo" +DOCS="rpm2targz.README rpm2targz.README.Gentoo ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; else - ( cd `basename ${i##*/} .git` ; git pull origin master ) ; 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 - ;; - esac - done - if [ ! -x gitlog2changelog.py ] ; then - chmod 755 gitlog2changelog.py - fi - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - git checkout origin/master ; git reset --hard e47270a - git set-file-times ; TZ=UTC ../gitlog2changelog.py) ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -271,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -292,30 +71,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/ruby-20161018/PlamoBuild.ruby-2.2.3 2016-10-18 06:53:57.000000000 +0900 +++ plamo/01_minimum/ruby/PlamoBuild.ruby-2.2.3 2017-06-26 21:03:11.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.xz" +verify= +digest= +commitid= pkgbase=ruby vers=2.2.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-shared" DOCS="README.md ChangeLog README.ja.md COPYING.ja KNOWNBUGS.rb COPYING LEGAL BSDL README.EXT NEWS README.EXT.ja CONTRIBUTING.md GPL" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -296,24 +88,8 @@ strip_libdir $i touch -t `date '+%m%d0900'` $i done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 libruby*` tar rvpf $pkg.tar -C $P usr/$libdir/ruby @@ -326,6 +102,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/screen-20161015/PlamoBuild.screen-4.4.0 2016-10-15 00:06:07.000000000 +0900 +++ plamo/01_minimum/screen/PlamoBuild.screen-4.4.0 2017-06-26 22:10:40.000000000 +0900 @@ -2,238 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/screen/screen-4.4.0.tar.gz" +verify= +digest= +commitid= pkgbase=screen vers=4.4.0 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="FAQ NEWS.3.9 COPYING NEWS.3.5 NEWS.3.7 HACKING NEWS NEWS.3.6 ChangeLog INSTALL TODO README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches + cd $B cp -p Makefile.in{,.orig} cat <<- "EOF" | patch Makefile.in 99,102d98 @@ -244,12 +48,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +64,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,24 +79,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg cat <<- "EOF" | sed 's/^|//' > /tmp/screeninfo.src @@ -324,6 +101,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/sg3_utils-20161016/PlamoBuild.sg3_utils-1.42 2016-10-16 06:50:07.000000000 +0900 +++ plamo/01_minimum/sg3_utils/PlamoBuild.sg3_utils-1.42 2017-06-26 22:16:12.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://sg.danny.cz/sg/p/sg3_utils-1.42.tar.xz" +verify= +digest= +commitid= pkgbase=sg3_utils vers=1.42 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS README README.sg_start README.iscsi README.solaris CREDITS ChangeLog BSD_LICENSE COPYING README.win32 AUTHORS COVERAGE README.freebsd INSTALL README.tru64" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/scsi @@ -305,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/sharutils-20161015/PlamoBuild.sharutils-4.15.2 2016-10-15 07:05:45.000000000 +0900 +++ plamo/01_minimum/sharutils/PlamoBuild.sharutils-4.15.2 2017-06-26 22:24:09.000000000 +0900 @@ -2,246 +2,43 @@ ###################################################################### url="http://ftp.gnu.org/gnu/sharutils/sharutils-4.15.2.tar.gz" +verify= +digest= +commitid= pkgbase=sharutils vers=4.15.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL ChangeLog COPYING ABOUT-NLS NEWS README TODO THANKS AUTHORS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/info | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -304,6 +80,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/sqlite-20161105/PlamoBuild.sqlite-3.15.0 2016-11-05 21:40:17.000000000 +0900 +++ plamo/01_minimum/sqlite/PlamoBuild.sqlite-3.18.0 2017-06-26 22:48:44.000000000 +0900 @@ -1,248 +1,43 @@ #!/bin/sh ###################################################################### -url="http://sqlite.org/2016/sqlite-autoconf-3150000.tar.gz" +url="http://sqlite.org/2017/sqlite-autoconf-3180000.tar.gz" +verify= +digest= +commitid= pkgbase=sqlite -vers=3.15.0 +vers=3.18.0 arch=`uname -m` -build=P3 -src=$pkgbase-autoconf-3150000 +build=P2 +src=$pkgbase-autoconf-3180000 patchfiles="" OPT_CONFIG="" DOCS="INSTALL README.txt" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -322,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/squashfs-20161016/PlamoBuild.squashfs-4.3 2016-10-16 06:59:18.000000000 +0900 +++ plamo/01_minimum/squashfs/PlamoBuild.squashfs-4.3 2017-06-26 23:02:25.000000000 +0900 @@ -2,239 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/squashfs/squashfs4.3.tar.gz" +verify= +digest= +commitid= pkgbase=squashfs vers=4.3 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase$vers patchfiles="" OPT_CONFIG="" DOCS="ACKNOWLEDGEMENTS README README-4.3 pseudo-file.example DONATIONS `echo OLD-READMEs/README-{3.{0,3,2},2.0,3.1,4.0,2.1,4.2,AMD64,4.1}` COPYING INSTALL PERFORMANCE.README CHANGES" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B/squashfs-tools cp -p Makefile Makefile.orig cat <<- "EOF" | patch Makefile @@ -261,12 +64,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/squashfs-tools - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -283,12 +80,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -303,28 +95,11 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/sysstat-20161016/PlamoBuild.sysstat-11.5.1 2016-10-16 07:01:32.000000000 +0900 +++ plamo/01_minimum/sysstat/PlamoBuild.sysstat-11.5.1 2017-06-26 23:09:04.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://pagesperso-orange.fr/sebastien.godard/sysstat-11.5.1.tar.bz2" +verify= +digest= +commitid= pkgbase=sysstat vers=11.5.1 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--docdir=/usr/share/doc/sysstat" DOCS="FAQ COPYING README.md CHANGES INSTALL CREDITS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -278,24 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/sa tar rvpf $pkg.tar -C $P var/log/sa @@ -307,6 +83,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/tcl.txz/old/tcl-20161016/PlamoBuild.tcl-8.5.10 2016-10-16 10:07:44.000000000 +0900 +++ plamo/01_minimum/tcl.txz/tcl/PlamoBuild.tcl-8.6.6 2016-10-18 09:13:35.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz" +url="http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" pkgbase=tcl -vers=8.5.10 +vers=8.6.6 arch=`uname -m` -build=P2 -src=tcl$vers +build=P1 +src=$pkgbase$vers patchfiles="" OPT_CONFIG="--enable-threads" -DOCS="changes ChangeLog.2000 ChangeLog.1999 ChangeLog.2002 - ChangeLog.2003 ChangeLog.2005 README ChangeLog ChangeLog.2001 - license.terms ChangeLog.2004" +DOCS="ChangeLog.2004 ChangeLog.2002 ChangeLog.2005 ChangeLog.2008 + ChangeLog.1999 changes ChangeLog license.terms ChangeLog.2007 + ChangeLog.2003 README ChangeLog.2000 ChangeLog.2001" ###################################################################### fscheck() { @@ -239,17 +239,17 @@ if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} cat <<- "EOF" | patch unix/configure - 18772c18772 + 18923c18923 < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' --- > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 18894,18895c18894,18895 + 19053,19054c19053,19054 < elif test "$prefix/lib" != "$libdir"; then < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" --- > elif test "$prefix/lib64" != "$libdir"; then > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 18897c18897 + 19056c19056 < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" --- > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" @@ -294,14 +294,18 @@ make install DESTDIR=$P install-private-headers fi done - ln -s tclsh8.5 $P/usr/bin/tclsh - mv $P/usr/bin/{tclsh8.5,tclsh} $C - mv $C/{tclsh8.5,tclsh} $P/usr/bin + ln -s tclsh8.6 $P/usr/bin/tclsh + mv $P/usr/bin/{tclsh8.6,sqlite3_analyzer,tclsh} $C + mv $C/{tclsh8.6,sqlite3_analyzer,tclsh} $P/usr/bin touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + for i in `find $P/usr/$libdir -mindepth 2 -name "*.so"` ; do + strip_libdir ${i%/*} + touch -t `date '+%m%d0900'` ${i%/*} + done for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do @@ -321,9 +325,9 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P usr/$libdir/tcl8.5 - tar rvpf $pkg.tar -C $P usr/$libdir/{libtcl8.5.so,tclConfig.sh,libtclstub8.5.a} - tar rvpf $pkg.tar -C $P usr/$libdir/tcl8 + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/$libdir -maxdepth 1 ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | 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` --- plamo/01_minimum/tcl.txz/old/expect-20161016/PlamoBuild.expect-5.45 2016-10-16 10:30:47.000000000 +0900 +++ plamo/01_minimum/tcl.txz/expect/PlamoBuild.expect-5.45 2016-10-18 09:34:12.000000000 +0900 @@ -5,8 +5,8 @@ pkgbase=expect vers=5.45 arch=`uname -m` -build=P2 -src=expect$vers +build=P3 +src=$pkgbase$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL NEWS ChangeLog README FAQ license.terms HISTORY" --- plamo/01_minimum/tcl.txz/old/tclx-20161016/PlamoBuild.tclx-8.4 2016-10-16 11:56:55.000000000 +0900 +++ plamo/01_minimum/tcl.txz/tclx/PlamoBuild.tclx-8.4.1 2016-10-18 09:58:54.000000000 +0900 @@ -1,18 +1,17 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/tclx/tclx8.4.tar.bz2 - http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tclx/tclx-8.4.configure.diff.gz +url="http://downloads.sourceforge.net/tclx/tclx8.4.1.tar.bz2 http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tclx/tclx-8.4.gcc4.diff.gz - http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz" + http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" pkgbase=tclx -vers=8.4 +vers=8.4.1 arch=`uname -m` -build=P2 -src=tclx$vers -patchfiles="tclx-8.4.configure.diff.gz tclx-8.4.gcc4.diff.gz" +build=P1 +src=${pkgbase}8.4 +patchfiles="tclx-8.4.gcc4.diff.gz" OPT_CONFIG="" -DOCS="README license.terms ChangeLog" +DOCS="ChangeLog README license.terms" ###################################################################### fscheck() { @@ -236,27 +235,27 @@ esac done done - cd $W/tcl8.5.10 + cd $W/tcl8.6.6 if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} cat <<- "EOF" | patch unix/configure - 18772c18772 + 18923c18923 < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' --- > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 18894,18895c18894,18895 + 19053,19054c19053,19054 < elif test "$prefix/lib" != "$libdir"; then < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" --- > elif test "$prefix/lib64" != "$libdir"; then > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 18897c18897 + 19056c19056 < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" --- > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" EOF fi - cd $W/tcl8.5.10/unix + cd $W/tcl8.6.6/unix ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} @@ -302,8 +301,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_libdir $P/usr/$libdir/tclx$vers - touch -t `date '+%m%d0900'` $P/usr/$libdir/tclx$vers + strip_libdir $P/usr/$libdir/tclx8.4 + touch -t `date '+%m%d0900'` $P/usr/$libdir/tclx8.4 for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do @@ -322,7 +321,7 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - tar cvpf $pkg.tar -C $P usr/$libdir/tclx$vers + tar cvpf $pkg.tar -C $P usr/$libdir/tclx8.4 tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/mann | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src --- plamo/01_minimum/tcl.txz/old/itcl-20161016/PlamoBuild.itcl-3.4 2016-10-16 14:23:21.000000000 +0900 +++ plamo/01_minimum/tcl.txz/itcl/PlamoBuild.itcl-4.0.5 2016-10-18 10:38:51.000000000 +0900 @@ -1,16 +1,16 @@ #!/bin/sh ###################################################################### -url="ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/tcl.txz/itcl/itcl3.4-20080207.tar.bz2 - http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz" +url="http://downloads.sourceforge.net/incrtcl/itcl4.0.5.tar.gz + http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" pkgbase=itcl -vers=3.4 +vers=4.0.5 arch=`uname -m` -build=P2 -src=itcl$vers +build=P1 +src=$pkgbase$vers patchfiles="" OPT_CONFIG="" -DOCS="license.terms CHANGES ChangeLog INCOMPATIBLE README TODO" +DOCS="releasenotes.txt ChangeLog TODO license.terms README" ###################################################################### fscheck() { @@ -234,27 +234,27 @@ esac done done - cd $W/tcl8.5.10 + cd $W/tcl8.6.6 if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} cat <<- "EOF" | patch unix/configure - 18772c18772 + 18923c18923 < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' --- > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 18894,18895c18894,18895 + 19053,19054c19053,19054 < elif test "$prefix/lib" != "$libdir"; then < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" --- > elif test "$prefix/lib64" != "$libdir"; then > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 18897c18897 + 19056c19056 < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" --- > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" EOF fi - cd $W/tcl8.5.10/unix + cd $W/tcl8.6.6/unix ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} @@ -320,7 +320,7 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 | tail -n+2` + tar cvpf $pkg.tar -C $P usr/$libdir/itcl$vers tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/mann | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src --- plamo/01_minimum/tcl.txz/old/tcl-20161018/PlamoBuild.tcl-8.6.6 2016-10-18 09:13:35.000000000 +0900 +++ plamo/01_minimum/tcl.txz/tcl/PlamoBuild.tcl-8.6.6 2017-07-01 01:52:25.000000000 +0900 @@ -2,239 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" +verify= +digest= +commitid= pkgbase=tcl vers=8.6.6 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase$vers patchfiles="" OPT_CONFIG="--enable-threads" DOCS="ChangeLog.2004 ChangeLog.2002 ChangeLog.2005 ChangeLog.2008 ChangeLog.1999 changes ChangeLog license.terms ChangeLog.2007 ChangeLog.2003 README ChangeLog.2000 ChangeLog.2001" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} @@ -257,12 +60,6 @@ fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/unix - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -279,12 +76,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -302,28 +94,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `find $P/usr/$libdir -mindepth 2 -name "*.so"` ; do + for i in `find $P/usr/$libdir -mindepth 2 -name *.so` ; do strip_libdir ${i%/*} touch -t `date '+%m%d0900'` ${i%/*} done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -336,6 +112,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/tcl.txz/old/expect-20161018/PlamoBuild.expect-5.45 2016-10-18 09:34:12.000000000 +0900 +++ plamo/01_minimum/tcl.txz/expect/PlamoBuild.expect-5.45 2017-07-01 02:06:24.000000000 +0900 @@ -2,245 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/expect/expect5.45.tar.gz" +verify= +digest= +commitid= pkgbase=expect vers=5.45 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL NEWS ChangeLog README FAQ license.terms HISTORY" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -257,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,24 +71,8 @@ compress strip_libdir $P/usr/$libdir/expect$vers touch -t `date '+%m%d0900'` $P/usr/$libdir/expect$vers - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/expect$vers tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -305,6 +81,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/tcl.txz/old/tclx-20161018/PlamoBuild.tclx-8.4.1 2016-10-18 09:58:54.000000000 +0900 +++ plamo/01_minimum/tcl.txz/tclx/PlamoBuild.tclx-8.4.1 2017-07-01 06:35:10.000000000 +0900 @@ -2,273 +2,48 @@ ###################################################################### url="http://downloads.sourceforge.net/tclx/tclx8.4.1.tar.bz2 - http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tclx/tclx-8.4.gcc4.diff.gz - http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" + http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tclx/tclx-8.4.gcc4.diff.gz" +verify= +digest= +commitid= pkgbase=tclx vers=8.4.1 arch=`uname -m` -build=P1 +build=P2 src=${pkgbase}8.4 patchfiles="tclx-8.4.gcc4.diff.gz" OPT_CONFIG="" DOCS="ChangeLog README license.terms" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 $W/tcl8.6.6 - if [ $arch == x86_64 ] ; then - cp -p unix/configure{,.orig} - cat <<- "EOF" | patch unix/configure - 18923c18923 - < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' - --- - > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 19053,19054c19053,19054 - < elif test "$prefix/lib" != "$libdir"; then - < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > elif test "$prefix/lib64" != "$libdir"; then - > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 19056c19056 - < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" - EOF - fi - cd $W/tcl8.6.6/unix - ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + --with-tcl=/usr/$libdir fi done fi @@ -281,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -303,30 +73,13 @@ compress strip_libdir $P/usr/$libdir/tclx8.4 touch -t `date '+%m%d0900'` $P/usr/$libdir/tclx8.4 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/$libdir/tclx8.4 tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/mann | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/tcl.txz/old/itcl-20161018/PlamoBuild.itcl-4.0.5 2016-10-18 10:38:51.000000000 +0900 +++ plamo/01_minimum/tcl.txz/itcl/PlamoBuild.itcl-4.0.5 2017-07-01 02:19:56.000000000 +0900 @@ -1,269 +1,43 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/incrtcl/itcl4.0.5.tar.gz - http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz" +url="http://downloads.sourceforge.net/incrtcl/itcl4.0.5.tar.gz" +verify= +digest= +commitid= pkgbase=itcl vers=4.0.5 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase$vers patchfiles="" OPT_CONFIG="" DOCS="releasenotes.txt ChangeLog TODO license.terms README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 $W/tcl8.6.6 - if [ $arch == x86_64 ] ; then - cp -p unix/configure{,.orig} - cat <<- "EOF" | patch unix/configure - 18923c18923 - < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' - --- - > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 19053,19054c19053,19054 - < elif test "$prefix/lib" != "$libdir"; then - < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > elif test "$prefix/lib64" != "$libdir"; then - > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 19056c19056 - < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" - EOF - fi - cd $W/tcl8.6.6/unix - ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -280,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -302,30 +71,13 @@ compress strip_libdir $P/usr/$libdir/itcl$vers touch -t `date '+%m%d0900'` $P/usr/$libdir/itcl$vers - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/$libdir/itcl$vers tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/mann | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/texinfo-20161018/PlamoBuild.texinfo-6.3 2016-10-18 11:01:32.000000000 +0900 +++ plamo/01_minimum/texinfo/PlamoBuild.texinfo-6.1 2017-07-06 15:41:43.000000000 +0900 @@ -1,247 +1,44 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/texinfo/texinfo-6.3.tar.xz" +url="http://ftp.gnu.org/gnu/texinfo/texinfo-6.1.tar.xz" +verify= +digest= +commitid= pkgbase=texinfo -vers=6.3 +vers=6.1 arch=`uname -m` -build=P1 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README-hacking ABOUT-NLS README COPYING AUTHORS NEWS INSTALL.generic INSTALL ChangeLog ChangeLog.46 TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -258,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,24 +72,8 @@ compress strip_libdir $P/usr/$libdir/texinfo touch -t `date '+%m%d0900'` $P/usr/$libdir/texinfo - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/texinfo tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` @@ -309,6 +85,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/time-20161018/PlamoBuild.time-1.7 2016-10-18 11:28:14.000000000 +0900 +++ plamo/01_minimum/time/PlamoBuild.time-1.7 2017-07-06 15:47:20.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="http://ftp.gnu.org/gnu/time/time-1.7.tar.gz" +verify= +digest= +commitid= pkgbase=time vers=1.7 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile.in{,.orig} sed -i 's@$(bindir)@$(DESTDIR)&@;s@$(infodir)@$(DESTDIR)&@' Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,29 +72,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/info | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/tree-20161018/PlamoBuild.tree-1.7.0 2016-10-18 11:21:37.000000000 +0900 +++ plamo/01_minimum/tree/PlamoBuild.tree-1.7.0 2017-07-06 15:50:05.000000000 +0900 @@ -2,248 +2,45 @@ ###################################################################### url="ftp://mama.indstate.edu/linux/tree/tree-1.7.0.tgz" +verify= +digest= +commitid= pkgbase=tree vers=1.7.0 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="CHANGES INSTALL LICENSE README TODO" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile{,.orig} sed -i 's@$(BINDIR)@$(DESTDIR)&@;s@$(MANDIR)@$(DESTDIR)&@' Makefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,30 +72,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/unzip-20161021/PlamoBuild.unzip-60 2016-10-21 10:57:49.000000000 +0900 +++ plamo/01_minimum/unzip/PlamoBuild.unzip-60 2017-07-06 15:55:53.000000000 +0900 @@ -8,249 +8,44 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/unzip/CVE-2014-8141.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/unzip/CVE-2014-9636.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/unzip/heapoverflow.patch.gz" +verify= +digest= +commitid= pkgbase=unzip vers=60 arch=`uname -m` -build=P5 +build=P6 src=$pkgbase$vers patchfiles="unzip60-nls_sjis.patch.gz `echo CVE-2014-{81{39,40,41},9636}.patch.gz` heapoverflow.patch.gz" OPT_CONFIG="" DOCS="BUGS Contents COPYING.OLD History.600 INSTALL LICENSE README ToDo WHERE" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f unix/Makefile ] ; then - make -f unix/Makefile clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -267,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -287,44 +77,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/usbutils-20161022/PlamoBuild.usbutils-007 2016-10-22 23:18:43.000000000 +0900 +++ plamo/01_minimum/usbutils/PlamoBuild.usbutils-007 2017-07-06 16:03:16.000000000 +0900 @@ -2,247 +2,42 @@ ###################################################################### url="https://www.kernel.org/pub/linux/utils/usb/usbutils/usbutils-007.tar.xz" +verify= +digest= +commitid= pkgbase=usbutils vers=007 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog README NEWS COPYING INSTALL AUTHORS" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/usb.ids{,.gz} @@ -320,6 +80,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/utempter-20161021/PlamoBuild.utempter-0.5.5 2016-10-21 11:02:03.000000000 +0900 +++ plamo/01_minimum/utempter/PlamoBuild.utempter-0.5.5 2017-07-06 16:14:50.000000000 +0900 @@ -2,247 +2,42 @@ ###################################################################### url="http://mirror.its.dal.ca/freebsd/ports/local-distfiles/lofi/utempter-0.5.5.tar.gz" +verify= +digest= +commitid= pkgbase=utempter vers=0.5.5 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/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 | tail -n+2` @@ -320,6 +80,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/which-20161022/PlamoBuild.which-2.21 2016-10-22 23:31:35.000000000 +0900 +++ plamo/01_minimum/which/PlamoBuild.which-2.21 2017-07-06 16:30:10.000000000 +0900 @@ -2,247 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/which/which-2.21.tar.gz" +verify= +digest= +commitid= pkgbase=which vers=2.21 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL EXAMPLES README README.alias AUTHORS NEWS COPYING" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +69,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/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 usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/yaml-20161022/PlamoBuild.yaml-0.1.7 2016-10-22 23:39:13.000000000 +0900 +++ plamo/01_minimum/yaml/PlamoBuild.yaml-0.1.7 2017-07-06 16:32:17.000000000 +0900 @@ -2,247 +2,42 @@ ###################################################################### url="http://pyyaml.org/download/libyaml/yaml-0.1.7.tar.gz" +verify= +digest= +commitid= pkgbase=yaml vers=0.1.7 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="LICENSE README" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +69,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` @@ -318,6 +78,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/zip-20161021/PlamoBuild.zip-30 2016-10-21 11:04:47.000000000 +0900 +++ plamo/01_minimum/zip/PlamoBuild.zip-30 2017-07-06 16:35:29.000000000 +0900 @@ -2,248 +2,43 @@ ###################################################################### url="http://downloads.sourceforge.net/infozip/zip30.tar.gz" +verify= +digest= +commitid= pkgbase=zip vers=30 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase$vers patchfiles="" OPT_CONFIG="" DOCS="Betas_Readme.txt BUGS CHANGES INSTALL LICENSE README README.CR TODO USexport.msg WHATSNEW WHERE zip30*.ann" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f unix/Makefile ] ; then - make -f unix/Makefile clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,44 +70,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/01_minimum/old/zsh-20161021/PlamoBuild.zsh-5.2 2016-10-21 11:06:07.000000000 +0900 +++ plamo/01_minimum/zsh/PlamoBuild.zsh-5.2 2017-07-06 16:38:42.000000000 +0900 @@ -2,247 +2,42 @@ ###################################################################### url="http://downloads.sourceforge.net/zsh/zsh-5.2.tar.xz" +verify= +digest= +commitid= pkgbase=zsh vers=5.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-multibyte" DOCS="ChangeLog META-FAQ MACHINES INSTALL LICENCE NEWS FEATURES README" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +54,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +71,8 @@ compress strip_libdir $P/usr/$libdir/zsh/$vers/zsh touch -t `date '+%m%d0900'` $P/usr/$libdir/zsh/$vers/zsh - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/usr/share/zsh/$vers/help touch -t `date '+%m%d0900'` $P/usr/share/zsh/$vers/help tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` @@ -323,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/old/libpng-20170122/PlamoBuild.libpng-1.6.28 2017-01-22 08:46:48.000000000 +0900 +++ plamo/02_x11/libpng/PlamoBuild.libpng-1.6.28 2017-02-01 21:45:47.000000000 +0900 @@ -8,7 +8,7 @@ pkgbase=libpng vers=1.6.28 arch=`uname -m` -build=P2 +build=P3 src[0]=$pkgbase-$vers src[1]=$pkgbase-1.4.20 patchfiles[0]="libpng-1.6.28-apng.patch.gz" @@ -279,7 +279,7 @@ case $i in 0) make install DESTDIR=$P ;; 1) install libpng14-config $P/usr/bin - ./libtool --mode=install install libpng14.la $P/usr/lib + ./libtool --mode=install install libpng14.la $P/usr/$libdir install -m 644 libpng14.pc $P/usr/$libdir/pkgconfig install -d $P/usr/include/libpng14 install -m 644 png{,conf}.h $P/usr/include/libpng14 ;; --- plamo/02_x11/old/Xaw3d-20170221/PlamoBuild.Xaw3d-1.5E 2017-02-21 11:59:29.000000000 +0900 +++ plamo/02_x11/Xaw3d/PlamoBuild.Xaw3d-1.5E 2017-09-25 15:52:24.000000000 +0900 @@ -1,254 +1,50 @@ #!/bin/sh ###################################################################### -url="ftp://ftp.eenet.ee/pub/FreeBSD/distfiles/Xaw3d-1.5E.tar.gz +url="ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/02_x11/Xaw3d/Xaw3d-1.5E.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/02_x11/Xaw3d/Xaw3d-1.5E-MultiSrc.c.patch.gz" +verify= +digest= +branch= +commitid= pkgbase=Xaw3d vers=1.5E arch=`uname -m` -build=P6 +build=P7 src=$pkgbase-$vers patchfiles="Xaw3d-1.5E-MultiSrc.c.patch.gz" OPT_CONFIG="" DOCS="README.XAW3D" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources mv xc/lib/Xaw3d $src fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Imakefile Imakefile.orig sed 's@#undef ARROW@#define ARROW@g' Imakefile.orig \ | sed 's@XCOMM EXTRA@EXTRA@g' > Imakefile for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,44 +77,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/X11/Xaw3d 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/TTfont.txz/old/freetype-20170124/PlamoBuild.freetype-2.6.1 2017-01-24 10:47:48.000000000 +0900 +++ plamo/02_x11/TTfont.txz/freetype/PlamoBuild.freetype-2.6.1 2017-09-14 21:46:35.000000000 +0900 @@ -2,10 +2,14 @@ ###################################################################### url="http://downloads.sourceforge.net/freetype/freetype-2.6.1.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=freetype vers=2.6.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -15,241 +19,34 @@ `echo docs/{CHANGES,LICENSE.TXT,CMAKE,GPLv2.TXT,INSTALL.GNU}` `echo docs/{MAKEPP,DEBUG,INSTALL} ChangeLog.2{4,3,2}` README ChangeLog.20 README.git ChangeLog.21" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches + cd $B cp -p modules.cfg{,.orig} sed -i '/\(gx\|ot\)valid$/s@^# @@g' modules.cfg for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +63,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,38 +78,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -328,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/TTfont.txz/old/fontconfig-20170124/PlamoBuild.fontconfig-2.11.1 2017-01-24 11:32:37.000000000 +0900 +++ plamo/02_x11/TTfont.txz/fontconfig/PlamoBuild.fontconfig-2.11.1 2017-09-14 17:36:50.000000000 +0900 @@ -1,248 +1,45 @@ #!/bin/sh ###################################################################### -url="http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.bz2" +url="http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-src/02_x11/TTfont.txz/fontconfig/fonts.conf" +verify= +digest= +branch= +commitid= pkgbase=fontconfig vers=2.11.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-docs" DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -275,227 +67,14 @@ fi done install -d $P/etc/template/Source/.config/fontconfig - cat <<- "EOF" | unexpand \ - > $P/etc/template/Source/.config/fontconfig/fonts.conf - - - - - - - - - - - - serif - - - - - - Nimbus Roman No9 L - IPAPMincho - - - - - - - sans-serif - - - - - - Nimbus Sans L - IPAPGothic - VL PGothic - - - - - - - monospace - - - - - - - - - - - - Bitstream Vera Sans Mono - FS Gothic - - - - - - - - - - - - - - - - - - - - - - - - - - - FS Mincho - - - FS Gothic - - - IPAMincho - - - IPAPMincho - - - IPAGothic - - - IPAPGothic - - - IPAUIGothic - - - VL Gothic - - - VL PGothic - - - MS Mincho - - - MS PMincho - - - MS Gothic - - - MS PGothic - - - MS UI Gothic - - - - medium - - - - roman - - - - - - - 12 - - - - - - - 16 - - - - true - - - - false - - - - - - EOF + install -m 644 $W/fonts.conf $P/etc/template/Source/.config/fontconfig touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/etc/fonts/conf.d touch -t `date '+%m%d0900'` $P/etc/fonts/conf.d tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` @@ -511,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/xproto-20170125/PlamoBuild.xproto-7.0.28 2017-01-25 10:50:01.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/xproto/PlamoBuild.xproto-7.0.28 2017-09-12 10:56:30.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/proto/xproto-7.0.28.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=xproto vers=7.0.28 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog INSTALL README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,47 +70,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/xproto $docdir/$src/specs - mv $docdir/$src/{specs,{$myname,$spec}.gz} $C - mv $C/{specs,{$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{specs,{$func,$myname,$spec}.gz} $C + mv $C/{specs,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/X11 tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/xextproto-20170125/PlamoBuild.xextproto-7.3.0 2017-01-25 10:50:47.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/xextproto/PlamoBuild.xextproto-7.3.0 2017-09-12 11:01:52.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/proto/xextproto-7.3.0.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=xextproto vers=7.3.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README ChangeLog COPYING INSTALL" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,47 +70,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/xextproto $docdir/$src/specs - mv $docdir/$src/{specs,{$myname,$spec}.gz} $C - mv $C/{specs,{$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{specs,{$func,$myname,$spec}.gz} $C + mv $C/{specs,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/X11/extensions tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/xtrans-20170125/PlamoBuild.xtrans-1.3.5 2017-01-25 10:51:47.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/xtrans/PlamoBuild.xtrans-1.3.5 2017-09-12 11:05:05.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/xtrans-1.3.5.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=xtrans vers=1.3.5 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README ChangeLog INSTALL COPYING AUTHORS" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,48 +70,17 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/xtrans $docdir/$src/doc - mv $docdir/$src/{doc,{INSTALL,COPYING,AUTHORS,$myname,$spec}.gz} $C - mv $C/{doc,{INSTALL,COPYING,AUTHORS,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{doc,{INSTALL,COPYING,AUTHORS,$func,$myname,$spec}.gz} $C + mv $C/{doc,{INSTALL,COPYING,AUTHORS,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P usr/include/X11/Xtrans tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/aclocal | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/util_macros-20170125/PlamoBuild.util_macros-1.19.0 2017-01-25 10:54:51.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/util_macros/PlamoBuild.util_macros-1.19.0 2017-09-12 11:16:00.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/util/util-macros-1.19.0.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=util_macros vers=1.19.0 arch=`uname -m` -build=P2 +build=P3 src=util-macros-$vers patchfiles="" OPT_CONFIG="" DOCS="README INSTALL COPYING ChangeLog" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +70,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/share/aclocal | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/util-macros tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/xcb_proto-20170125/PlamoBuild.xcb_proto-1.11 2017-01-25 10:57:47.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/xcb_proto/PlamoBuild.xcb_proto-1.11 2017-09-12 11:19:32.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/xcb/xcb-proto-1.11.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=xcb_proto vers=1.11 arch=`uname -m` -build=P2 +build=P3 src=xcb-proto-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS TODO INSTALL COPYING README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir/python*/site-packages | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` @@ -318,6 +79,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libpthread_stubs-20170125/PlamoBuild.libpthread_stubs-0.3 2017-01-25 11:00:42.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libpthread_stubs/PlamoBuild.libpthread_stubs-0.3 2017-09-12 11:22:52.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/xcb/libpthread-stubs-0.3.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libpthread_stubs vers=0.3 arch=`uname -m` -build=P2 +build=P3 src=libpthread-stubs-$vers patchfiles="" OPT_CONFIG="" DOCS="README COPYING" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,42 +70,11 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXau-20170131/PlamoBuild.libXau-1.0.8 2017-01-31 14:30:54.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXau/PlamoBuild.libXau-1.0.8 2017-09-12 11:28:03.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXau-1.0.8.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXau vers=1.0.8 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS ChangeLog COPYING INSTALL README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,39 +70,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11 | tail -n+2` @@ -320,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libxcb-20170125/PlamoBuild.libxcb-1.11.1 2017-01-25 11:02:57.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libxcb/PlamoBuild.libxcb-1.11.1 2017-09-12 11:30:41.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/xcb/libxcb-1.11.1.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libxcb vers=1.11.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-xinput" DOCS="NEWS INSTALL COPYING README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,43 +70,13 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libxcb/tutorial $docdir/$src chown -R root.root $docdir/$src/tutorial - mv $docdir/$src/{tutorial,{$myname,$spec}.gz} $C - mv $C/{tutorial,{$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{tutorial,{$func,$myname,$spec}.gz} $C + mv $C/{tutorial,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/xcb @@ -324,6 +85,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/kbproto-20170125/PlamoBuild.kbproto-1.0.7 2017-01-25 11:03:50.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/kbproto/PlamoBuild.kbproto-1.0.7 2017-09-12 11:41:13.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/proto/kbproto-1.0.7.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=kbproto vers=1.0.7 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL README ChangeLog COPYING" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,47 +70,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/kbproto $docdir/$src/specs - mv $docdir/$src/{specs,{$myname,$spec}.gz} $C - mv $C/{specs,{$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{specs,{$func,$myname,$spec}.gz} $C + mv $C/{specs,{$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/inputproto-20170125/PlamoBuild.inputproto-2.3.1 2017-01-25 11:04:25.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/inputproto/PlamoBuild.inputproto-2.3.1 2017-09-12 11:43:31.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/proto/inputproto-2.3.1.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=inputproto vers=2.3.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog README INSTALL" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,43 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libX11-20170125/PlamoBuild.libX11-1.6.3 2017-01-25 11:06:02.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libX11/PlamoBuild.libX11-1.6.3 2017-09-12 11:47:15.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libX11-1.6.3.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libX11 vers=1.6.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README COPYING AUTHORS NEWS INSTALL ChangeLog" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libX11 $docdir/$src/specs mv $docdir/$src/{specs,{COPYING,AUTHORS,NEWS,INSTALL,ChangeLog}.gz} $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{specs,{COPYING,AUTHORS,NEWS,INSTALL,ChangeLog}.gz} $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11 | tail -n+2` @@ -327,6 +88,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libICE-20170125/PlamoBuild.libICE-1.0.9 2017-01-25 11:07:59.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libICE/PlamoBuild.libICE-1.0.9 2017-09-12 12:13:31.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libICE-1.0.9.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libICE vers=1.0.9 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL README AUTHORS COPYING ChangeLog" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,42 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libICE $docdir/$src/doc - mv $docdir/$src/{doc,{AUTHORS,COPYING,ChangeLog,$myname,$spec}.gz} $C - mv $C/{doc,{AUTHORS,COPYING,ChangeLog,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{doc,{AUTHORS,COPYING,ChangeLog,$func,$myname,$spec}.gz} $C + mv $C/{doc,{AUTHORS,COPYING,ChangeLog,$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/X11/ICE @@ -322,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libSM-20170125/PlamoBuild.libSM-1.2.2 2017-01-25 11:08:43.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libSM/PlamoBuild.libSM-1.2.2 2017-09-12 12:16:11.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libSM-1.2.2.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libSM vers=1.2.2 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING AUTHORS INSTALL README ChangeLog" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,42 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libSM $docdir/$src/doc - mv $docdir/$src/{doc,{INSTALL,README,ChangeLog,$myname,$spec}.gz} $C - mv $C/{doc,{INSTALL,README,ChangeLog,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{doc,{INSTALL,README,ChangeLog,$func,$myname,$spec}.gz} $C + mv $C/{doc,{INSTALL,README,ChangeLog,$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/X11/SM @@ -322,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXt-20170125/PlamoBuild.libXt-1.1.5 2017-01-25 11:09:47.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXt/PlamoBuild.libXt-1.1.5 2017-09-12 12:19:11.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXt-1.1.5.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXt vers=1.1.5 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog README INSTALL" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,42 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libXt $docdir/$src/specs - mv $docdir/$src/{specs,{ChangeLog,README,INSTALL,$myname,$spec}.gz} $C - mv $C/{specs,{ChangeLog,README,INSTALL,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{specs,{ChangeLog,README,INSTALL,$func,$myname,$spec}.gz} $C + mv $C/{specs,{ChangeLog,README,INSTALL,$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11 | tail -n+2` @@ -323,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXext-20170125/PlamoBuild.libXext-1.3.3 2017-01-25 08:40:11.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXext/PlamoBuild.libXext-1.3.3 2017-09-14 16:08:41.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXext-1.3.3.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXext vers=1.3.3 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS ChangeLog COPYING README INSTALL" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libXext $docdir/$src/specs mv $docdir/$src/{specs,{AUTHORS,ChangeLog,COPYING,README,INSTALL}.gz} $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{specs,{AUTHORS,ChangeLog,COPYING,README,INSTALL}.gz} $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` @@ -325,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/renderproto-20170131/PlamoBuild.renderproto-0.11.1 2017-01-31 14:31:32.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/renderproto/PlamoBuild.renderproto-0.11.1 2017-09-14 16:29:29.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/proto/renderproto-0.11.1.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=renderproto vers=0.11.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog renderproto.txt README COPYING INSTALL" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,43 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXrender-20170125/PlamoBuild.libXrender-0.9.9 2017-01-25 20:38:44.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXrender/PlamoBuild.libXrender-0.9.9 2017-09-14 16:31:33.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXrender-0.9.9.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXrender vers=0.9.9 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL README doc/libXrender.txt COPYING AUTHORS ChangeLog" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,39 +70,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src{,/doc} - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` @@ -319,6 +80,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/font_util-2070219/PlamoBuild.font_util-1.2.0 2017-02-19 02:11:07.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/font_util/PlamoBuild.font_util-1.2.0 2017-09-20 11:34:18.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/font/font-util-1.2.0.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=font_util vers=1.2.0 arch=`uname -m` -build=P3 +build=P4 src=font-util-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL README COPYING ChangeLog" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,39 +70,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + 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/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/aclocal | tail -n+2` @@ -320,6 +81,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/fixesproto-20170214/PlamoBuild.fixesproto-5.0 2017-02-14 21:28:56.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/fixesproto/PlamoBuild.fixesproto-5.0 2017-09-21 15:18:35.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/proto/fixesproto-5.0.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=fixesproto vers=5.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog INSTALL README fixesproto.txt AUTHORS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,43 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXfixes-20170214/PlamoBuild.libXfixes-5.0.1 2017-02-14 20:57:10.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXfixes/PlamoBuild.libXfixes-5.0.1 2017-09-21 15:20:57.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXfixes-5.0.1.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXfixes vers=5.0.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING AUTHORS README INSTALL ChangeLog" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,39 +70,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` @@ -320,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXi-20170214/PlamoBuild.libXi-1.7.4 2017-02-14 21:20:34.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXi/PlamoBuild.libXi-1.7.4 2017-09-21 15:25:58.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXi-1.7.4.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXi vers=1.7.4 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog COPYING README INSTALL" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libXi $docdir/$src/specs mv $docdir/$src/{specs,{ChangeLog,COPYING,README,INSTALL}.gz} $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{specs,{ChangeLog,COPYING,README,INSTALL}.gz} $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` @@ -325,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/recordproto-21070214/PlamoBuild.recordproto-1.14.2 2017-02-14 21:45:47.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/recordproto/PlamoBuild.recordproto-1.14.2 2017-09-21 15:32:51.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/proto/recordproto-1.14.2.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=recordproto vers=1.14.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL README COPYING ChangeLog" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,47 +70,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/recordproto $docdir/$src/specs - mv $docdir/$src/{specs,{COPYING,ChangeLog,$myname,$spec}.gz} $C - mv $C/{specs,{COPYING,ChangeLog,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{specs,{COPYING,ChangeLog,$func,$myname,$spec}.gz} $C + mv $C/{specs,{COPYING,ChangeLog,$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXtst-20170214/PlamoBuild.libXtst-1.2.2 2017-02-14 22:38:17.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXtst/PlamoBuild.libXtst-1.2.2 2017-09-21 15:36:35.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXtst-1.2.2.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXtst vers=1.2.2 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING INSTALL ChangeLog README" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,42 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libXtst $docdir/$src/specs - mv $docdir/$src/{specs,{ChangeLog,README,$myname,$spec}.gz} $C - mv $C/{specs,{ChangeLog,README,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{specs,{ChangeLog,README,$func,$myname,$spec}.gz} $C + mv $C/{specs,{ChangeLog,README,$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11/extensions | tail -n+2` @@ -323,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXdmcp-20170215/PlamoBuild.libXdmcp-1.1.2 2017-02-15 10:22:31.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXdmcp/PlamoBuild.libXdmcp-1.1.2 2017-09-21 15:38:32.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXdmcp-1.1.2.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXdmcp vers=1.1.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog INSTALL Wraphelp.README.crypto README COPYING AUTHORS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libXdmcp $docdir/$src/doc mv $docdir/$src/{doc,{ChangeLog,INSTALL,Wraphelp.README.crypto}.gz} $C - mv $docdir/$src/{README,COPYING,AUTHORS,$myname,$spec}.gz $C + mv $docdir/$src/{README,COPYING,AUTHORS,$func,$myname,$spec}.gz $C mv $C/{doc,{ChangeLog,INSTALL,Wraphelp.README.crypto}.gz} $docdir/$src - mv $C/{README,COPYING,AUTHORS,$myname,$spec}.gz $docdir/$src + mv $C/{README,COPYING,AUTHORS,$func,$myname,$spec}.gz $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include/X11 | tail -n+2` @@ -324,6 +85,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXmu-20170226/PlamoBuild.libXmu-1.1.2 2017-02-26 09:39:13.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXmu/PlamoBuild.libXmu-1.1.2 2017-09-25 13:12:54.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXmu-1.1.2.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXmu vers=1.1.2 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog README INSTALL" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,42 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libXmu $docdir/$src/doc - mv $docdir/$src/{doc,{ChangeLog,README,INSTALL,$myname,$spec}.gz} $C - mv $C/{doc,{ChangeLog,README,INSTALL,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{doc,{ChangeLog,README,INSTALL,$func,$myname,$spec}.gz} $C + mv $C/{doc,{ChangeLog,README,INSTALL,$func,$myname,$spec}.gz} $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/X11/Xmu @@ -322,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXpm-20170226/PlamoBuild.libXpm-3.5.11 2017-02-26 11:07:57.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXpm/PlamoBuild.libXpm-3.5.11 2017-09-25 13:16:34.000000000 +0900 @@ -2,249 +2,45 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXpm-3.5.11.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXpm vers=3.5.11 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL ChangeLog README COPYRIGHT AUTHORS COPYING `echo doc/{README.MSW,FAQ.html,README.AMIGA,README.html}` NEWS.old" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,41 +72,11 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -p $S/doc/xpm.PS.gz $docdir/$src/doc chown root.root $docdir/$src/doc/xpm.PS.gz touch -t `date '+%m%d0900'` $docdir/$src{,/doc} - convert + 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` @@ -325,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/libXaw-20170226/PlamoBuild.libXaw-1.0.13 2017-02-26 11:32:32.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/libXaw/PlamoBuild.libXaw-1.0.13 2017-09-25 13:18:27.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/lib/libXaw-1.0.13.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libXaw vers=1.0.13 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog INSTALL README" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libXaw $docdir/$src/specs mv $docdir/$src/{specs,{COPYING,ChangeLog,INSTALL,README}.gz} $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{specs,{COPYING,ChangeLog,INSTALL,README}.gz} $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/X11/Xaw @@ -325,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/Xwindow.txz/old/mesa-20180317/PlamoBuild.mesa-11.0.9 2018-03-17 17:00:09.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/mesa/PlamoBuild.mesa-11.0.9 2020-11-14 23:44:20.000000000 +0900 @@ -13,7 +13,7 @@ pkgbase=mesa vers=11.0.9 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="MesaLib-10.1.0-svga_texture-1.patch.gz MesaLib-9.1.6-add_xdemos-1.patch.gz @@ -23,7 +23,7 @@ --enable-osmesa --enable-xa --enable-gbm --enable-glx-tls --enable-llvm-shared-libs --with-egl-platforms=drm,x11" DOCS="" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -78,10 +78,11 @@ make install DESTDIR=$P fi done + ln -s gallium_drv_video.so $P/usr/$libdir/dri/r600_drv_video.so touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_libdir $P/usr/$libdir/dri strip_libdir $P/usr/$libdir/vdpau @@ -104,7 +105,7 @@ tar rvpf $pkg.tar -C $P etc/drirc 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/02_x11/Xwindow.txz/old/encodings-20190816/PlamoBuild.encodings-1.0.4 2019-08-16 10:23:24.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/encodings/PlamoBuild.encodings-1.0.4 2020-10-31 20:51:10.000000000 +0900 @@ -9,7 +9,7 @@ pkgbase=encodings vers=1.0.4 arch=noarch -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -65,6 +65,10 @@ make install DESTDIR=$P fi done + ( cd $P/usr/share/fonts/X11/encodings/large + mkfontscale -b -s -l -n -r -e . ) + ( cd $P/usr/share/fonts/X11/encodings + mkfontscale -b -s -l -n -r -e . -e large ) touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/02_x11/Xwindow.txz/old/font_bh_ttf-20190817/PlamoBuild.font_bh_ttf-1.0.3 2019-08-17 11:05:20.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/font_bh_ttf/PlamoBuild.font_bh_ttf-1.0.3 2020-11-07 21:54:44.000000000 +0900 @@ -9,7 +9,7 @@ pkgbase=font_bh_ttf vers=1.0.3 arch=noarch -build=P2 +build=P3 src=font-bh-ttf-$vers patchfiles="" OPT_CONFIG="" @@ -73,8 +73,12 @@ setup_docdir TZ=UTC touch -t `date -u '+%m%d0000'` $docdir/$src convert_links + prune_symlink $P/etc/fonts/conf.d tar cvpf $pkg.tar -C $P `cd $P ; find usr/share/fonts/X11/TTF | tail -n+2` + tar rvpf $pkg.tar -C $P etc/fonts/conf.avail + tar rvpf $pkg.tar -C $P `cd $P ; find etc/fonts/conf.d | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup --- plamo/02_x11/Xwindow.txz/old/xorg_server-20190821/PlamoBuild.xorg_server-1.17.4 2019-08-21 19:07:46.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/xorg_server/PlamoBuild.xorg_server-1.17.4 2020-05-04 21:26:47.000000000 +0900 @@ -10,7 +10,7 @@ pkgbase=xorg_server vers=1.17.4 arch=`uname -m` -build=P2 +build=P3 src=xorg-server-$vers patchfiles="xorg-server-1.16.2-add_prime_support-1.patch" OPT_CONFIG="--enable-listen-tcp --disable-systemd-logind" @@ -66,6 +66,7 @@ make install DESTDIR=$P fi done + chmod u+s $P/usr/bin/Xorg touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/02_x11/Xwindow.txz/old/xf86_video_intel-20190831/PlamoBuild.xf86_video_intel-git_20150923 2019-08-31 22:35:28.000000000 +0900 +++ plamo/02_x11/Xwindow.txz/xf86_video_intel/PlamoBuild.xf86_video_intel-git_20161118 2020-05-18 16:30:00.000000000 +0900 @@ -5,11 +5,11 @@ verify= digest= branch= -commitid=f0fd4d5 +commitid=169c74f pkgbase=xf86_video_intel -vers=git_20150923 +vers=git_20161118 arch=`uname -m` -build=P2 +build=P1 src=xf86-video-intel patchfiles="" OPT_CONFIG="" --- plamo/02_x11/old/libjpeg_turbo-20170121/PlamoBuild.libjpeg_turbo-1.5.0 2017-01-21 19:06:55.000000000 +0900 +++ plamo/02_x11/libjpeg_turbo/PlamoBuild.libjpeg_turbo-1.5.0 2017-09-14 13:42:06.000000000 +0900 @@ -2,249 +2,45 @@ ###################################################################### url="http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.5.0.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=libjpeg_turbo vers=1.5.0 arch=`uname -m` -build=P2 +build=P3 src=libjpeg-turbo-$vers patchfiles="" OPT_CONFIG="--with-jpeg8" DOCS="change.log BUILDING.md wizard.txt README.md* ChangeLog.md libjpeg.txt example.c usage.txt LICENSE.md coderules.txt README.ijg structure.txt" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +72,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -322,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/old/tiff-20170121/PlamoBuild.tiff-4.0.6 2017-01-21 20:47:49.000000000 +0900 +++ plamo/02_x11/tiff/PlamoBuild.tiff-4.0.6 2017-09-14 13:48:56.000000000 +0900 @@ -5,249 +5,45 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/02_x11/tiff/01-CVE-2015-8665_and_CVE-2015-8683.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/02_x11/tiff/02-fix_potential_out-of-bound_writes_in_decode_functions.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/02_x11/tiff/03-fix_potential_out-of-bound_write_in_NeXTDecode.patch.gz" +verify= +digest= +branch= +commitid= pkgbase=tiff vers=4.0.6 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="01-CVE-2015-8665_and_CVE-2015-8683.patch.gz 02-fix_potential_out-of-bound_writes_in_decode_functions.patch.gz 03-fix_potential_out-of-bound_write_in_NeXTDecode.patch.gz" OPT_CONFIG="--enable-cxx --with-docdir=/usr/share/doc/tiff --with-x" DOCS="COPYRIGHT README ChangeLog README.vms HOWTO-RELEASE TODO" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -264,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -284,42 +75,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/tiff/html $docdir/$src - mv $docdir/$src/{html,{TODO,$myname,$spec}.gz} $C - mv $C/{html,{TODO,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{html,{TODO,$func,$myname,$spec}.gz} $C + mv $C/{html,{TODO,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + 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` @@ -330,6 +91,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/old/libpng-20170201/PlamoBuild.libpng-1.6.28 2017-02-01 21:45:47.000000000 +0900 +++ plamo/02_x11/libpng/PlamoBuild.libpng-1.6.28 2017-09-14 20:55:52.000000000 +0900 @@ -3,251 +3,47 @@ ###################################################################### url="http://downloads.sourceforge.net/libpng/libpng-1.6.28.tar.xz http://downloads.sourceforge.net/libpng-apng/libpng-1.6.28-apng.patch.gz - http://downloads.sourceforge.net/libpng/libpng-1.4.20.tar.xz + http://ftp.icm.edu.pl/packages/GraphicsMagick/delegates/libpng-1.4.20.tar.xz http://downloads.sourceforge.net/libpng-apng/libpng-1.4.20-apng.patch.gz" +verify= +digest= +branch= +commitid= pkgbase=libpng vers=1.6.28 arch=`uname -m` -build=P3 +build=P4 src[0]=$pkgbase-$vers src[1]=$pkgbase-1.4.20 patchfiles[0]="libpng-1.6.28-apng.patch.gz" patchfiles[1]="libpng-1.4.20-apng.patch.gz" OPT_CONFIG="" DOCS="LICENSE ANNOUNCE CHANGES INSTALL libpng-manual.txt TODO README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -264,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -291,38 +82,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links prune_symlink $P/usr/include tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -334,6 +95,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/old/pixman-20170123/PlamoBuild.pixman-0.32.8 2017-01-23 16:14:25.000000000 +0900 +++ plamo/02_x11/pixman/PlamoBuild.pixman-0.32.8 2017-09-14 16:06:35.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://cairographics.org/releases/pixman-0.32.8.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=pixman vers=0.32.8 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README NEWS COPYING ChangeLog INSTALL AUTHORS" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/pixman-1 @@ -318,6 +79,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/02_x11/old/Xaw3d-20170925/PlamoBuild.Xaw3d-1.5E 2017-09-25 15:52:24.000000000 +0900 +++ plamo/02_x11/Xaw3d/PlamoBuild.Xaw3d-1.5E 2018-06-30 16:27:16.000000000 +0900 @@ -10,7 +10,7 @@ pkgbase=Xaw3d vers=1.5E arch=`uname -m` -build=P7 +build=P8 src=$pkgbase-$vers patchfiles="Xaw3d-1.5E-MultiSrc.c.patch.gz" OPT_CONFIG="" @@ -40,9 +40,9 @@ done apply_patches cd $B - cp -p Imakefile Imakefile.orig - sed 's@#undef ARROW@#define ARROW@g' Imakefile.orig \ - | sed 's@XCOMM EXTRA@EXTRA@g' > Imakefile + cp -p Imakefile{,.orig} + sed -i '/ARROW/s@^#undef@#define@;/EXTRA/s@^XCOMM @@' Imakefile + ln -s exports/include/X11 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/02_x11/old/fonts_append_plamo-20190922/PlamoBuild.fonts_append_plamo-5.0 2019-09-22 17:13:51.000000000 +0900 +++ plamo/02_x11/fonts_append_plamo/PlamoBuild.fonts_append_plamo-5.0 2020-11-08 14:24:10.000000000 +0900 @@ -9,7 +9,7 @@ pkgbase=fonts_append_plamo vers=5.0 arch=noarch -build=P3 +build=P4 src=fonts-append-plamo-$vers patchfiles="" OPT_CONFIG="" @@ -66,7 +66,10 @@ fi done install -d $P/usr/share/fonts - cp -a * $P/usr/share/fonts ; chown -R root.root $P/usr/share/fonts + cp -a . $P/usr/share/fonts ; chown -R root.root $P/usr/share/fonts + install -d $P/usr/share/ghostscript/fonts + ln -s ../../fonts/TrueType/ipag.ttf $P/usr/share/ghostscript/fonts + ln -s ../../fonts/TrueType/ipam.ttf $P/usr/share/ghostscript/fonts touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ @@ -75,72 +78,87 @@ setup_docdir convert_links prune_symlink $P/usr/share/fonts/TrueType + prune_symlink $P/usr/share/ghostscript/fonts cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg + EOF + cat <<- "EOF" >> $P/install/doinst.sh make_bold() { - echo -n \$OUT - gunzip -c \$IN | pcf2bdf | qmkbold \$1 \$2 | bdftopcf | gzip > \$OUT - chown root.wheel \$OUT - echo -n " " + [ $first -eq 0 ] && echo -n " " + gunzip -c $IN | pcf2bdf | qmkbold $1 $2 | bdftopcf | gzip > $OUT + chown root.wheel $OUT + echo -n $OUT ; first=0 } echo "Making some bold fonts in /usr/share/fonts/Bitmap directory." - echo "Please wait..." + echo "Please wait..." ; first=1 ( cd /usr/share/fonts/Bitmap - IN=5x10a.pcf.gz ; OUT=5x10b.pcf.gz ; make_bold - IN=shnm6x12a.pcf.gz ; OUT=shnm6x12ab.pcf.gz ; make_bold -r -L - IN=shnm7x14a.pcf.gz ; OUT=shnm7x14ab.pcf.gz ; make_bold -r -L - IN=shnm8x16a.pcf.gz ; OUT=shnm8x16ab.pcf.gz ; make_bold -r -L - IN=9x18m.pcf.gz ; OUT=9x18b.pcf.gz ; make_bold -r -L - IN=9x18gm.pcf.gz ; OUT=9x18gb.pcf.gz ; make_bold -r -L - IN=10x20gm.pcf.gz ; OUT=10x20gb.pcf.gz ; make_bold -r -L - IN=12x24.pcf.gz ; OUT=12x24b.pcf.gz ; make_bold -r -L - IN=13x26.pcf.gz ; OUT=13x26b.pcf.gz ; make_bold -r -L - echo - IN=5x10rk.pcf.gz ; OUT=5x10rkb.pcf.gz ; make_bold - IN=shnm6x12r.pcf.gz ; OUT=shnm6x12rb.pcf.gz ; make_bold -r -L - IN=shnm7x14r.pcf.gz ; OUT=shnm7x14rb.pcf.gz ; make_bold -r -L - IN=shnm8x16r.pcf.gz ; OUT=shnm8x16rb.pcf.gz ; make_bold -r -L - IN=9x18rkm.pcf.gz ; OUT=9x18rkb.pcf.gz ; make_bold -r -L - IN=9x18grkm.pcf.gz ; OUT=9x18grkb.pcf.gz ; make_bold -r -L - IN=10x20grkm.pcf.gz ; OUT=10x20grkb.pcf.gz ; make_bold -r -L - IN=12x24rk.pcf.gz ; OUT=12x24rkb.pcf.gz ; make_bold -r -L - IN=13x26rk.pcf.gz ; OUT=13x26rkb.pcf.gz ; make_bold -r -L - IN=min_16x32r.pcf.gz ; OUT=min_16x32rb.pcf.gz ; make_bold -r -L - echo - IN=knj10.pcf.gz ; OUT=knj10b.pcf.gz ; make_bold - IN=knj10min.pcf.gz ; OUT=knj10minb.pcf.gz ; make_bold - IN=shnmk12.pcf.gz ; OUT=shnmk12b.pcf.gz ; make_bold -r -L - IN=shnmk12min.pcf.gz ; OUT=shnmk12minb.pcf.gz ; make_bold -r -L - IN=shnmleftk14.pcf.gz ; OUT=shnmleftk14b.pcf.gz ; make_bold -r -L - IN=shnmleftk14min.pcf.gz ; OUT=shnmleftk14minb.pcf.gz ; make_bold -r -L - IN=shnmleftk16.pcf.gz ; OUT=shnmleftk16b.pcf.gz ; make_bold -r -L - IN=shnmleftk16min.pcf.gz ; OUT=shnmleftk16minb.pcf.gz ; make_bold -r -L - IN=k18gm.pcf.gz ; OUT=k18gb.pcf.gz ; make_bold -r -L - IN=k18m.pcf.gz ; OUT=k18b.pcf.gz ; make_bold -r -L - IN=k20gm.pcf.gz ; OUT=k20gb.pcf.gz ; make_bold -r -L - IN=jiskan24.pcf.gz ; OUT=jiskan24b.pcf.gz ; make_bold -r -L - IN=kanji26.pcf.gz ; OUT=kanji26b.pcf.gz ; make_bold -r -L - IN=min_k32.pcf.gz ; OUT=min_k32b.pcf.gz ; make_bold -r -L - echo - ) + IN=5x10a.pcf.gz ; OUT=5x10b.pcf.gz ; make_bold + IN=shnm6x12a.pcf.gz ; OUT=shnm6x12ab.pcf.gz ; make_bold -r -L + IN=shnm7x14a.pcf.gz ; OUT=shnm7x14ab.pcf.gz ; make_bold -r -L + IN=shnm8x16a.pcf.gz ; OUT=shnm8x16ab.pcf.gz ; make_bold -r -L + IN=9x18m.pcf.gz ; OUT=9x18b.pcf.gz ; make_bold -r -L + IN=9x18gm.pcf.gz ; OUT=9x18gb.pcf.gz ; make_bold -r -L + IN=10x20gm.pcf.gz ; OUT=10x20gb.pcf.gz ; make_bold -r -L + IN=12x24.pcf.gz ; OUT=12x24b.pcf.gz ; make_bold -r -L + IN=13x26.pcf.gz ; OUT=13x26b.pcf.gz ; make_bold -r -L + echo ; first=1 + IN=5x10rk.pcf.gz ; OUT=5x10rkb.pcf.gz ; make_bold + IN=shnm6x12r.pcf.gz ; OUT=shnm6x12rb.pcf.gz ; make_bold -r -L + IN=shnm7x14r.pcf.gz ; OUT=shnm7x14rb.pcf.gz ; make_bold -r -L + IN=shnm8x16r.pcf.gz ; OUT=shnm8x16rb.pcf.gz ; make_bold -r -L + IN=9x18rkm.pcf.gz ; OUT=9x18rkb.pcf.gz ; make_bold -r -L + IN=9x18grkm.pcf.gz ; OUT=9x18grkb.pcf.gz ; make_bold -r -L + IN=10x20grkm.pcf.gz ; OUT=10x20grkb.pcf.gz ; make_bold -r -L + IN=12x24rk.pcf.gz ; OUT=12x24rkb.pcf.gz ; make_bold -r -L + IN=13x26rk.pcf.gz ; OUT=13x26rkb.pcf.gz ; make_bold -r -L + IN=min_16x32r.pcf.gz ; OUT=min_16x32rb.pcf.gz ; make_bold -r -L + echo ; first=1 + IN=knj10.pcf.gz ; OUT=knj10b.pcf.gz ; make_bold + IN=knj10min.pcf.gz ; OUT=knj10minb.pcf.gz ; make_bold + IN=shnmk12.pcf.gz ; OUT=shnmk12b.pcf.gz ; make_bold -r -L + IN=shnmk12min.pcf.gz ; OUT=shnmk12minb.pcf.gz ; make_bold -r -L + IN=shnmleftk14.pcf.gz ; OUT=shnmleftk14b.pcf.gz ; make_bold -r -L + IN=shnmleftk14min.pcf.gz ; OUT=shnmleftk14minb.pcf.gz ; make_bold -r -L + IN=shnmleftk16.pcf.gz ; OUT=shnmleftk16b.pcf.gz ; make_bold -r -L + IN=shnmleftk16min.pcf.gz ; OUT=shnmleftk16minb.pcf.gz ; make_bold -r -L + IN=k18gm.pcf.gz ; OUT=k18gb.pcf.gz ; make_bold -r -L + IN=k18m.pcf.gz ; OUT=k18b.pcf.gz ; make_bold -r -L + IN=k20gm.pcf.gz ; OUT=k20gb.pcf.gz ; make_bold -r -L + IN=jiskan24.pcf.gz ; OUT=jiskan24b.pcf.gz ; make_bold -r -L + IN=kanji26.pcf.gz ; OUT=kanji26b.pcf.gz ; make_bold -r -L + IN=min_k32.pcf.gz ; OUT=min_k32b.pcf.gz ; make_bold -r -L + echo ) echo "done." - echo -n "Initializing Bitmap fonts directory..." + echo "Initializing Bitmap fonts directory..." mkfontdir /usr/share/fonts/Bitmap - echo -n "Initializing freefont fonts directory..." + echo "Initializing freefont fonts directory..." mkfontscale /usr/share/fonts/freefont mkfontdir /usr/share/fonts/freefont - echo -n "Initializing TrueType fonts directory..." + echo "Initializing TrueType fonts directory..." mkfontscale /usr/share/fonts/TrueType - echo -n "Initializing ghostscript fonts directory..." + echo "Initializing ghostscript fonts directory..." mkfontdir /usr/share/fonts/ghostscript echo "done." + for i in 100dpi 75dpi TTF Type1 misc ; do + if [ $i == TTF -o $i == Type1 ] ; then + echo "making font.scale in /usr/share/fonts/X11/$i" + mkfontscale /usr/share/fonts/X11/$i + fi + echo "making font.dir in /usr/share/fonts/X11/$i" + mkfontdir /usr/share/fonts/X11/$i + done #%% end EOF TZ=UTC touch -t `date -u '+%m%d0000'` $P/install/doinst.sh - tar cvpf $pkg.tar -C $P `cd $P ; find usr/share/fonts/Bitmap -maxdepth 1 | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/fonts/TrueType -maxdepth 1 | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/fonts/freefont -maxdepth 1 | tail -n+2` + tar cvpf $pkg.tar -C $P \ + `cd $P ; find usr/share/fonts/Bitmap -maxdepth 1 | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/share/fonts/freefont -maxdepth 1 | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/share/fonts/TrueType -maxdepth 1 | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/share/ghostscript/fonts -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src tar rvpf $pkg.tar -C $P install/doinst.sh TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar --- plamo/03_xclassics/Xwindow2.txz/old/xorg_cf_files-20170213/PlamoBuild.xorg_cf_files-1.0.6 2017-02-13 19:52:02.000000000 +0900 +++ plamo/03_xclassics/Xwindow2.txz/xorg_cf_files/PlamoBuild.xorg_cf_files-1.0.6 2017-09-20 22:20:48.000000000 +0900 @@ -2,239 +2,41 @@ ###################################################################### url="https://www.x.org/archive/individual/util/xorg-cf-files-1.0.6.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=xorg_cf_files vers=1.0.6 arch=`uname -m` -build=P1 +build=P2 src=xorg-cf-files-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING README INSTALL ChangeLog" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p linux.cf{,.orig} cat <<- "EOF" | patch linux.cf @@ -249,12 +51,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -271,12 +67,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -291,43 +82,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P usr/$libdir/X11/config tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/Xwindow2.txz/old/imake-20170207/PlamoBuild.imake-1.0.7 2017-02-07 19:40:01.000000000 +0900 +++ plamo/03_xclassics/Xwindow2.txz/imake/PlamoBuild.imake-1.0.7 2017-09-20 11:22:48.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/util/imake-1.0.7.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=imake vers=1.0.7 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README INSTALL ChangeLog COPYING" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,43 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/Xwindow2.txz/old/gccmakedep-20170207/PlamoBuild.gccmakedep-1.0.3 2017-02-07 19:41:37.000000000 +0900 +++ plamo/03_xclassics/Xwindow2.txz/gccmakedep/PlamoBuild.gccmakedep-1.0.3 2017-09-20 21:32:45.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.x.org/archive/individual/util/gccmakedep-1.0.3.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=gccmakedep vers=1.0.3 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog COPYING" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,43 +70,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/Xwindow2.txz/old/xorg_cf_files-20170920~/PlamoBuild.xorg_cf_files-1.0.6 2017-09-20 22:20:48.000000000 +0900 +++ plamo/03_xclassics/Xwindow2.txz/xorg_cf_files/PlamoBuild.xorg_cf_files-1.0.6 2017-09-20 11:38:03.000000000 +0900 @@ -43,7 +43,7 @@ 235c235 < -D_BSD_SOURCE -D_SVID_SOURCE \ --- - > -D_BSD_SOURCE -D_SVID_SOURCE \ + > -D_DEFAULT_SOURCE \ 1081a1082,1084 > # endif > # ifndef LibDir --- plamo/03_xclassics/fep.txz/old/Canna-20170207/PlamoBuild.Canna-37p3 2017-02-07 20:05:46.000000000 +0900 +++ plamo/03_xclassics/fep.txz/Canna/PlamoBuild.Canna-37p3 2017-09-20 21:47:29.000000000 +0900 @@ -6,251 +6,50 @@ http://www.nslabs.jp/archives/nicolatter-1.7.9.tar.gz http://www.j10n.org/libspt/libspt-1.1.tar.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/fep.txz/Canna/libspt-1.1-set_timefield.patch.gz - http://cannadic.oucrc.org/cannadic-0.95c.tar.gz" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/fep.txz/Canna/cannadic-0.95c.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=Canna vers=37p3 arch=`uname -m` -build=P6 +build=P7 src[0]=Canna37p3 src[1]=libspt-1.1 src[2]=cannadic-0.95c patchfiles[0]="Canna37p3-keybind.patch.gz nicolatter-1.7.9/patch/Canna37p1-q1.diff" patchfiles[1]="libspt-1.1-set_timefield.patch.gz" -patchfiles[2]="" -OPT_CONFIG[0]="" -OPT_CONFIG[1]="" -OPT_CONFIG[2]="" +OPT_CONFIG="" DOCS[0]="`echo canuum/{COPYRIGHT,README.{copyright,jp}}` ChangeLog CHANGES.jp COPYRIGHT INSTALL INSTALL.jp OCHANGES.jp README README.jp RKCCONF.jp WHATIS WHATIS.jp" DOCS[1]="CHANGES COPYRIGHT INSTALL" DOCS[2]="README.ja COPYING" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd ${B[0]} cp -p Canna.conf{,.orig} cat <<- EOF | patch Canna.conf @@ -286,12 +85,6 @@ sed -i 's@man$@share/man@g' Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -316,12 +109,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -403,47 +191,17 @@ unix EOF touch -t `date '+%m%d0900'` $P/etc/hosts.canna - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/doc $docdir/$src chown -R root.root $docdir/$src/doc find $docdir/$src/doc -name ".cvsignore" -exec rm -f {} \; ( cd $docdir ; find $src/doc -type d -exec touch -r $W/{} {} \; ) mv $docdir/$src/{doc,{INSTALL{,.jp},OCHANGES.jp,README{,.jp}}.gz} $C - mv $docdir/$src/{RKCCONF.jp,WHATIS{,.jp},$myname,$spec}.gz $C + mv $docdir/$src/{RKCCONF.jp,WHATIS{,.jp},$func,$myname,$spec}.gz $C mv $C/{doc,{INSTALL{,.jp},OCHANGES.jp,README{,.jp}}.gz} $docdir/$src - mv $C/{RKCCONF.jp,WHATIS{,.jp},$myname,$spec}.gz $docdir/$src + mv $C/{RKCCONF.jp,WHATIS{,.jp},$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links prune_symlink $mandir/ja_JP.eucJP/man3 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` @@ -462,6 +220,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/fep.txz/old/Canna-20170920/PlamoBuild.Canna-37p3 2017-09-20 21:47:29.000000000 +0900 +++ plamo/03_xclassics/fep.txz/Canna/PlamoBuild.Canna-37p3 2018-07-06 16:27:31.000000000 +0900 @@ -4,8 +4,6 @@ url="http://jaist.dl.sourceforge.jp/canna/9565/Canna37p3.tar.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/fep.txz/Canna/Canna37p3-keybind.patch.gz http://www.nslabs.jp/archives/nicolatter-1.7.9.tar.gz - http://www.j10n.org/libspt/libspt-1.1.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/fep.txz/Canna/libspt-1.1-set_timefield.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/fep.txz/Canna/cannadic-0.95c.tar.gz" verify= digest= @@ -14,19 +12,16 @@ pkgbase=Canna vers=37p3 arch=`uname -m` -build=P7 -src[0]=Canna37p3 -src[1]=libspt-1.1 -src[2]=cannadic-0.95c +build=P8 +src[0]=$pkgbase$vers +src[1]=cannadic-0.95c patchfiles[0]="Canna37p3-keybind.patch.gz nicolatter-1.7.9/patch/Canna37p1-q1.diff" -patchfiles[1]="libspt-1.1-set_timefield.patch.gz" OPT_CONFIG="" DOCS[0]="`echo canuum/{COPYRIGHT,README.{copyright,jp}}` ChangeLog CHANGES.jp COPYRIGHT INSTALL INSTALL.jp OCHANGES.jp README README.jp RKCCONF.jp WHATIS WHATIS.jp" -DOCS[1]="CHANGES COPYRIGHT INSTALL" -DOCS[2]="README.ja COPYING" +DOCS[1]="README.ja COPYING" template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -80,9 +75,6 @@ --- > JMNLOCALE = ja_JP.eucJP EOF - cd ${B[1]} - cp -p Makefile.in{,.orig} - sed -i 's@man$@share/man@g' Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -93,18 +85,14 @@ done cd ${B[0]} xmkmf - cd canuum - xmkmf -a fi if [ $opt_build -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - case $i in - 0) make canna ; ( cd canuum ; make ) ;; - 1) make ;; - 2) make maindic ;; - esac + if [ $i -eq 0 ] ; then + make canna ; ( cd canuum ; xmkmf -a ; make ) + fi fi done fi @@ -119,38 +107,17 @@ if [ $i -eq 0 ] ; then make -i install install.man DESTDIR=$P ( cd canuum ; make install install.man DESTDIR=$P ) - elif [ $i -eq 1 ] ; then - make -i install DESTDIR=$P fi fi done - cd ${B[2]} - cannadicdir=$P/var/lib/canna/dic/canna - install -o bin -g bin -m 664 gcanna.c[bl]d $cannadicdir - install -o bin -g bin -m 664 gcannaf.ctd $cannadicdir - cp -p $cannadicdir/dics.dir{,.orig} - cat <<- "EOF" | patch $cannadicdir/dics.dir - 25a26,28 - > gcanna.cbd(gcanna.mwd) -gcanna--- - > gcanna.cld(gcanna.mwd) -gcanna--- - > gcannaf.ctd(.swd) -gcannaf--- - EOF - cannalibdir=$P/usr/$libdir/canna - cp -p $cannalibdir/default.canna{,.orig} - cat <<- "EOF" | patch $cannalibdir/default.canna - 27c27,29 - < "iroha" - --- - > "gcanna" - > "gcannaf" - > ; "iroha" - EOF + cd ${B[1]} + install -d $P/var/lib/canna/dic/canna + install -o bin -g bin -m 664 gcanna{,f}.ctd $P/var/lib/canna/dic/canna touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_bindir $P/usr/libexec gzip_dir $mandir/ja_JP.eucJP/man1 gzip_dir $mandir/ja_JP.eucJP/man3 install -d $P/etc/rc.d/init.d @@ -203,13 +170,42 @@ touch -r $S $docdir/$src convert_links prune_symlink $mandir/ja_JP.eucJP/man3 + cat <<- EOF | unexpand >> $P/install/doinst.sh + #%% begin initialize $pkg + cannadicdir=/var/lib/canna/dic/canna + crxdic -m -o \$cannadicdir/gcanna.cbd \$cannadicdir/gcanna.ctd + crfreq -div 512 \$cannadicdir/gcanna.cbd gcanna.mwd + chown bin.bin \$cannadicdir/gcanna.c[bl]d + chmod 664 \$cannadicdir/gcanna.c[bl]d + if [ ! -f \$cannadicdir/dics.dir.orig ] ; then + cp -p \$cannadicdir/dics.dir \$cannadicdir/dics.dir.orig + cat <<- "EOF" | patch \$cannadicdir/dics.dir + 25a26,28 + > gcanna.cbd(gcanna.mwd) -gcanna--- + > gcanna.cld(gcanna.mwd) -gcanna--- + > gcannaf.ctd(.swd) -gcannaf--- + EOF + fi + cannalibdir=/usr/$libdir/canna + if [ ! -f \$cannalibdir/$libdir/canna/default.canna.orig ] ; then + cp -p \$cannalibdir/default.canna \$cannalibdir/default.canna.orig + cat <<- "EOF" | patch \$cannalibdir/default.canna + 27c27,29 + < "iroha" + --- + > "gcanna" + > "gcannaf" + > ; "iroha" + EOF + fi + #%% end + 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 usr/libexec | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 | 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 var/lib/canna - tar rvpf $pkg.tar -C $P var/log/canna + tar rvpf $pkg.tar -C $P usr/include/canna + tar rvpf $pkg.tar -C $P var/{lib,log}/canna tar rvpf $pkg.tar -C $P etc/rc.d/init.d/canna.r tar rvpf $pkg.tar -C $P etc/hosts.canna tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` --- plamo/03_xclassics/fep.txz/old/skkfep-20170207/PlamoBuild.skkfep-0.87 2017-02-07 20:19:31.000000000 +0900 +++ plamo/03_xclassics/fep.txz/skkfep/PlamoBuild.skkfep-0.87 2017-09-20 21:58:29.000000000 +0900 @@ -1,240 +1,42 @@ #!/bin/sh ###################################################################### -url="http://homepage2.nifty.com/aito/skkfep/skkfep-0.87.tar.gz" +url="http://aitoweb.world.coocan.jp/skkfep/skkfep-0.87.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=skkfep vers=0.87 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="HISTORY INSTALL README TODO" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p protoMakefile{,.orig} sed -i 's@termcap@ncurses@g' protoMakefile @@ -242,12 +44,6 @@ sed -i 's@ei5nazha@localhost@g' config.h for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,17 +56,12 @@ cd ${B[$i]} if [ -f Makefile ] ; then make + make simpledic fi done - make simpledic fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -289,43 +80,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/old/kterm-20170220/PlamoBuild.kterm-6.2.0 2017-02-20 23:23:33.000000000 +0900 +++ plamo/03_xclassics/kterm/PlamoBuild.kterm-6.2.0 2017-09-25 16:06:13.000000000 +0900 @@ -1,242 +1,44 @@ #!/bin/sh ###################################################################### -url="http://ftp.x.org/contrib/applications/kterm-6.2.0.tar.gz +url="ftp://ftp.sra.co.jp/pub/x11/kterm/kterm-6.2.0.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/kterm/kterm-patches.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/kterm/kterm-ja_ad.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=kterm vers=6.2.0 arch=`uname -m` -build=P9 +build=P10 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="DEMO.kt.uu DEMO.xbm README.kt" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B gunzip -c $W/kterm-6.2.0-16colors.diff.gz | patch -Np1 -i - gunzip -c $W/kterm-6.2.0-secure.diff.gz | patch -Np1 -i - @@ -254,12 +56,6 @@ sed '/KTERM_XAW3D/s@#undef @#define@g' kterm.h.orig > kterm.h for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -282,12 +78,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -310,38 +101,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress gzip_dir $jmandir/man1 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/X11/app-defaults/KTerm tar rvpf $pkg.tar -C $P usr/$libdir/X11/ja_JP.eucJP/app-defaults/KTerm @@ -350,6 +111,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/TiMidity++0.txz/old/TiMidity++-20170221/PlamoBuild.TiMidity++-2.14.0 2017-02-21 08:17:18.000000000 +0900 +++ plamo/03_xclassics/TiMidity++0.txz/TiMidity++/PlamoBuild.TiMidity++-2.14.0 2017-09-27 06:40:13.000000000 +0900 @@ -3,10 +3,14 @@ ###################################################################### url="http://downloads.sourceforge.net/timidity/TiMidity++-2.14.0-160604-1900.tar.xz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++0.txz/TiMidity++/guspat-20000706-required.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=TiMidity++ vers=2.14.0 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-audio=alsa,arts,esd,ao,vorbis,flac,speex @@ -16,231 +20,29 @@ INSTALL.ja README.ja doc/C/CHANGES.02i doc/C/FAQ `echo doc/C/README.{dl,sf,tk,xskin,xaw,alsaseq,m2m,mts,w32}` `echo doc/ja_JP.eucJP/README.{dl,sf,tk,xskin,xaw,alsaseq,m2m,mts,w32}`" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p timidity/timidity.h{,.orig} sed '/MAX_CHANNELS/s@32@80@g' timidity/timidity.h.orig > timidity/timidity.h @@ -257,12 +59,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -280,12 +76,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -325,38 +116,8 @@ mv $shrtmdydir/{timidity.cfg.orig,LSPATCH,NoteFreqTable,inst,timidity.cfg} $C mv $C/{timidity.cfg.orig,LSPATCH,NoteFreqTable,inst,timidity.cfg} $shrtmdydir touch -r timidity $shrtmdydir - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/bin/timidity tar rvpf $pkg.tar -C $P usr/$libdir/timidity tar rvpf $pkg.tar -C $P usr/share/emacs/site-lisp/timidity.el @@ -370,6 +131,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/TiMidity++0.txz/old/TiMidity++-20170927/PlamoBuild.TiMidity++-2.14.0 2017-09-27 06:40:13.000000000 +0900 +++ plamo/03_xclassics/TiMidity++0.txz/TiMidity++/PlamoBuild.TiMidity++-2.15.0 2018-10-06 20:47:21.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/timidity/TiMidity++-2.14.0-160604-1900.tar.xz +url="http://downloads.sourceforge.net/timidity/TiMidity++-2.15.0-181006-2000.tar.xz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++0.txz/TiMidity++/guspat-20000706-required.tar.gz" verify= digest= branch= commitid= pkgbase=TiMidity++ -vers=2.14.0 +vers=2.15.0 arch=`uname -m` -build=P5 +build=P1 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="--enable-audio=alsa,arts,esd,ao,vorbis,flac,speex +OPT_CONFIG="--enable-audio=alsa,arts,esd,jack,ao,vorbis,flac,speex --enable-dynamic=ncurses,slang,motif,tcltk,emacs,vt100,xaw,xskin,gtk,server,alsaseq --enable-network --enable-spectrogram --enable-wrd" DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS TODO ChangeLog.[123] INSTALL.ja README.ja doc/C/CHANGES.02i doc/C/FAQ `echo doc/C/README.{dl,sf,tk,xskin,xaw,alsaseq,m2m,mts,w32}` `echo doc/ja_JP.eucJP/README.{dl,sf,tk,xskin,xaw,alsaseq,m2m,mts,w32}`" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -46,17 +46,6 @@ cd $B cp -p timidity/timidity.h{,.orig} sed '/MAX_CHANNELS/s@32@80@g' timidity/timidity.h.orig > timidity/timidity.h - cp -p configure{,.orig} - cat <<- "EOF" | patch configure - 18057c18057 - < for l in tcl tcl8.5 tcl8.4 tcl84 tcl8.3 tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do - --- - > for l in tcl tcl8.6 tcl8.5 tcl8.4 tcl84 tcl8.3 tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do - 18129c18129 - < for l in tk tk8.5 tk8.4 tcl84 tk8.3 tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do - --- - > for l in tk tk8.6 tk8.5 tk8.4 tcl84 tk8.3 tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do - EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -99,8 +88,8 @@ install2 doc/ja_JP.eucJP/timidity.cfg.5 $jmandir/man5/timidity.cfg.5 touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_libdir $P/usr/$libdir/timidity touch -t `date '+%m%d0900'` $P/usr/$libdir/timidity @@ -129,7 +118,7 @@ tar rvpf $pkg.tar -C $P usr/share/man/ja_JP.eucJP/man5/timidity.cfg.5.gz tar rvpf $pkg.tar -C $P usr/share/timidity tar rvpf $pkg.tar -C $P usr/share/doc/$src - touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz - mv $pkg.tar.xz $pkg.txz + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/03_xclassics/TiMidity++1.txz/old/88proS-20170221/PlamoBuild.88proS-6.4.1 2017-02-21 00:25:37.000000000 +0900 +++ plamo/03_xclassics/TiMidity++1.txz/88proS/PlamoBuild.88proS-6.4.1 2017-09-25 14:09:09.000000000 +0900 @@ -4,215 +4,36 @@ url="ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++1.txz/88proS/88pros.zip ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++1.txz/88proS/guspat-20000706-required.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++1.txz/88proS/guspat-20000706-optional.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=88proS vers=6.4.1 arch=noarch -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ReadMe-j.txt Drumset-j.txt VupHistory-j.txt" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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 + false && download_sources + for i in $url ; do if [ ! -f ${i##*/} ] ; then wget $i ; fi ; done for i in $url ; do case ${i##*/} in 88pros.zip) ( @@ -234,25 +55,9 @@ 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -269,12 +74,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -306,44 +106,13 @@ install -d $P/guspat/usr/share cp -a timidity $P/guspat/usr/share chown -R root.root $P/guspat/usr/share/timidity - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/share/timidity/timidity.cfg.iz tar rvpf $pkg.tar -C $P/guspat usr/share/timidity tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/timidity | tail -n+3` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/03_xclassics/TiMidity++2.txz/old/eawplus-20170221/PlamoBuild.eawplus-12.2 2017-02-21 00:30:20.000000000 +0900 +++ plamo/03_xclassics/TiMidity++2.txz/eawplus/PlamoBuild.eawplus-12.2 2017-09-25 17:06:02.000000000 +0900 @@ -1,219 +1,40 @@ #!/bin/sh ###################################################################### -url="ftp://plamo.linet.gr.jp/pub/Plamo-src/pub/plamo/03_xclassics/TiMidity++2.txz/eawplus/eawplus-12.2.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src/pub/plamo/03_xclassics/TiMidity++2.txz/eawplus/guspat-20000706-required.tar.gz - ftp://plamo.linet.gr.jp/pub/Plamo-src/pub/plamo/03_xclassics/TiMidity++2.txz/eawplus/88pros.zip - ftp://plamo.linet.gr.jp/pub/Plamo-src/pub/plamo/03_xclassics/TiMidity++2.txz/eawplus/eawpats12_full.tar.gz" +url="ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++2.txz/eawplus/eawplus-12.2.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++2.txz/eawplus/guspat-20000706-required.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++2.txz/eawplus/88pros.zip + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/03_xclassics/TiMidity++2.txz/eawplus/eawpats12_full.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=eawplus vers=12.2 arch=noarch -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="changelog.txt" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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 + false && download_sources + for i in $url ; do if [ ! -f ${i##*/} ] ; then wget $i ; fi ; done for i in $url ; do case ${i##*/} in eawplus-12.2.tar.gz) @@ -240,25 +61,9 @@ 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -275,12 +80,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -321,38 +121,8 @@ install -d $P/guspat/usr/share cp -a timidity $P/guspat/usr/share chown -R root.root $P/guspat/usr/share/timidity - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/share/timidity/timidity.cfg.sh tar rvpf $pkg.tar -C $P/guspat usr/share/timidity tar rvpf $pkg.tar -C $P \ @@ -360,6 +130,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/libffi-20170121/PlamoBuild.libffi-3.0.13 2017-01-21 14:47:21.000000000 +0900 +++ plamo/04_xapps/libffi/PlamoBuild.libffi-3.0.13 2017-02-02 00:00:28.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=libffi vers=3.0.13 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -275,6 +275,7 @@ make install DESTDIR=$P fi done + ln -s libffi.so.6.0.1 $P/usr/$libdir/libffi.so.5 touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/04_xapps/old/glib-20170122/PlamoBuild.glib-2.47.5 2017-01-22 13:13:34.000000000 +0900 +++ plamo/04_xapps/glib/PlamoBuild.glib-2.47.5 2017-02-01 22:45:49.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=glib vers=2.47.5 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -249,7 +249,7 @@ fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ + --libdir=/usr/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -327,7 +327,8 @@ 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 usr/share/aclocal | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/glib-2.0 - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/gdb/auto-load | tail -n+2` + tar rvpf $pkg.tar -C $P \ + `cd $P ; find usr/share/gdb/auto-load/usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/bash-completion/completions | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/gettext/its --- plamo/04_xapps/old/gtk+_2-20170131/PlamoBuild.gtk+_2-2.24.25 2017-01-31 14:32:31.000000000 +0900 +++ plamo/04_xapps/gtk+_2/PlamoBuild.gtk+_2-2.24.25 2017-02-21 06:29:41.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=gtk+_2 vers=2.24.25 arch=`uname -m` -build=P3 +build=P4 src=gtk+-$vers patchfiles="" OPT_CONFIG="" @@ -337,6 +337,12 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert + cat <<- EOF >> $P/install/doinst.sh + #%% begin initialize $pkg + gtk-query-immodules-2.0 --update-cache + #%% end + EOF + touch -t `date '+%m%d0900'` $P/install/doinst.sh tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/gtk-2.0 tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgdk*` --- plamo/04_xapps/old/pygtk-20160214/PlamoBuild.pygtk-2.24.0 2017-02-14 06:41:54.000000000 +0900 +++ plamo/04_xapps/pygtk/PlamoBuild.pygtk-2.24.0 2017-04-19 23:09:59.000000000 +0900 @@ -5,7 +5,7 @@ pkgbase=pygtk vers=2.24.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -322,6 +322,7 @@ `cd $P ; find usr/$libdir/python*/site-packages/gtk-2.0 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/pygtk + tar rvpf $pkg.tar -C $P usr/include/pygtk-2.0 tar rvpf $pkg.tar -C $P usr/share/pygtk tar rvpf $pkg.tar -C $P usr/share/gtk-doc/html/pygtk tar rvpf $pkg.tar -C $P usr/share/doc/$src --- plamo/04_xapps/old/gcc_libffi-20170202/PlamoBuild.gcc_libffi-4.8.5 2017-02-02 19:14:23.000000000 +0900 +++ plamo/04_xapps/gcc_libffi/PlamoBuild.gcc_libffi-4.8.5 2017-07-06 21:50:32.000000000 +0900 @@ -2,13 +2,15 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - https://patchwork.ozlabs.org/patch/342434/mbox" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +verify= +commitid= pkgbase=gcc_libffi vers=4.8.5 arch=`uname -m` -build=P2 +build=P3 src=gcc-$vers -patchfiles="" +patchfiles="gcc-4.8-filename-output.patch" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -16,244 +18,31 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20161020 +template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s extglob nullglob - cd $1 - for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=gcc-4.8-filename-output.patch - for i in $url ; do - if [ ${i##*/} == mbox ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - patch -Np0 -i $W/gcc-4.8-filename-output.patch - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -273,66 +62,31 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - install -d $P/usr/$libdir - ( cd $arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi`/libffi - ./libtool --mode=install install libffi.la $P/usr/$libdir ) + false && if [ -f Makefile ] ; then + make install DESTDIR=$P fi done + install -d $P/usr/$libdir + ( cd $arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi`/libffi + ./libtool --mode=install install libffi.la $P/usr/$libdir ) rm $P/usr/$libdir/libffi.{so,la,a} touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/glib-20170201/PlamoBuild.glib-2.47.5 2017-02-01 22:45:49.000000000 +0900 +++ plamo/04_xapps/glib/PlamoBuild.glib-2.47.5 2017-09-14 13:38:52.000000000 +0900 @@ -2,251 +2,46 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/glib/2.47/glib-2.47.5.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=glib vers=2.47.5 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" OPT_CONFIG="--disable-gtk-doc-html --with-pcre=system" DOCS="ChangeLog.pre-2-2 README.rationale `echo ChangeLog.pre-2-{4,1{4,2,8,6}}` INSTALL NEWS.pre-1-3 ChangeLog.pre-2-0 README.commits ChangeLog.pre-2-6 ChangeLog HACKING README.win32 AUTHORS `echo ChangeLog.pre-{2-20,1-2}` COPYING NEWS `echo ChangeLog.pre-2-{8,10}` README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir=/usr/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -283,38 +73,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libglib*` @@ -339,6 +99,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/cairo-20170123/PlamoBuild.cairo-1.14.6 2017-01-23 18:57:19.000000000 +0900 +++ plamo/04_xapps/cairo/PlamoBuild.cairo-1.14.6 2017-09-15 06:21:35.000000000 +0900 @@ -2,10 +2,14 @@ ###################################################################### url="http://cairographics.org/releases/cairo-1.14.6.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=cairo vers=1.14.6 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-tee" @@ -13,239 +17,31 @@ README.win32 BIBLIOGRAPHY CODING_STYLE ChangeLog.pre-1.4 COPYING-LGPL-2.1 PORTING_GUIDE COPYING-MPL-1.1 COPYING `echo ChangeLog.pre-1.{6,10,8}` AUTHORS HACKING RELEASING BUGS KNOWN_ISSUES INSTALL" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -283,38 +74,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/cairo - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links touch -t `date '+%m%d0900'` $P/usr/$libdir/cairo 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 libcairo.*` @@ -328,6 +89,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/nspr-20170225/PlamoBuild.nspr-4.13.1 2017-02-25 12:00:26.000000000 +0900 +++ plamo/04_xapps/nspr/PlamoBuild.nspr-4.16 2017-09-25 18:07:17.000000000 +0900 @@ -1,248 +1,44 @@ #!/bin/sh ###################################################################### -url="http://ftp.mozilla.org/pub/nspr/releases/v4.13.1/src/nspr-4.13.1.tar.gz" +url="http://ftp.mozilla.org/pub/nspr/releases/v4.16/src/nspr-4.16.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=nspr -vers=4.13.1 +vers=4.16 arch=`uname -m` build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--with-mozilla --with-pthreads" DOCS="nspr/LICENSE" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/nspr - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,39 +73,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src{,/nspr} - convert + 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` @@ -323,6 +84,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/harfbuzz-20170131/PlamoBuild.harfbuzz-0.9.35 2017-01-31 14:32:01.000000000 +0900 +++ plamo/04_xapps/harfbuzz/PlamoBuild.harfbuzz-0.9.35 2017-09-14 16:14:44.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.35.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=harfbuzz vers=0.9.35 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="THANKS AUTHORS README COPYING TODO INSTALL NEWS ChangeLog" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -320,6 +81,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/emacs.txz/old/emacs-20160709/PlamoBuild.emacs-24.5 2016-07-09 22:50:53.000000000 +0900 +++ plamo/04_xapps/emacs.txz/emacs/PlamoBuild.emacs-24.5 2017-06-08 09:40:48.000000000 +0900 @@ -2,239 +2,42 @@ ###################################################################### url="http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz - http://homepage1.nifty.com/blankspace/emacs/wb-line-number.el" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/04_xapps/emacs.txz/emacs/wb-line-number.el" +verify= +digest= +commitid= pkgbase=emacs vers=24.5 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="--with-x-toolkit=gtk3 --without-rsvg --without-imagemagick +OPT_CONFIG="--with-x-toolkit=gtk2 --without-rsvg --without-imagemagick --without-gsettings --without-selinux" DOCS="README INSTALL COPYING BUGS ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p lisp/eshell/esh-util.el{,.orig} sed -i 's@|z2\\\\@&|xz\\\\@g' lisp/eshell/esh-util.el @@ -248,12 +51,6 @@ -e '/let/!s@|z2\\\\@&|xz\\\\@g' lisp/pcmpl-gnu.el for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -270,12 +67,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -295,24 +87,8 @@ compress strip_bindir $P/usr/libexec/emacs/$vers/* touch -t `date '+%m%d0900'` $P/usr/libexec/emacs/$vers/* - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/libexec/emacs tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/applications | tail -n+2` @@ -325,6 +101,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/emacs.txz/old/emacs-20170608/PlamoBuild.emacs-24.5 2017-06-08 09:40:48.000000000 +0900 +++ plamo/04_xapps/emacs.txz/emacs/PlamoBuild.emacs-24.5 2017-06-06 20:54:01.000000000 +0900 @@ -12,7 +12,7 @@ build=P4 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="--with-x-toolkit=gtk2 --without-rsvg --without-imagemagick +OPT_CONFIG="--with-x-toolkit=gtk3 --without-rsvg --without-imagemagick --without-gsettings --without-selinux" DOCS="README INSTALL COPYING BUGS ChangeLog" template=20170415 --- plamo/04_xapps/emacs.txz/old/emacs-20170606/PlamoBuild.emacs-24.5 2017-06-06 20:54:01.000000000 +0900 +++ plamo/04_xapps/emacs.txz/emacs/PlamoBuild.emacs-24.5 2018-08-17 10:53:19.000000000 +0900 @@ -5,17 +5,18 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/04_xapps/emacs.txz/emacs/wb-line-number.el" verify= digest= +branch= commitid= pkgbase=emacs vers=24.5 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--with-x-toolkit=gtk3 --without-rsvg --without-imagemagick --without-gsettings --without-selinux" DOCS="README INSTALL COPYING BUGS ChangeLog" -template=20170415 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -82,11 +83,11 @@ install -m 644 $W/wb-line-number.el $P/usr/share/emacs/site-lisp touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_bindir $P/usr/libexec/emacs/$vers/* - touch -t `date '+%m%d0900'` $P/usr/libexec/emacs/$vers/* + TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/libexec/emacs/$vers/* setup_docdir convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` @@ -99,7 +100,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/04_xapps/old/libffi-20170202/PlamoBuild.libffi-3.0.13 2017-02-02 00:00:28.000000000 +0900 +++ plamo/04_xapps/libffi/PlamoBuild.libffi-3.0.13 2017-09-14 13:35:32.000000000 +0900 @@ -2,248 +2,44 @@ ###################################################################### url="ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=libffi vers=3.0.13 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="ChangeLog.libgcj ChangeLog ChangeLog.libffi README ChangeLog.v1 LICENSE" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +72,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 -name libffi*` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` @@ -321,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/glib-20170914/PlamoBuild.glib-2.47.5 2017-09-14 13:38:52.000000000 +0900 +++ plamo/04_xapps/glib/PlamoBuild.glib-2.47.5 2017-12-02 19:58:28.000000000 +0900 @@ -9,7 +9,7 @@ pkgbase=glib vers=2.47.5 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-gtk-doc-html --with-pcre=system" @@ -73,16 +73,18 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_bindir $P/usr/$libdir/gio/modules + touch -t `date '+%m%d0900'` $P/usr/$libdir/gio/modules 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/pkgconfig | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libglib*` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libglib-*` tar rvpf $pkg.tar -C $P usr/$libdir/glib-2.0 - tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgmodule*` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgthread*` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgobject*` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgio*` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgmodule-*` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgthread-*` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgobject-*` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgio-*` tar rvpf $pkg.tar -C $P usr/$libdir/gio 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 usr/share/aclocal | tail -n+2` @@ -91,10 +93,11 @@ `cd $P ; find usr/share/gdb/auto-load/usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/bash-completion/completions | tail -n+2` - tar rvpf $pkg.tar -C $P usr/share/gettext/its + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/gettext/its | tail -n+2` 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/gtk-doc/html -maxdepth 1 | 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 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 --- plamo/04_xapps/old/gobject_introspection-20170124/PlamoBuild.gobject_introspection-1.42.0 2017-01-24 09:48:43.000000000 +0900 +++ plamo/04_xapps/gobject_introspection/PlamoBuild.gobject_introspection-1.42.0 2017-09-14 14:40:14.000000000 +0900 @@ -2,248 +2,44 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.42/gobject-introspection-1.42.0.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=gobject_introspection vers=1.42.0 arch=`uname -m` -build=P2 +build=P3 src=gobject-introspection-$vers patchfiles="" OPT_CONFIG="--disable-tests" DOCS="ChangeLog CONTRIBUTORS COPYING.LGPL COPYING.GPL AUTHORS NEWS TODO COPYING README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,38 +73,8 @@ compress strip_libdir $P/usr/$libdir/gobject-introspection/giscanner touch -t `date '+%m%d0900'` $P/usr/$libdir/gobject-introspection/giscanner - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 libgirepository*` tar rvpf $pkg.tar -C $P usr/$libdir/gobject-introspection @@ -328,6 +89,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/gdk_pixbuf-20170124/PlamoBuild.gdk_pixbuf-2.30.4 2017-01-24 09:51:26.000000000 +0900 +++ plamo/04_xapps/gdk_pixbuf/PlamoBuild.gdk_pixbuf-2.30.4 2017-09-14 14:43:26.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.30/gdk-pixbuf-2.30.4.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=gdk_pixbuf vers=2.30.4 arch=`uname -m` -build=P2 +build=P3 src=gdk-pixbuf-$vers patchfiles="" OPT_CONFIG="--enable-introspection=yes --with-x11" DOCS="NEWS README AUTHORS INSTALL ABOUT-NLS COPYING" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +72,8 @@ compress strip_libdir $P/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders touch -t `date '+%m%d0900'` $P/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg gdk-pixbuf-query-loaders --update-cache @@ -334,6 +95,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/atk-20170123/PlamoBuild.atk-2.12.0 2017-01-23 09:51:32.000000000 +0900 +++ plamo/04_xapps/atk/PlamoBuild.atk-2.12.0 2017-09-14 16:04:52.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/atk/2.12/atk-2.12.0.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=atk vers=2.12.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING ChangeLog MAINTAINERS README NEWS INSTALL AUTHORS" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libatk*` tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir/girepository-1.0 | tail -n+2` @@ -323,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/harfbuzz-20170914/PlamoBuild.harfbuzz-0.9.35 2017-09-14 16:14:44.000000000 +0900 +++ plamo/04_xapps/harfbuzz/PlamoBuild.harfbuzz-0.9.35 2018-10-24 13:09:00.000000000 +0900 @@ -9,12 +9,12 @@ pkgbase=harfbuzz vers=0.9.35 arch=`uname -m` -build=P4 +build=P5 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" +OPT_CONFIG="--with-graphite2" DOCS="THANKS AUTHORS README COPYING TODO INSTALL NEWS ChangeLog" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -67,8 +67,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -79,7 +79,7 @@ tar rvpf $pkg.tar -C $P usr/share/gtk-doc/html/harfbuzz 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/04_xapps/old/cairo-20170915/PlamoBuild.cairo-1.14.6 2017-09-15 06:21:35.000000000 +0900 +++ plamo/04_xapps/cairo/PlamoBuild.cairo-1.14.6 2017-09-14 16:24:47.000000000 +0900 @@ -12,7 +12,7 @@ build=P3 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="--enable-tee" +OPT_CONFIG="--enable-gl --enable-tee" DOCS="NEWS `echo ChangeLog.pre-1.{2,0}` README ChangeLog ChangeLog.pre-1.12 README.win32 BIBLIOGRAPHY CODING_STYLE ChangeLog.pre-1.4 COPYING-LGPL-2.1 PORTING_GUIDE COPYING-MPL-1.1 COPYING `echo ChangeLog.pre-1.{6,10,8}` --- plamo/04_xapps/old/pango-20170126/PlamoBuild.pango-1.36.8 2017-01-26 05:46:12.000000000 +0900 +++ plamo/04_xapps/pango/PlamoBuild.pango-1.36.8 2017-09-14 16:27:33.000000000 +0900 @@ -2,10 +2,14 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/pango/1.36/pango-1.36.8.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=pango vers=1.36.8 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -13,239 +17,31 @@ `echo ChangeLog.pre-1-{2,0,4}` AUTHORS INSTALL ChangeLog.pre-1-23 NEWS ChangeLog.pre-1-20 HACKING COPYING `echo ChangeLog.pre-1-1{2,0}` THANKS `echo ChangeLog.pre-1-{6,1{4,8}}` README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -284,38 +75,8 @@ compress strip_libdir $P/usr/$libdir/pango/1.8.0/modules touch -t `date '+%m%d0900'` $P/usr/$libdir/pango/1.8.0/modules - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg [ -d /etc/pango ] || mkdir /etc/pango @@ -337,6 +98,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/gtk+_2-20170221/PlamoBuild.gtk+_2-2.24.25 2017-02-21 06:29:41.000000000 +0900 +++ plamo/04_xapps/gtk+_2/PlamoBuild.gtk+_2-2.24.25 2017-09-16 18:06:24.000000000 +0900 @@ -2,244 +2,46 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.25.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=gtk+_2 vers=2.24.25 arch=`uname -m` -build=P4 +build=P6 src=gtk+-$vers patchfiles="" -OPT_CONFIG="" +OPT_CONFIG="--with-xinput" DOCS="ChangeLog.pre-2-2 ChangeLog README.commits README.win32 `echo ChangeLog.pre-2-{6,0}` ChangeLog.gtk-async-file-chooser `echo ChangeLog.pre-{1-2,2-{8,14},1-0}` AUTHORS INSTALL ChangeLog.pre-2-16 ChangeLog.gtk-printing NEWS HACKING ChangeLog.pre-2-12 COPYING NEWS.pre-1-0 `echo ChangeLog.pre-2-{10,4}` README" -template=20161020 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p docs/tutorial/Makefile.in{,.orig} cat <<- "EOF" | patch docs/tutorial/Makefile.in @@ -257,12 +59,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -279,12 +75,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -305,38 +96,8 @@ strip_libdir $P/usr/$libdir/gtk-2.0/modules touch -t `date '+%m%d0900'` \ $P/usr/$libdir/gtk-2.0/{2.10.0/{immodules,engines,printbackends},modules} - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links cat <<- EOF >> $P/install/doinst.sh #%% begin initialize $pkg gtk-query-immodules-2.0 --update-cache @@ -367,6 +128,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/gcc_libffi-20170706/PlamoBuild.gcc_libffi-4.8.5 2017-07-06 21:50:32.000000000 +0900 +++ plamo/04_xapps/gcc_libffi/PlamoBuild.gcc_libffi-4.8.5 2017-10-15 19:54:55.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2" verify= +digest= +branch= commitid= pkgbase=gcc_libffi vers=4.8.5 arch=`uname -m` -build=P3 +build=P4 src=gcc-$vers -patchfiles="gcc-4.8-filename-output.patch" +patchfiles="" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -18,7 +19,7 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/04_xapps/old/pygobject-20170219/PlamoBuild.pygobject-2.28.6 2017-02-19 02:11:43.000000000 +0900 +++ plamo/04_xapps/pygobject/PlamoBuild.pygobject-2.28.6 2017-09-21 14:54:47.000000000 +0900 @@ -2,248 +2,44 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/pygobject/2.28/pygobject-2.28.6.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=pygobject vers=2.28.6 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-introspection" DOCS="ChangeLog README INSTALL NEWS ChangeLog.pre-2.18 README.win32 COPYING AUTHORS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -285,38 +76,8 @@ strip_libdir $P/usr/$libdir/python*/site-packages/gtk-2.0/gio touch -t `date '+%m%d0900'` \ $P/usr/$libdir/python*/site-packages/{glib,gobject,gtk-2.0/gio} - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 libpyglib*` tar rvpf $pkg.tar -C $P \ @@ -329,6 +90,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/py2cairo-20170214/PlamoBuild.py2cairo-1.10.0 2017-02-14 12:22:35.000000000 +0900 +++ plamo/04_xapps/py2cairo/PlamoBuild.py2cairo-1.10.0 2017-09-21 15:00:32.000000000 +0900 @@ -2,248 +2,44 @@ ###################################################################### url="http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=py2cairo vers=1.10.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 INSTALL NEWS README" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi false && if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +58,7 @@ ./waf build fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -287,39 +78,9 @@ compress strip_libdir $P/usr/$libdir/python*/site-packages/cairo touch -t `date '+%m%d0900'` $P/usr/$libdir/python*/site-packages/cairo - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir touch -t `date '+%m%d0900'` $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir/python*/site-packages -maxdepth 1 | tail -n+2` @@ -327,6 +88,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/libglade-20170214/PlamoBuild.libglade-2.6.4 2017-02-14 19:28:47.000000000 +0900 +++ plamo/04_xapps/libglade/PlamoBuild.libglade-2.6.4 2017-09-21 15:04:07.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/libglade/2.6/libglade-2.6.4.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libglade vers=2.6.4 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING AUTHORS README INSTALL NEWS ChangeLog" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -321,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/pygtk-20170419/PlamoBuild.pygtk-2.24.0 2017-04-19 23:09:59.000000000 +0900 +++ plamo/04_xapps/pygtk/PlamoBuild.pygtk-2.24.0 2017-09-21 15:07:30.000000000 +0900 @@ -2,249 +2,45 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=pygtk vers=2.24.0 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="THREADS INSTALL NEWS AUTHORS ChangeLog.pre-2-0 README.win32 COPYING TODO README ChangeLog.pre-2-6 MAPPING ChangeLog.pre-2-16 ChangeLog" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -285,38 +76,8 @@ strip_libdir $P/usr/$libdir/python*/site-packages/gtk-2.0/gtk touch -t `date '+%m%d0900'` \ $P/usr/$libdir/python*/site-packages/gtk-2.0{,/gtk} - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/python*/site-packages/gtk-2.0 | tail -n+2` @@ -328,6 +89,5 @@ tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/Gtk.txz/old/libIDL-20170210/PlamoBuild.libIDL-0.8.14 2017-02-10 07:02:13.000000000 +0900 +++ plamo/04_xapps/Gtk.txz/libIDL/PlamoBuild.libIDL-0.8.14 2017-09-25 13:01:56.000000000 +0900 @@ -2,248 +2,44 @@ ###################################################################### url="http://ftp.acc.umu.se/pub/gnome/sources/libIDL/0.8/libIDL-0.8.14.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=libIDL vers=0.8.14 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="INSTALL COPYING ChangeLog MAINTAINERS NEWS README AUTHORS README.win32 BUGS HACKING" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -321,6 +82,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/ORBit2-20170216/PlamoBuild.ORBit2-2.14.19 2017-02-16 10:09:22.000000000 +0900 +++ plamo/04_xapps/ORBit2/PlamoBuild.ORBit2-2.14.19 2017-09-25 13:04:46.000000000 +0900 @@ -2,240 +2,42 @@ ###################################################################### url="ftp://ftp.gnome.org/pub/gnome/sources/ORBit2/2.14/ORBit2-2.14.19.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=ORBit2 vers=2.14.19 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS MAINTAINERS TODO HACKING README ChangeLog NEWS COPYING INSTALL COPYING.LIB" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p linc2/src/Makefile.in{,.orig} cat <<- "EOF" | patch linc2/src/Makefile.in @@ -246,12 +48,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -268,12 +64,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -290,38 +81,8 @@ compress strip_libdir $P/usr/$libdir/orbit-2.0 touch -t `date '+%m%d0900'` $P/usr/$libdir/orbit-2.0 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name lib* | tail -n+2` @@ -334,6 +95,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/dbus_glib-20170210/PlamoBuild.dbus_glib-0.100.2 2017-02-10 09:37:58.000000000 +0900 +++ plamo/04_xapps/dbus_glib/PlamoBuild.dbus_glib-0.100.2 2017-09-25 13:06:32.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.100.2.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=dbus_glib vers=0.100.2 arch=`uname -m` -build=P2 +build=P3 src=dbus-glib-$vers patchfiles="" OPT_CONFIG="--with-xml=libxml" DOCS="COPYING HACKING AUTHORS INSTALL ChangeLog README NEWS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/libexec | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -323,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/GConf-20170216/PlamoBuild.GConf-2.28.1 2017-02-16 11:27:15.000000000 +0900 +++ plamo/04_xapps/GConf/PlamoBuild.GConf-2.28.1 2017-09-25 13:08:41.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="ftp://ftp.gnome.org/pub/GNOME/sources/GConf/2.28/GConf-2.28.1.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=GConf vers=2.28.1 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-defaults-service=no" DOCS="INSTALL COPYING ChangeLog ABOUT-NLS NEWS README TODO AUTHORS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +72,8 @@ compress strip_libdir $P/usr/$libdir/GConf/2 touch -t `date '+%m%d0900'` $P/usr/$libdir/GConf/2 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/libexec | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libgconf-*` @@ -331,6 +92,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/SpiderMonkey-20170225/PlamoBuild.SpiderMonkey-1.8.5 2017-02-25 10:37:00.000000000 +0900 +++ plamo/04_xapps/SpiderMonkey/PlamoBuild.SpiderMonkey-1.8.5 2017-09-25 16:21:37.000000000 +0900 @@ -2,250 +2,46 @@ ###################################################################### url="http://ftp.mozilla.org/pub/js/js185-1.0.0.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=SpiderMonkey vers=1.8.5 arch=`uname -m` -build=P2 +build=P3 src=js-$vers patchfiles="" OPT_CONFIG="" DOCS="README" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p js/src/Makefile.in{,.orig} sed -i '/ln -s/s@$(\w*)@$(notdir &)@' js/src/Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/js/src - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -262,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -287,38 +78,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -327,6 +88,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/nspr-20170925/PlamoBuild.nspr-4.16 2017-09-25 18:07:17.000000000 +0900 +++ plamo/04_xapps/nspr/PlamoBuild.nspr-4.18 2018-04-24 12:20:13.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://ftp.mozilla.org/pub/nspr/releases/v4.16/src/nspr-4.16.tar.gz" +url="http://ftp.mozilla.org/pub/nspr/releases/v4.18/src/nspr-4.18.tar.gz" verify= digest= branch= commitid= pkgbase=nspr -vers=4.16 +vers=4.18 arch=`uname -m` build=P2 src=$pkgbase-$vers --- plamo/04_xapps/old/polkit-20170224/PlamoBuild.polkit-0.113 2017-02-24 07:54:11.000000000 +0900 +++ plamo/04_xapps/polkit/PlamoBuild.polkit-0.113 2017-09-25 13:48:01.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://www.freedesktop.org/software/polkit/releases/polkit-0.113.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=polkit vers=0.113 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-introspection --with-polkitd-user=polkituser" DOCS="COPYING HACKING AUTHORS INSTALL README NEWS ChangeLog" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -282,38 +73,8 @@ compress strip_bindir $P/usr/$libdir/polkit-1 touch -t `date '+%m%d0900'` $P/usr/$libdir/polkit-1 - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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/pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -338,6 +99,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/old/ConsoleKit-20170224/PlamoBuild.ConsoleKit-0.4.6 2017-02-24 10:44:42.000000000 +0900 +++ plamo/04_xapps/ConsoleKit/PlamoBuild.ConsoleKit-0.4.6 2017-09-25 13:50:51.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="https://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-0.4.6.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=ConsoleKit vers=0.4.6 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-pam-module --enable-udev-acl" DOCS="HACKING INSTALL TODO ChangeLog README AUTHORS NEWS COPYING" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,39 +71,9 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir prune_symlink $P/usr/lib/ConsoleKit/run-seat.d - convert + convert_links touch -t `date '+%m%d0900'` $P/usr/lib/ConsoleKit/run-seat.d 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` @@ -338,6 +99,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/04_xapps/print.txz/old/cups-20180625/PlamoBuild.cups-2.0.0 2018-06-25 20:04:13.000000000 +0900 +++ plamo/04_xapps/print.txz/cups/PlamoBuild.cups-2.0.0 2020-11-14 23:43:51.000000000 +0900 @@ -10,13 +10,13 @@ pkgbase=cups vers=2.0.0 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--disable-systemd" DOCS="CHANGES-*.txt CHANGES.txt CREDITS.txt INSTALL.txt IPPTOOL.txt LICENSE.txt README.txt" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -80,8 +80,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress for i in backend filter cgi-bin monitor notifier daemon ; do strip_bindir $P/usr/lib/cups/$i @@ -95,6 +95,7 @@ mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src convert_links + prune_symlink $P/etc/rc.d touch -t `date '+%m%d0900'` $P/usr/lib/cups/{backend,filter} 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` @@ -107,7 +108,7 @@ tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.po` tar rvpf $pkg.tar -C $P var/{cache,run,log,spool}/cups tar rvpf $pkg.tar -C $P etc/cups - tar rvpf $pkg.tar -C $P `cd $P ; find etc/rc.d/init.d | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find etc/rc.d -type f` tar rvpf $pkg.tar -C $P `cd $P ; find etc/pam.d | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find etc/dbus-1/system.d | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` @@ -116,7 +117,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/05_ext/old/ntfs_3g_ntfsprogs-20160223/PlamoBuild.ntfs_3g_ntfsprogs-2015.3.14 2016-02-23 17:54:34.000000000 +0900 +++ plamo/05_ext/ntfs_3g_ntfsprogs/PlamoBuild.ntfs_3g_ntfsprogs-2016.2.22 2016-11-17 13:30:46.000000000 +0900 @@ -1,17 +1,19 @@ #!/bin/sh ###################################################################### -url="http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2015.3.14.tgz - http://cache.gmane.org//gmane/linux/debian/devel/secure-testing/general/6910-001.bin +url="https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2016.2.22.tgz https://github.com/PhantomX/slackbuilds/raw/master/ntfs-3g/patches/ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch" pkgbase=ntfs_3g_ntfsprogs -vers=2015.3.14 +vers=2016.2.22 arch=`uname -m` -build=P2 +build=P1 src=ntfs-3g_ntfsprogs-$vers +patchfiles="ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch" OPT_CONFIG="" DOCS="INSTALL TODO.ntfsprogs README NEWS ChangeLog CREDITS COPYING.LIB COPYING AUTHORS" +template=20161020 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### fscheck() { @@ -187,20 +189,36 @@ done fi if [ $opt_download -eq 1 ] ; then - alt=0002-CVE-2015-3202.patch for i in $url ; do - if [ ${i##*/} == 6910-001.bin ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -f ${i##*/} ] ; then - wget $i + 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##*/} ;; - tgz) 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 @@ -210,6 +228,17 @@ 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 + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} if [ -f Makefile ] ; then make clean fi @@ -217,8 +246,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 @@ -263,9 +292,23 @@ if [ $i -eq 0 ] ; then install $myname $docdir/$src touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname + tmpl=${myname%%.*}-template-$template + if [ -f ../admin/$tmpl ] ; then + cp -p ../admin/$tmpl $docdir/$src + else + ( cd $docdir/$src + curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) + fi + spec=${myname%%.*}-spec + ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) + touch -t `date '+%m%d0900'` $docdir/$src/$spec + gzip $docdir/$src/{$myname,$spec} + rm $docdir/$src/$tmpl + mv $docdir/$src/{$myname,$spec}.gz $C + mv $C/{$myname,$spec}.gz $docdir/$src else ln $docdir/$src/$myname.gz $docdir/${src[$i]} + ln $docdir/$src/$spec.gz $docdir/${src[$i]} fi ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done --- plamo/05_ext/AV.txz/old/pulseaudio-20160430/PlamoBuild.pulseaudio-7.1 2016-04-30 09:49:06.000000000 +0900 +++ plamo/05_ext/AV.txz/pulseaudio/PlamoBuild.pulseaudio-7.1 2016-06-07 17:03:19.000000000 +0900 @@ -308,7 +308,7 @@ done convert touch -t `date '+%m%d0900'` $P/usr/share/bash-completion/completions - cat <<- EOF >> $P/install/doinst.sh + cat <<- "EOF" >> $P/install/doinst.sh if [ -x usr/bin/esd ] ; then ( cd usr/bin ; rm -rf esd ) ( cd usr/bin ; ln -sf esdcompat esd ) --- plamo/05_ext/AV.txz/old/lame-20170207/PlamoBuild.lame-3.98.4 2017-02-07 21:19:19.000000000 +0900 +++ plamo/05_ext/AV.txz/lame/PlamoBuild.lame-3.98.4 2017-09-20 12:24:43.000000000 +0900 @@ -2,248 +2,44 @@ ###################################################################### url="http://downloads.sourceforge.net/lame/lame-3.98.4.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=lame vers=3.98.4 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="STYLEGUIDE USAGE README API TODO LICENSE INSTALL.configure README.WINGTK DEFINES COPYING ChangeLog INSTALL HACKING" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -260,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,46 +71,16 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/lame/html $docdir/$src mv $docdir/$src/{html,{LICENSE,INSTALL.configure,README.WINGTK}.gz} $C mv $docdir/$src/{DEFINES,COPYING,ChangeLog,INSTALL,HACKING}.gz $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{html,{LICENSE,INSTALL.configure,README.WINGTK}.gz} $docdir/$src mv $C/{DEFINES,COPYING,ChangeLog,INSTALL,HACKING}.gz $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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 | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/lame @@ -328,6 +89,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/pulseaudio-20160607/PlamoBuild.pulseaudio-7.1 2016-06-07 17:03:19.000000000 +0900 +++ plamo/05_ext/AV.txz/pulseaudio/PlamoBuild.pulseaudio-7.1 2017-09-10 19:03:40.000000000 +0900 @@ -2,234 +2,43 @@ ###################################################################### url="http://freedesktop.org/software/pulseaudio/releases/pulseaudio-7.1.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=pulseaudio vers=7.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="LICENSE README NEWS PROTOCOL ABOUT-NLS LGPL GPL todo" +template=20170713 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $P/usr/share/bash-completion/completions - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -246,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -289,24 +93,13 @@ touch -t `date '+%m%d0900'` $P/usr/libexec/pulse touch -t `date '+%m%d0900'` $P/usr/$libdir/pulseaudio touch -t `date '+%m%d0900'` $P/usr/$libdir/pulse-$vers/modules - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + false && convert_links + prune_symlink $P/usr/bin + prune_symlink $P/usr/$libdir + prune_symlink $P/usr/share/bash-completion/completions + prune_symlink $infodir + prune_symlink $mandir/man1 touch -t `date '+%m%d0900'` $P/usr/share/bash-completion/completions cat <<- "EOF" >> $P/install/doinst.sh if [ -x usr/bin/esd ] ; then @@ -342,6 +135,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/sox-20170207/PlamoBuild.sox-14.4.2 2017-02-07 20:50:57.000000000 +0900 +++ plamo/05_ext/AV.txz/sox/PlamoBuild.sox-14.4.2 2017-09-20 12:26:59.000000000 +0900 @@ -2,247 +2,44 @@ ###################################################################### url="http://downloads.sourceforge.net/sox/sox-14.4.2.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=sox vers=14.4.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="--with-distro=Plamo_Linux" DOCS="COPYING README README.win32 README.osx INSTALL ChangeLog NEWS LICENSE.LGPL AUTHORS LICENSE.GPL" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 `cd $P ; find usr/include | tail -n+2` @@ -321,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/speex-20160502/PlamoBuild.speex-1.2rc2 2016-05-02 17:06:41.000000000 +0900 +++ plamo/05_ext/AV.txz/speex/PlamoBuild.speex-1.2rc2 2017-09-10 18:32:48.000000000 +0900 @@ -2,234 +2,44 @@ ###################################################################### url="http://downloads.xiph.org/releases/speex/speex-1.2rc2.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=speex vers=1.2rc2 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="README.TI-DSP ChangeLog README.symbian README TODO COPYING AUTHORS NEWS INSTALL README.blackfin" +template=20170713 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -246,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -266,30 +71,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/speex $docdir/$src/doc mv $docdir/$src/{doc,{README,TODO,COPYING,AUTHORS,NEWS,INSTALL}.gz} $C - mv $docdir/$src/{README.blackfin,$myname}.gz $C + mv $docdir/$src/{README.blackfin,$func,$myname,$spec}.gz $C mv $C/{doc,{README,TODO,COPYING,AUTHORS,NEWS,INSTALL}.gz} $docdir/$src - mv $C/{README.blackfin,$myname}.gz $docdir/$src + mv $C/{README.blackfin,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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` @@ -300,6 +89,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/speexdsp-20160502/PlamoBuild.speexdsp-1.2rc3 2016-05-02 17:25:03.000000000 +0900 +++ plamo/05_ext/AV.txz/speexdsp/PlamoBuild.speexdsp-1.2rc3 2017-09-10 18:34:55.000000000 +0900 @@ -2,234 +2,44 @@ ###################################################################### url="http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=speexdsp vers=1.2rc3 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers +patchfiles="" OPT_CONFIG="" DOCS="README INSTALL AUTHORS TODO ChangeLog COPYING README.blackfin NEWS" +template=20170713 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -246,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -266,30 +71,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/speexdsp $docdir/$src/doc mv $docdir/$src/{doc,{INSTALL,AUTHORS,TODO,ChangeLog}.gz} $C - mv $docdir/$src/{COPYING,README.blackfin,NEWS,$myname}.gz $C + mv $docdir/$src/{COPYING,README.blackfin,NEWS,$func,$myname,$spec}.gz $C mv $C/{doc,{INSTALL,AUTHORS,TODO,ChangeLog}.gz} $docdir/$src - mv $C/{COPYING,README.blackfin,NEWS,$myname}.gz $docdir/$src + mv $C/{COPYING,README.blackfin,NEWS,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/speex @@ -297,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/libsndfile-20170210/PlamoBuild.libsndfile-1.0.25 2017-02-10 09:32:31.000000000 +0900 +++ plamo/05_ext/AV.txz/libsndfile/PlamoBuild.libsndfile-1.0.25 2017-09-21 15:44:01.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=libsndfile vers=1.0.25 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS README AUTHORS INSTALL ChangeLog COPYING" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,44 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libsndfile1-dev/html $docdir/$src mv $docdir/$src/{html,{AUTHORS,INSTALL,ChangeLog,COPYING}.gz} $C - mv $docdir/$src/{$myname,$spec}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{html,{AUTHORS,INSTALL,ChangeLog,COPYING}.gz} $docdir/$src - mv $C/{$myname,$spec}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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` @@ -326,6 +87,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/flac-20170215/PlamoBuild.flac-1.2.1 2017-02-15 22:14:16.000000000 +0900 +++ plamo/05_ext/AV.txz/flac/PlamoBuild.flac-1.2.1 2017-09-21 15:46:59.000000000 +0900 @@ -3,240 +3,42 @@ ###################################################################### url="http://downloads.xiph.org/releases/flac/flac-1.2.1.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/05_ext/AV.txz/flac/flac-1.2.1-encode_main.cpp.patch.gz" +verify= +digest= +branch= +commitid= pkgbase=flac vers=1.2.1 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="flac-1.2.1-encode_main.cpp.patch.gz" OPT_CONFIG="" DOCS="README COPYING.Xiph COPYING.FDL AUTHORS COPYING.LGPL COPYING.GPL" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B for i in doc{/html{/ru,/images{/hw,},},} ; do cp -p $i/Makefile.in{,.orig} @@ -244,12 +46,6 @@ done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,44 +77,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/flac/{FLAC.tag,html} $docdir/$src mv $docdir/$src/{FLAC.tag,html,{COPYING.Xiph,COPYING.FDL,AUTHORS}.gz} $C - mv $docdir/$src/{COPYING.LGPL,COPYING.GPL,$myname,$spec}.gz $C + mv $docdir/$src/{COPYING.LGPL,COPYING.GPL,$func,$myname,$spec}.gz $C mv $C/{FLAC.tag,html,{COPYING.Xiph,COPYING.FDL,AUTHORS}.gz} $docdir/$src - mv $C/{COPYING.LGPL,COPYING.GPL,$myname,$spec}.gz $docdir/$src + mv $C/{COPYING.LGPL,COPYING.GPL,$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + 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` @@ -334,6 +95,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/libogg-20170215/PlamoBuild.libogg-1.3.2 2017-02-15 23:03:26.000000000 +0900 +++ plamo/05_ext/AV.txz/libogg/PlamoBuild.libogg-1.3.2 2017-09-21 15:52:39.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=libogg vers=1.3.2 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="CHANGES README COPYING AUTHORS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,42 +70,14 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libogg $docdir/$src/doc - mv $docdir/$src/{doc,{CHANGES,README,COPYING,AUTHORS,$myname,$spec}.gz} $C - mv $C/{doc,{CHANGES,README,COPYING,AUTHORS,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{doc,{CHANGES,README,COPYING,AUTHORS}.gz} $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C + mv $C/{doc,{CHANGES,README,COPYING,AUTHORS}.gz} $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/ogg @@ -323,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/libvorbis-20170215/PlamoBuild.libvorbis-1.3.4 2017-02-15 23:37:06.000000000 +0900 +++ plamo/05_ext/AV.txz/libvorbis/PlamoBuild.libvorbis-1.3.4 2017-09-21 15:55:05.000000000 +0900 @@ -2,239 +2,41 @@ ###################################################################### url="http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=libvorbis vers=1.3.4 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING README CHANGES todo.txt" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B for i in doc{/libvorbis,/vorbisfile,/vorbisenc,} ; do cp -p $i/Makefile.in{,.orig} @@ -242,12 +44,6 @@ done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -264,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -284,42 +75,12 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir mv $docdir/libvorbis $docdir/$src/doc - mv $docdir/$src/{doc,{CHANGES,todo.txt,$myname,$spec}.gz} $C - mv $C/{doc,{CHANGES,todo.txt,$myname,$spec}.gz} $docdir/$src + mv $docdir/$src/{doc,{CHANGES,todo.txt,$func,$myname,$spec}.gz} $C + mv $C/{doc,{CHANGES,todo.txt,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/vorbis @@ -328,6 +89,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/libsamplerate-20170223/PlamoBuild.libsamplerate-0.1.7 2017-02-23 11:26:46.000000000 +0900 +++ plamo/05_ext/AV.txz/libsamplerate/PlamoBuild.libsamplerate-0.1.7 2017-09-25 13:37:15.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://www.mega-nerd.com/SRC/libsamplerate-0.1.7.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=libsamplerate vers=0.1.7 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="NEWS AUTHORS ChangeLog INSTALL COPYING README" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -279,38 +70,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -319,6 +80,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/AV.txz/old/x264-20170518/PlamoBuild.x264-git_021c0dc 2017-05-18 15:20:59.000000000 +0900 +++ plamo/05_ext/AV.txz/x264/PlamoBuild.x264-git_20140717 2018-04-19 10:50:16.000000000 +0900 @@ -7,9 +7,9 @@ commitid[0]=021c0dc commitid[1]=cb4547a pkgbase=x264 -vers=git_021c0dc +vers=git_20140717 arch=`uname -m` -build=P4 +build=P5 src[0]=$pkgbase src[1]=$pkgbase~ patchfiles="" --- plamo/05_ext/AV.txz/old/x265-20170516/PlamoBuild.x265-1.6 2017-05-16 21:08:22.000000000 +0900 +++ plamo/05_ext/AV.txz/x265/PlamoBuild.x265-1.6 2017-05-28 10:27:13.000000000 +0900 @@ -8,7 +8,7 @@ pkgbase=x265 vers=1.6 arch=`uname -m` -build=P1 +build=P2 src=${pkgbase}_$vers patchfiles="" OPT_CONFIG="" @@ -78,6 +78,7 @@ fi done find $P/usr -type f -exec touch {} \; + ln -s libx265.so.51 $P/usr/$libdir/libx265.so.48 touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ --- plamo/05_ext/devel2.txz/old/gfortran-20160112/PlamoBuild.gfortran-4.8.4 2016-01-12 10:25:33.000000000 +0900 +++ plamo/05_ext/devel2.txz/gfortran/PlamoBuild.gfortran-4.8.5 2016-01-28 14:19:19.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2 +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 https://patchwork.ozlabs.org/patch/342434/mbox" pkgbase=gfortran -vers=4.8.4 +vers=4.8.5 arch=`uname -m` -build=P3 +build=P2 src=gcc-$vers OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object --enable-linker-build-id --enable-plugin --with-system-zlib --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" -DOCS="COPYING.LIB MAINTAINERS ABOUT-NLS README COPYING3.LIB COPYING - COPYING.RUNTIME NEWS COPYING3 ChangeLog" +DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa + COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" ###################################################################### fscheck() { --- plamo/05_ext/devel2.txz/old/gcc_go-20160112/PlamoBuild.gcc_go-4.8.4 2016-01-12 11:12:39.000000000 +0900 +++ plamo/05_ext/devel2.txz/gcc_go/PlamoBuild.gcc_go-4.8.5 2016-01-28 14:21:29.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2 +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 https://patchwork.ozlabs.org/patch/342434/mbox" pkgbase=gcc_go -vers=4.8.4 +vers=4.8.5 arch=`uname -m` -build=P3 +build=P2 src=gcc-$vers OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object --enable-linker-build-id --enable-plugin --with-system-zlib --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" -DOCS="COPYING.LIB MAINTAINERS ABOUT-NLS README COPYING3.LIB COPYING - COPYING.RUNTIME NEWS COPYING3 ChangeLog" +DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa + COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" ###################################################################### fscheck() { --- plamo/05_ext/devel2.txz/old/gfortran-20160128/PlamoBuild.gfortran-4.8.5 2016-01-28 14:19:19.000000000 +0900 +++ plamo/05_ext/devel2.txz/gfortran/PlamoBuild.gfortran-4.8.5 2017-04-08 16:53:31.000000000 +0900 @@ -2,12 +2,15 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - https://patchwork.ozlabs.org/patch/342434/mbox" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +verify= +commitid= pkgbase=gfortran vers=4.8.5 arch=`uname -m` -build=P2 +build=P3 src=gcc-$vers +patchfiles="gcc-4.8-filename-output.patch" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -15,214 +18,34 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s extglob nullglob - cd $1 - for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=gcc-4.8-filename-output.patch - for i in $url ; do - if [ ${i##*/} == mbox ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -f ${i##*/} ] ; then - wget $i - fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np0 -i $W/gcc-4.8-filename-output.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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]} \ --libexecdir=/usr/$libdir \ --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ @@ -239,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -272,27 +90,15 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_bindir $gcclibdir + for i in f951 ; do + echo "$i" + echo "stripping $i with -p" + strip -p $gcclibdir/$i + done strip_libdir $gcclibdir touch -t `date '+%m%d0900'` $gcclibdir - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 ${gcclibdir#$P/} -maxdepth 1 | tail -n+2` @@ -303,6 +109,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/devel2.txz/old/gcc_go-20160128/PlamoBuild.gcc_go-4.8.5 2016-01-28 14:21:29.000000000 +0900 +++ plamo/05_ext/devel2.txz/gcc_go/PlamoBuild.gcc_go-4.8.5 2017-04-08 19:39:23.000000000 +0900 @@ -2,12 +2,15 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - https://patchwork.ozlabs.org/patch/342434/mbox" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +verify= +commitid= pkgbase=gcc_go vers=4.8.5 arch=`uname -m` -build=P2 +build=P3 src=gcc-$vers +patchfiles="gcc-4.8-filename-output.patch" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -15,214 +18,34 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s extglob nullglob - cd $1 - for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=gcc-4.8-filename-output.patch - for i in $url ; do - if [ ${i##*/} == mbox ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -f ${i##*/} ] ; then - wget $i - fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np0 -i $W/gcc-4.8-filename-output.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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]} \ --libexecdir=/usr/$libdir \ --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ @@ -239,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -274,27 +92,15 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - strip_bindir $gcclibdir + for i in go1 ; do + echo "$i" + echo "stripping $i with -p" + strip -p $gcclibdir/$i + done strip_libdir $gcclibdir touch -t `date '+%m%d0900'` $gcclibdir - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 ${gcclibdir#$P/} | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 -type f` @@ -305,6 +111,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/devel2.txz/old/gcc_go-20170408/PlamoBuild.gcc_go-4.8.5 2017-04-08 19:39:23.000000000 +0900 +++ plamo/05_ext/devel2.txz/gcc_go/PlamoBuild.gcc_go-4.8.5 2017-10-15 19:53:26.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2" verify= +digest= +branch= commitid= pkgbase=gcc_go vers=4.8.5 arch=`uname -m` -build=P3 +build=P4 src=gcc-$vers -patchfiles="gcc-4.8-filename-output.patch" +patchfiles="" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -18,7 +19,7 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/05_ext/devel2.txz/old/gfortran-20170408/PlamoBuild.gfortran-4.8.5 2017-04-08 16:53:31.000000000 +0900 +++ plamo/05_ext/devel2.txz/gfortran/PlamoBuild.gfortran-4.8.5 2017-10-15 19:52:35.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2" verify= +digest= +branch= commitid= pkgbase=gfortran vers=4.8.5 arch=`uname -m` -build=P3 +build=P4 src=gcc-$vers -patchfiles="gcc-4.8-filename-output.patch" +patchfiles="" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -18,7 +19,7 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/05_ext/devel2.txz/old/json_c-20160502/PlamoBuild.json_c-0.12 2016-05-02 15:29:35.000000000 +0900 +++ plamo/05_ext/devel2.txz/json_c/PlamoBuild.json_c-0.12 2017-09-10 18:17:12.000000000 +0900 @@ -2,237 +2,47 @@ ###################################################################### url="https://s3.amazonaws.com/json-c_releases/releases/json-c-0.12.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=json_c vers=0.12 arch=`uname -m` -build=P2 +build=P3 src=json-c-$vers +patchfiles="" OPT_CONFIG="" DOCS="AUTHORS COPYING ChangeLog NEWS README README-WIN32.html README.html RELEASE_CHECKLIST.txt INSTALL" +template=20170713 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p Makefile.in{,.orig} sed -i 's@-Werror @@g' Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -249,12 +59,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -269,24 +74,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/json-c @@ -294,6 +83,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/devel2.txz/old/fftw-20170219/PlamoBuild.fftw-3.3 2017-02-19 14:57:43.000000000 +0900 +++ plamo/05_ext/devel2.txz/fftw/PlamoBuild.fftw-3.3 2017-09-25 13:10:42.000000000 +0900 @@ -2,254 +2,48 @@ ###################################################################### url="http://repository.timesys.com/buildsources/f/fftw/fftw-3.3/fftw-3.3.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=fftw vers=3.3 arch=`uname -m` -build=P3 +build=P4 src[0]=$pkgbase-$vers src[1]=$pkgbase-$vers src[2]=$pkgbase-$vers -patchfiles[0]="" -patchfiles[1]="" -patchfiles[2]="" +patchfiles="" OPT_CONFIG[0]="--enable-shared" OPT_CONFIG[1]="--enable-shared --enable-single" OPT_CONFIG[2]="--enable-shared --enable-long-double" DOCS="INSTALL NEWS TODO ChangeLog COPYING AUTHORS COPYRIGHT README CONVENTIONS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -266,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,38 +75,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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` @@ -328,6 +87,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/devel2.txz/old/git-20170501/PlamoBuild.git-2.8.3 2017-05-01 02:38:50.000000000 +0900 +++ plamo/05_ext/devel2.txz/git/PlamoBuild.git-2.12.2 2018-06-26 17:58:11.000000000 +0900 @@ -1,21 +1,22 @@ #!/bin/sh ###################################################################### -url="https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz - https://www.kernel.org/pub/software/scm/git/git-manpages-2.8.3.tar.gz +url="https://www.kernel.org/pub/software/scm/git/git-2.12.2.tar.gz + https://www.kernel.org/pub/software/scm/git/git-manpages-2.12.2.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/05_ext/devel2.txz/git/git-set-file-times" verify= digest= +branch= commitid= pkgbase=git -vers=2.8.3 +vers=2.12.2 arch=`uname -m` build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="COPYING INSTALL LGPL-2.1 README.md RelNotes command-list.txt" -template=20170415 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -82,14 +83,12 @@ convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/libexec/git-core - tar rvpf $pkg.tar -C $P \ - usr/$libdir/perl5/site_perl/5.14.2/{Git,{Error,Git}.pm} - tar rvpf $pkg.tar -C $P \ - `cd $P - find usr/$libdir/perl5/site_perl/5.14.2/*-linux-thread-multi/auto \ - -maxdepth 1 | tail -n+2` - tar rvpf $pkg.tar -C $P \ - `cd $P ; find usr/$libdir/perl5/5.14.2/*-linux-thread-multi | tail -n+2` + perldir=usr/$libdir/perl5 + perldir2=$perldir/site_perl/5.14.2 + tar rvpf $pkg.tar -C $P $perldir2/{Git,{Error,Git}.pm} + tar rvpf $pkg.tar -C $P $perldir2/$arch-linux-thread-multi/auto/Git + perldir3=$perldir/5.14.2/$arch-linux-thread-multi + tar rvpf $pkg.tar -C $P $perldir3/perllocal.pod tar rvpf $pkg.tar -C $P usr/share/git-core tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` tar rvpf $pkg.tar -C $P usr/share/git{web,k,-gui} --- plamo/05_ext/devel2.txz/old/lua-20180218/PlamoBuild.lua-5.1.5 2018-02-18 10:07:29.000000000 +0900 +++ plamo/05_ext/devel2.txz/lua/PlamoBuild.lua-5.1.5 2019-10-14 08:01:28.000000000 +0900 @@ -133,8 +133,8 @@ rm $docdir/$src/doc/*.1 touch -r $S/doc $docdir/$src/doc chown -R root.root $docdir/$src/doc - mv $docdir/$src/{doc,{README,HISTORY,$myname}.gz} $C - mv $C/{doc,{README,HISTORY,$myname}.gz} $docdir/$src + mv $docdir/$src/{doc,{README,HISTORY,$func,$myname,$spec}.gz} $C + mv $C/{doc,{README,HISTORY,$func,$myname,$spec}.gz} $docdir/$src touch -r $S $docdir/$src convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` --- plamo/05_ext/old/fuse-20161214/PlamoBuild.fuse-2.9.4 2016-12-14 21:50:40.000000000 +0900 +++ plamo/05_ext/fuse/PlamoBuild.fuse-2.9.4 2017-07-07 23:13:56.000000000 +0900 @@ -2,248 +2,43 @@ ###################################################################### url="https://github.com/libfuse/libfuse/releases/download/fuse_2_9_4/fuse-2.9.4.tar.gz" +verify= +digest= +commitid= pkgbase=fuse vers=2.9.4 arch=`uname -m` -build=P2 +build=P3 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="--enable-lib --enable-util" DOCS="COPYING.LIB NEWS INSTALL FAQ COPYING README.NFS AUTHORS ChangeLog Filesystems README" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 sbin | tail -n+2` tar rvpf $pkg.tar -C $P \ @@ -325,6 +85,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/gnome_parts.txz/old/gtk_vnc-20170213/PlamoBuild.gtk_vnc-0.5.4 2017-02-13 21:26:50.000000000 +0900 +++ plamo/05_ext/gnome_parts.txz/gtk_vnc/PlamoBuild.gtk_vnc-0.5.4 2017-09-22 05:21:06.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://ftp.gnome.org/pub/gnome/sources/gtk-vnc/0.5/gtk-vnc-0.5.4.tar.xz" +verify= +digest= +branch= +commitid= pkgbase=gtk_vnc vers=0.5.4 arch=`uname -m` -build=P3 +build=P4 src=gtk-vnc-$vers patchfiles="" OPT_CONFIG="--with-python" DOCS="ChangeLog INSTALL COPYING.LIB AUTHORS NEWS README ChangeLog-old" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -259,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -280,38 +71,8 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_libdir $P/usr/$libdir/python*/site-packages - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + 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 -type f` tar rvpf $pkg.tar -C $P `cd $P ; find usr/include -maxdepth 1 | tail -n+2` @@ -323,6 +84,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/gnome_parts.txz/old/gtk_vnc-20170922/PlamoBuild.gtk_vnc-0.5.4 2017-09-22 05:21:06.000000000 +0900 +++ plamo/05_ext/gnome_parts.txz/gtk_vnc/PlamoBuild.gtk_vnc-0.5.4 2017-09-21 16:01:36.000000000 +0900 @@ -10,9 +10,11 @@ vers=0.5.4 arch=`uname -m` build=P4 -src=gtk-vnc-$vers +src[0]=gtk-vnc-$vers +src[1]=gtk-vnc-$vers patchfiles="" -OPT_CONFIG="--with-python" +OPT_CONFIG[0]="--with-python" +OPT_CONFIG[1]="--with-gtk=3.0 --with-python" DOCS="ChangeLog INSTALL COPYING.LIB AUTHORS NEWS README ChangeLog-old" template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin --- plamo/05_ext/old/loudmouth-20170208/PlamoBuild.loudmouth-1.5.3 2017-02-08 14:21:24.000000000 +0900 +++ plamo/05_ext/loudmouth/PlamoBuild.loudmouth-1.5.3 2017-09-21 16:03:46.000000000 +0900 @@ -2,239 +2,41 @@ ###################################################################### url="https://mcabber.com/files/loudmouth/loudmouth-1.5.3.tar.bz2" +verify= +digest= +branch= +commitid= pkgbase=loudmouth vers=1.5.3 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" DOCS="README README.WIN32 COPYING ChangeLog INSTALL AUTHORS NEWS" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B cp -p configure{,.orig} cat <<- "EOF" | patch configure @@ -243,12 +45,6 @@ EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -265,12 +61,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -285,38 +76,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/loudmouth-1.0 @@ -325,6 +86,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/old/ntfs_3g_ntfsprogs-20161117/PlamoBuild.ntfs_3g_ntfsprogs-2016.2.22 2016-11-17 13:30:46.000000000 +0900 +++ plamo/05_ext/ntfs_3g_ntfsprogs/PlamoBuild.ntfs_3g_ntfsprogs-2016.2.22 2017-07-07 23:17:52.000000000 +0900 @@ -3,248 +3,43 @@ ###################################################################### url="https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2016.2.22.tgz https://github.com/PhantomX/slackbuilds/raw/master/ntfs-3g/patches/ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch" +verify= +digest= +commitid= pkgbase=ntfs_3g_ntfsprogs vers=2016.2.22 arch=`uname -m` -build=P1 +build=P2 src=ntfs-3g_ntfsprogs-$vers patchfiles="ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch" OPT_CONFIG="" DOCS="INSTALL TODO.ntfsprogs README NEWS ChangeLog CREDITS COPYING.LIB COPYING AUTHORS" -template=20161020 +template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +56,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -281,38 +71,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links 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` @@ -325,6 +85,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/perl_append.txz/old/perl_XML_Parser-20170209/PlamoBuild.perl_XML_Parser-2.41 2017-02-09 21:18:24.000000000 +0900 +++ plamo/05_ext/perl_append.txz/perl_XML_Parser/PlamoBuild.perl_XML_Parser-2.41 2017-09-21 14:52:05.000000000 +0900 @@ -2,247 +2,43 @@ ###################################################################### url="http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/XML-Parser-2.41.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=perl_XML_Parser vers=2.41 arch=`uname -m` -build=P3 +build=P4 src=XML-Parser-$vers patchfiles="" OPT_CONFIG="" DOCS="Changes README" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -261,12 +57,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,44 +77,13 @@ compress strip_libdir $P/$perldir/auto/XML/Parser/Expat touch -t `date '+%m%d0900'` $P/$perldir/auto/XML/Parser/Expat - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $docdir/$src - else - ( cd $docdir/$src - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $docdir/$src ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $docdir/$src/$spec - gzip $docdir/$src/{$myname,$spec} - rm $docdir/$src/$tmpl - mv $docdir/$src/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $docdir/$src - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P $perldir/XML tar rvpf $pkg.tar -C $P $perldir/auto/XML 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 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/tk.txz/old/tk-20161016/PlamoBuild.tk-8.5.10 2016-10-16 10:07:13.000000000 +0900 +++ plamo/05_ext/tk.txz/tk/PlamoBuild.tk-8.6.6 2016-10-18 09:27:55.000000000 +0900 @@ -1,16 +1,16 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/tcl/tk8.5.10-src.tar.gz" +url="http://downloads.sourceforge.net/tcl/tk8.6.6-src.tar.gz" pkgbase=tk -vers=8.5.10 +vers=8.6.6 arch=`uname -m` -build=P2 -src=tk$vers +build=P1 +src=$pkgbase$vers patchfiles="" OPT_CONFIG="--enable-threads" -DOCS="changes ChangeLog.2002 README ChangeLog license.terms - ChangeLog.2004" +DOCS="ChangeLog.2004 ChangeLog.2002 changes ChangeLog license.terms + ChangeLog.2007 README" ###################################################################### fscheck() { @@ -278,9 +278,9 @@ make install DESTDIR=$P install-private-headers fi done - ln -s wish8.5 $P/usr/bin/wish - mv $P/usr/bin/{wish8.5,wish} $C - mv $C/{wish8.5,wish} $P/usr/bin + ln -s wish8.6 $P/usr/bin/wish + mv $P/usr/bin/{wish8.6,wish} $C + mv $C/{wish8.6,wish} $P/usr/bin touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -305,8 +305,9 @@ done convert tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P usr/$libdir/tk8.5 - tar rvpf $pkg.tar -C $P usr/$libdir/{libtk8.5.so,tkConfig.sh,libtkstub8.5.a} + tar rvpf $pkg.tar -C $P usr/$libdir/tk8.6 + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` + tar rvpf $pkg.tar -C $P usr/$libdir/{libtk8.6.so,tkConfig.sh,libtkstub8.6.a} tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | 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` --- plamo/05_ext/tk.txz/old/Tix-20161016/PlamoBuild.Tix-8.4.3 2016-10-16 13:42:31.000000000 +0900 +++ plamo/05_ext/tk.txz/Tix/PlamoBuild.Tix-8.4.3 2016-10-18 10:32:24.000000000 +0900 @@ -4,13 +4,13 @@ url="http://downloads.sourceforge.net/tix/Tix8.4.3-src.tar.gz http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tix/tix.tcl8.5.patch.gz http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tix/tix.soname.patch.gz - http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz - http://downloads.sourceforge.net/tcl/tk8.5.10-src.tar.gz" + http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz + http://downloads.sourceforge.net/tcl/tk8.6.6-src.tar.gz" pkgbase=Tix vers=8.4.3 arch=`uname -m` -build=P2 -src=Tix$vers +build=P3 +src=$pkgbase$vers patchfiles="tix.tcl8.5.patch.gz tix.soname.patch.gz" OPT_CONFIG="" DOCS="license.terms README.txt ChangeLog" @@ -237,34 +237,34 @@ esac done done - cd $W/tcl8.5.10 + cd $W/tcl8.6.6 if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} cat <<- "EOF" | patch unix/configure - 18772c18772 + 18923c18923 < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' --- > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 18894,18895c18894,18895 + 19053,19054c19053,19054 < elif test "$prefix/lib" != "$libdir"; then < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" --- > elif test "$prefix/lib64" != "$libdir"; then > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 18897c18897 + 19056c19056 < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" --- > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" EOF fi - cd $W/tcl8.5.10/unix + cd $W/tcl8.6.6/unix ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - cd $W/tk8.5.10 + cd $W/tk8.6.6 if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} sed -i '/^TK_LIBRARY=/s@lib@lib64@g' unix/configure fi - cd $W/tk8.5.10/unix + cd $W/tk8.6.6/unix ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} @@ -277,7 +277,8 @@ if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + CPPFLAGS="-DUSE_INTERP_RESULT" fi done fi @@ -306,6 +307,7 @@ fi done chown -R root.root $P/usr/$libdir/Tix$vers/{pref,bitmaps} + chmod -R g-w $P/usr/$libdir/Tix$vers/bitmaps rmdir $P/usr/$libdir/Tix$vers/html install -d $P/usr/share/man/mann install -m 644 man/*.n $P/usr/share/man/mann --- plamo/05_ext/tk.txz/old/itk-20161016/PlamoBuild.itk-3.4 2016-10-16 15:08:06.000000000 +0900 +++ plamo/05_ext/tk.txz/itk/PlamoBuild.itk-4.0.2 2016-10-18 10:40:55.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/05_ext/tk.txz/itk/itk3.4-20080207.tar.bz2 - http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz - http://downloads.sourceforge.net/tcl/tk8.5.10-src.tar.gz" +url="http://downloads.sourceforge.net/incrtcl/itk4.0.2.tar.gz + http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz + http://downloads.sourceforge.net/tcl/tk8.6.6-src.tar.gz" pkgbase=itk -vers=3.4 +vers=4.0.2 arch=`uname -m` -build=P2 -src=itk$vers +build=P1 +src=$pkgbase$vers patchfiles="" OPT_CONFIG="" -DOCS="license.terms CHANGES ChangeLog INCOMPATIBLE README TODO" +DOCS="license.terms" ###################################################################### fscheck() { @@ -235,34 +235,34 @@ esac done done - cd $W/tcl8.5.10 + cd $W/tcl8.6.6 if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} cat <<- "EOF" | patch unix/configure - 18772c18772 + 18923c18923 < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' --- > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 18894,18895c18894,18895 + 19053,19054c19053,19054 < elif test "$prefix/lib" != "$libdir"; then < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" --- > elif test "$prefix/lib64" != "$libdir"; then > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 18897c18897 + 19056c19056 < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" --- > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" EOF fi - cd $W/tcl8.5.10/unix + cd $W/tcl8.6.6/unix ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - cd $W/tk8.5.10 + cd $W/tk8.6.6 if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} sed -i '/^TK_LIBRARY=/s@lib@lib64@g' unix/configure fi - cd $W/tk8.5.10/unix + cd $W/tk8.6.6/unix ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} @@ -275,8 +275,7 @@ if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ - --with-itcl=/usr/$libdir + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done fi --- plamo/05_ext/tk.txz/old/tk-20161018/PlamoBuild.tk-8.6.6 2016-10-18 09:27:55.000000000 +0900 +++ plamo/05_ext/tk.txz/tk/PlamoBuild.tk-8.6.6 2017-07-01 02:02:15.000000000 +0900 @@ -2,238 +2,41 @@ ###################################################################### url="http://downloads.sourceforge.net/tcl/tk8.6.6-src.tar.gz" +verify= +digest= +commitid= pkgbase=tk vers=8.6.6 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase$vers patchfiles="" OPT_CONFIG="--enable-threads" DOCS="ChangeLog.2004 ChangeLog.2002 changes ChangeLog license.terms ChangeLog.2007 README" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B if [ $arch == x86_64 ] ; then cp -p unix/configure{,.orig} @@ -241,12 +44,6 @@ fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]}/unix - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -263,12 +60,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -286,24 +78,8 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/tk8.6 tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` @@ -316,6 +92,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/tk.txz/old/Tix-20161018/PlamoBuild.Tix-8.4.3 2016-10-18 10:32:24.000000000 +0900 +++ plamo/05_ext/tk.txz/Tix/PlamoBuild.Tix-8.4.3 2017-07-01 06:43:13.000000000 +0900 @@ -3,281 +3,48 @@ ###################################################################### url="http://downloads.sourceforge.net/tix/Tix8.4.3-src.tar.gz http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tix/tix.tcl8.5.patch.gz - http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tix/tix.soname.patch.gz - http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz - http://downloads.sourceforge.net/tcl/tk8.6.6-src.tar.gz" + http://ftp.slackware.com/pub/slackware/slackware-14.0/source/tcl/tix/tix.soname.patch.gz" +verify= +digest= +commitid= pkgbase=Tix vers=8.4.3 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase$vers patchfiles="tix.tcl8.5.patch.gz tix.soname.patch.gz" OPT_CONFIG="" DOCS="license.terms README.txt ChangeLog" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 $W/tcl8.6.6 - if [ $arch == x86_64 ] ; then - cp -p unix/configure{,.orig} - cat <<- "EOF" | patch unix/configure - 18923c18923 - < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' - --- - > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 19053,19054c19053,19054 - < elif test "$prefix/lib" != "$libdir"; then - < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > elif test "$prefix/lib64" != "$libdir"; then - > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 19056c19056 - < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" - EOF - fi - cd $W/tcl8.6.6/unix - ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - cd $W/tk8.6.6 - if [ $arch == x86_64 ] ; then - cp -p unix/configure{,.orig} - sed -i '/^TK_LIBRARY=/s@lib@lib64@g' unix/configure - fi - cd $W/tk8.6.6/unix - ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + --with-tcl=/usr/$libdir --with-tk=/usr/$libdir \ CPPFLAGS="-DUSE_INTERP_RESULT" fi done @@ -291,12 +58,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -318,23 +80,7 @@ compress strip_libdir $P/usr/$libdir/Tix$vers touch -t `date '+%m%d0900'` $P/usr/$libdir/Tix$vers - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done + setup_docdir cp -a $S/docs $docdir/$src find $docdir/$src/docs -type d -exec chmod 755 {} \; find $docdir/$src/docs -type f -exec chmod 644 {} \; @@ -343,16 +89,17 @@ chmod 644 $docdir/$src/{index,ABOUT}.html chown root.root $docdir/$src/{index,ABOUT}.html mv $docdir/$src/{docs,{index,ABOUT}.html} $C - mv $docdir/$src/{license.terms,README.txt,ChangeLog,$myname}.gz $C + mv $docdir/$src/{license.terms,README.txt,ChangeLog}.gz $C + mv $docdir/$src/{$func,$myname,$spec}.gz $C mv $C/{docs,{index,ABOUT}.html} $docdir/$src - mv $C/{license.terms,README.txt,ChangeLog,$myname}.gz $docdir/$src + mv $C/{license.terms,README.txt,ChangeLog}.gz $docdir/$src + mv $C/{$func,$myname,$spec}.gz $docdir/$src touch -r $S $docdir/$src - convert + convert_links tar cvpf $pkg.tar -C $P usr/$libdir/Tix$vers tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/mann | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/tk.txz/old/itk-20161018/PlamoBuild.itk-4.0.2 2016-10-18 10:40:55.000000000 +0900 +++ plamo/05_ext/tk.txz/itk/PlamoBuild.itk-4.0.2 2017-07-01 02:22:39.000000000 +0900 @@ -1,281 +1,48 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/incrtcl/itk4.0.2.tar.gz - http://downloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz - http://downloads.sourceforge.net/tcl/tk8.6.6-src.tar.gz" +url="http://downloads.sourceforge.net/incrtcl/itk4.0.2.tar.gz" +verify= +digest= +commitid= pkgbase=itk vers=4.0.2 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase$vers patchfiles="" OPT_CONFIG="" DOCS="license.terms" +template=20170415 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches 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 $W/tcl8.6.6 - if [ $arch == x86_64 ] ; then - cp -p unix/configure{,.orig} - cat <<- "EOF" | patch unix/configure - 18923c18923 - < TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)' - --- - > TCL_LIBRARY='$(prefix)/lib64/tcl$(VERSION)' - 19053,19054c19053,19054 - < elif test "$prefix/lib" != "$libdir"; then - < TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > elif test "$prefix/lib64" != "$libdir"; then - > TCL_PACKAGE_PATH="${libdir} ${prefix}/lib64 ${TCL_PACKAGE_PATH}" - 19056c19056 - < TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" - --- - > TCL_PACKAGE_PATH="${prefix}/lib64 ${TCL_PACKAGE_PATH}" - EOF - fi - cd $W/tcl8.6.6/unix - ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - cd $W/tk8.6.6 - if [ $arch == x86_64 ] ; then - cp -p unix/configure{,.orig} - sed -i '/^TK_LIBRARY=/s@lib@lib64@g' unix/configure - fi - cd $W/tk8.6.6/unix - ./configure --prefix=/usr --libdir=/usr/$libdir --enable-threads - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + --with-itcl=/usr/$libdir/itcl4.0.5 fi done fi @@ -288,12 +55,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -310,30 +72,13 @@ compress strip_libdir $P/usr/$libdir/itk$vers touch -t `date '+%m%d0900'` $P/usr/$libdir/itk$vers - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links tar cvpf $pkg.tar -C $P usr/$libdir/itk$vers tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/mann | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/05_ext/network2.txz/old/php-20180424/PlamoBuild.php-7.1.16 2018-04-24 14:30:29.000000000 +0900 +++ plamo/05_ext/network2.txz/php/PlamoBuild.php-7.1.23 2018-12-27 16:24:46.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://jp2.php.net/distributions/php-7.1.16.tar.bz2" +url="http://jp2.php.net/distributions/php-7.1.23.tar.bz2" verify= digest= branch= commitid= pkgbase=php -vers=7.1.16 +vers=7.1.23 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -21,15 +21,15 @@ --with-mysql-sock=/tmp/mysql.sock --enable-opcache=shared --with-pdo-mysql=shared,mysqlnd --with-pdo-sqlite --with-xmlrpc=shared --enable-zip=shared --with-libzip --enable-mysqlnd=shared,/opt/mariadb" -DOCS="README.EXT_SKEL README.NEW-OUTPUT-API README.md README.REDIST.BINS - README.MAILINGLIST_RULES README.SELF-CONTAINED-EXTENSIONS EXTENSIONS - NEWS LICENSE CREDITS README.SUBMITTING_PATCH - README.PARAMETER_PARSING_API README.WIN32-BUILD-SYSTEM - README.RELEASE_PROCESS README.namespaces README.TESTING - CODING_STANDARDS UPGRADING.INTERNALS README.UNIX-BUILD-SYSTEM - README.input_filter README.STREAMS README.GIT-RULES UPGRADING - README.TESTING2 INSTALL CONTRIBUTING.md" -template=20170713 +DOCS="README.NEW-OUTPUT-API INSTALL NEWS CONTRIBUTING.md + README.SUBMITTING_PATCH CODING_STANDARDS README.md CREDITS + README.RELEASE_PROCESS README.input_filter UPGRADING EXTENSIONS + README.TESTING README.STREAMS LICENSE README.MAILINGLIST_RULES + README.EXT_SKEL README.UNIX-BUILD-SYSTEM README.GIT-RULES + README.REDIST.BINS README.PARAMETER_PARSING_API UPGRADING.INTERNALS + README.TESTING2 README.WIN32-BUILD-SYSTEM README.namespaces + README.SELF-CONTAINED-EXTENSIONS" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -57,7 +57,7 @@ cp -p sapi/apache2handler/config.m4{,.orig} sed -i '/APACHE_THREADED_MPM=/d' configure sapi/apache2handler/config.m4 cat <<- "EOF" | patch configure - 97722c97722 + 97763c97763 < '${exec_prefix}/lib') --- > '${exec_prefix}/lib'|'${exec_prefix}/lib64') @@ -104,12 +104,13 @@ install -m 644 php.ini-production $P/etc/httpd/php.ini.new touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_libdir $P/usr/$libdir/httpd/modules strip_libdir $P/usr/$libdir/php/extensions/* - touch -t `date '+%m%d0900'` $P/usr/$libdir/{httpd/modules,php/extensions/*} + TZ=UTC touch -t `date -u '+%m%d0000'` \ + $P/usr/$libdir/{httpd/modules,php/extensions/*} setup_docdir convert_links cat <<- "EOF" >> $P/install/doinst.sh @@ -125,7 +126,7 @@ for i in extra/php7.conf php.ini ; do php_config $i ; done EOF - touch -t `date '+%m%d0900'` $P/install/doinst.sh + TZ=UTC touch -t `date -u '+%m%d0000'` $P/install/doinst.sh 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/httpd/modules | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/php @@ -135,7 +136,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/05_ext/network2.txz/old/php-20181227/PlamoBuild.php-7.1.23 2018-12-27 16:24:46.000000000 +0900 +++ plamo/05_ext/network2.txz/php/PlamoBuild.php-7.1.26 2019-03-13 10:13:42.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://jp2.php.net/distributions/php-7.1.23.tar.bz2" +url="http://jp2.php.net/distributions/php-7.1.26.tar.bz2" verify= digest= branch= commitid= pkgbase=php -vers=7.1.23 +vers=7.1.26 arch=`uname -m` build=P2 src=$pkgbase-$vers --- plamo/05_ext/network2.txz/old/httpd-20180424/PlamoBuild.httpd-2.4.33 2018-04-24 12:32:24.000000000 +0900 +++ plamo/05_ext/network2.txz/httpd/PlamoBuild.httpd-2.4.37 2018-12-27 15:39:55.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://archive.apache.org/dist/httpd/httpd-2.4.33.tar.gz" +url="http://archive.apache.org/dist/httpd/httpd-2.4.37.tar.gz" verify= digest= branch= commitid= pkgbase=httpd -vers=2.4.33 +vers=2.4.37 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -17,7 +17,7 @@ --enable-mpms-shared=all" DOCS="LICENSE README.cmake README.platforms README CHANGES VERSIONING NOTICE ROADMAP ABOUT_APACHE INSTALL LAYOUT" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -98,11 +98,11 @@ install -m 644 build/rpm/httpd.logrotate $P/etc/logrotate.d touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_libdir $P/usr/$libdir/httpd/modules - touch -t `date '+%m%d0900'` $P/usr/$libdir/httpd/modules + TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/$libdir/httpd/modules setup_docdir convert_links prune_symlink $P/etc/rc.d/init.d @@ -140,7 +140,7 @@ fi #%% end EOF - touch -t `date '+%m%d0900'` $P/install/doinst.sh + TZ=UTC touch -t `date -u '+%m%d0000'` $P/install/doinst.sh 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/{$libdir,include}/httpd @@ -151,7 +151,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/05_ext/network2.txz/old/php-20190313/PlamoBuild.php-7.1.26 2019-03-13 10:13:42.000000000 +0900 +++ plamo/05_ext/network2.txz/php/PlamoBuild.php-7.1.27 2019-03-15 12:31:24.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://jp2.php.net/distributions/php-7.1.26.tar.bz2" +url="http://jp2.php.net/distributions/php-7.1.27.tar.bz2" verify= digest= branch= commitid= pkgbase=php -vers=7.1.26 +vers=7.1.27 arch=`uname -m` build=P2 src=$pkgbase-$vers @@ -21,14 +21,13 @@ --with-mysql-sock=/tmp/mysql.sock --enable-opcache=shared --with-pdo-mysql=shared,mysqlnd --with-pdo-sqlite --with-xmlrpc=shared --enable-zip=shared --with-libzip --enable-mysqlnd=shared,/opt/mariadb" -DOCS="README.NEW-OUTPUT-API INSTALL NEWS CONTRIBUTING.md - README.SUBMITTING_PATCH CODING_STANDARDS README.md CREDITS - README.RELEASE_PROCESS README.input_filter UPGRADING EXTENSIONS - README.TESTING README.STREAMS LICENSE README.MAILINGLIST_RULES - README.EXT_SKEL README.UNIX-BUILD-SYSTEM README.GIT-RULES - README.REDIST.BINS README.PARAMETER_PARSING_API UPGRADING.INTERNALS - README.TESTING2 README.WIN32-BUILD-SYSTEM README.namespaces - README.SELF-CONTAINED-EXTENSIONS" +DOCS="README.EXT_SKEL README.NEW-OUTPUT-API README.md README.REDIST.BINS + README.MAILINGLIST_RULES README.SELF-CONTAINED-EXTENSIONS EXTENSIONS NEWS + LICENSE CREDITS README.SUBMITTING_PATCH README.PARAMETER_PARSING_API + README.WIN32-BUILD-SYSTEM README.RELEASE_PROCESS README.namespaces + README.TESTING CODING_STANDARDS UPGRADING.INTERNALS + README.UNIX-BUILD-SYSTEM README.input_filter README.STREAMS + README.GIT-RULES UPGRADING README.TESTING2 INSTALL CONTRIBUTING.md" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/05_ext/network2.txz/old/httpd-20181227/PlamoBuild.httpd-2.4.37 2018-12-27 15:39:55.000000000 +0900 +++ plamo/05_ext/network2.txz/httpd/PlamoBuild.httpd-2.4.39 2019-06-06 09:42:06.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://archive.apache.org/dist/httpd/httpd-2.4.37.tar.gz" +url="http://archive.apache.org/dist/httpd/httpd-2.4.39.tar.gz" verify= digest= branch= commitid= pkgbase=httpd -vers=2.4.37 +vers=2.4.39 arch=`uname -m` build=P2 src=$pkgbase-$vers --- plamo/05_ext/network2.txz/old/php-20190315/PlamoBuild.php-7.1.27 2019-03-15 12:31:24.000000000 +0900 +++ plamo/05_ext/network2.txz/php/PlamoBuild.php-7.1.28 2019-06-06 09:53:35.000000000 +0900 @@ -1,13 +1,13 @@ #!/bin/sh ###################################################################### -url="http://jp2.php.net/distributions/php-7.1.27.tar.bz2" +url="http://jp2.php.net/distributions/php-7.1.28.tar.bz2" verify= digest= branch= commitid= pkgbase=php -vers=7.1.27 +vers=7.1.28 arch=`uname -m` build=P2 src=$pkgbase-$vers --- plamo/05_ext/old/avahi-20180331/PlamoBuild.avahi-0.6.31 2018-03-31 16:51:26.000000000 +0900 +++ plamo/05_ext/avahi/PlamoBuild.avahi-0.6.31 2018-06-17 16:31:54.000000000 +0900 @@ -10,7 +10,7 @@ pkgbase=avahi vers=0.6.31 arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="avahi-0.6.31-gtkstock_deprecated.patch" OPT_CONFIG="--disable-qt3 --disable-mono --with-distro=slackware" @@ -76,6 +76,7 @@ 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/sbin | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -name libavahi-[cqg]*` tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/$libdir/girepository-1.0 | tail -n+2` --- plamo/05_ext/old/apr-20180416/PlamoBuild.apr-1.5.2 2018-04-16 14:26:49.000000000 +0900 +++ plamo/05_ext/apr/PlamoBuild.apr-1.6.5 2018-12-27 14:49:29.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://archive.apache.org/dist/apr/apr-1.5.2.tar.bz2" +url="http://archive.apache.org/dist/apr/apr-1.6.5.tar.bz2" verify= digest= branch= commitid= pkgbase=apr -vers=1.5.2 +vers=1.6.5 arch=`uname -m` build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="LICENSE README.cmake CHANGES NOTICE README" -template=20170713 +DOCS="NOTICE CHANGES README.cmake LICENSE README" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -68,8 +68,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -81,7 +81,7 @@ tar rvpf $pkg.tar -C $P usr/include/apr-1 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/05_ext/old/apr_util-20180416/PlamoBuild.apr_util-1.5.4 2018-04-16 15:14:43.000000000 +0900 +++ plamo/05_ext/apr_util/PlamoBuild.apr_util-1.6.1 2018-12-27 15:11:35.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.bz2" +url="http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.bz2" verify= digest= branch= commitid= pkgbase=apr_util -vers=1.5.4 +vers=1.6.1 arch=`uname -m` build=P2 src=apr-util-$vers patchfiles="" OPT_CONFIG="--with-apr=/usr/bin/apr-1-config --with-berkeley-db" DOCS="README.cmake CHANGES LICENSE README NOTICE" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -67,13 +67,13 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress strip_libdir $P/usr/$libdir/apr-util-1 setup_docdir convert_links - touch -t `date '+%m%d0900'` $P/usr/$libdir/apr-util-1 + TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/$libdir/apr-util-1 tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` tar rvpf $pkg.tar -C $P usr/$libdir/apr-util-1 tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` @@ -82,7 +82,7 @@ tar rvpf $pkg.tar -C $P usr/include/apr-1 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/05_ext/old/libseccomp-20180711/PlamoBuild.libseccomp-2.1.0 2018-07-11 17:54:39.000000000 +0900 +++ plamo/05_ext/libseccomp/PlamoBuild.libseccomp-2.3.3 2019-02-26 08:53:07.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://downloads.sourceforge.net/libseccomp/libseccomp-2.1.0.tar.gz" +url="https://github.com/seccomp/libseccomp/releases/download/v2.3.3/libseccomp-2.3.3.tar.gz" verify= digest= branch= commitid= pkgbase=libseccomp -vers=2.1.0 +vers=2.3.3 arch=`uname -m` -build=P2 +build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="CREDITS README LICENSE CHANGELOG" -template=20170713 +DOCS="SUBMITTING_PATCHES CHANGELOG CREDITS README.md LICENSE" +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -65,8 +65,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -78,7 +78,7 @@ 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/05_ext/Inputmethods.txz/old/anthy-20180724/PlamoBuild.anthy-9100h 2018-07-24 19:16:04.000000000 +0900 +++ plamo/05_ext/Inputmethods.txz/anthy/PlamoBuild.anthy-9100h 2018-08-16 12:54:58.000000000 +0900 @@ -9,7 +9,7 @@ pkgbase=anthy vers=9100h arch=`uname -m` -build=P3 +build=P4 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" @@ -17,7 +17,7 @@ `echo doc/{LEARNING,ELISP,SPLITTER,GRAMMAR,MISC,DICLIB,ILIB,GUIDE}` `echo doc/{protocol.txt,GLOSSARY,LIB,DICUTIL,00INDEX,POS,GUIDE.english}` doc/TESTING INSTALL" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -70,8 +70,8 @@ done touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress setup_docdir convert_links @@ -80,10 +80,11 @@ `cd $P ; find usr/$libdir ! -name pkgconfig | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/anthy tar rvpf $pkg.tar -C $P usr/share/emacs/site-lisp/anthy + tar rvpf $pkg.tar -C $P usr/share/anthy tar rvpf $pkg.tar -C $P etc/anthy-conf 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/09_kernel/old/kernelsrc-20160124/PlamoBuild.kernelsrc-4.1.15_plamoRPi2 2016-01-24 10:56:14.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.1.15_plamoRPi2 2016-02-04 08:06:31.000000000 +0900 @@ -9,12 +9,11 @@ ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-morse_code_panics.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2 - https://github.com/raspberry/firmware.git" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2" pkgbase=kernelsrc vers=4.1.15_plamoRPi2 arch=noarch -build=P1 +build=P2 src=linux OPT_CONFIG="" DOCS="" @@ -208,7 +207,6 @@ git) ( cd `basename ${i##*/} .git` case `basename ${i##*/} .git` in linux) git checkout origin/rpi-4.1.y ; git reset --hard d51c7d8 ;; - firmware) git checkout origin/master ; git reset --hard 1ed8eca ;; aufs4-*) git checkout origin/aufs4.1 ; git reset --hard 2b569cf ;; esac ) ;; esac @@ -234,7 +232,6 @@ bunzip2 -c $W/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch cp -p $W/config-4.1.15-plamoRPi2 .config - cp -p $W/firmware/extra/Module7.symvers Module.symvers for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then @@ -278,12 +275,12 @@ fi done install -d $P/usr/src - cp -dR . $P/usr/src/$src - rm $P/usr/src/$src/.git - find $P/usr/src/$src \( -name ".get_maintainer.ignore" \ + cp -dR . $P/usr/src/$src-4.1.15 + rm $P/usr/src/$src-4.1.15/.git + find $P/usr/src/$src-4.1.15 \( -name ".get_maintainer.ignore" \ -o -name ".gitignore" -o -name ".mailmap" -o -name "*.orig" \) \ -exec rm {} \; -# ln -s $src $P/usr/src/linux + ln -s $src-4.1.15 $P/usr/src/linux install -d $P/sbin cat <<- "EOF" > $P/sbin/installkernel #!/bin/sh @@ -308,20 +305,10 @@ # $4 - default install path (blank if root directory) # - if [ "$(basename $2)" = "zImage" ]; then - # Compressed install - echo "Installing compressed kernel" - base=vmlinuz - else - # Normal install - echo "Installing normal kernel" - base=vmlinux - fi - [ -f $4/config ] && mv $4/config $4/config.old cp .config $4/config - [ -f $4/$base ] && mv $4/$base $4/$base.old - cat $2 > $4/$base + [ -f $4/kernel7.img ] && mv $4/kernel7.img $4/kernel7.old + scripts/mkknlimg $2 > $4/kernel7.img [ -f $4/System.map ] && mv $4/System.map $4/System.old cp $3 $4/System.map @@ -358,11 +345,11 @@ touch -t `date '+%m%d0900'` $docdir/$src convert prune_symlink $P/usr/src - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/metag/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/mips/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/powerpc/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/copyloops + touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/arm/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/metag/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/mips/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/powerpc/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/tools/testing/selftests/powerpc/copyloops tar cvpf $pkg.tar -C $P `cd $P ; find usr/src -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src --- plamo/09_kernel/old/kernelsrc-20160204/PlamoBuild.kernelsrc-4.1.15_plamoRPi2 2016-02-04 08:06:31.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.1.15_plamoRPi2 2016-02-19 08:31:04.000000000 +0900 @@ -13,7 +13,7 @@ pkgbase=kernelsrc vers=4.1.15_plamoRPi2 arch=noarch -build=P2 +build=P3 src=linux OPT_CONFIG="" DOCS="" --- plamo/09_kernel/old/kernelsrc-20160219/PlamoBuild.kernelsrc-4.1.15_plamoRPi2 2016-02-19 08:31:04.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.9.36_plamoRPi2 2017-07-27 11:37:59.000000000 +0900 @@ -1,224 +1,55 @@ #!/bin/sh -x ###################################################################### -url="https://github.com/raspberry/linux.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20150627-4.1.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.36.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20161217-4.9.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.1-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.1.15-plamoRPi2" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.9.36-20170705-3ecb1db.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.9.36-plamo@LV@" +verify= +digest= +branch[3]=aufs4.9 +commitid[3]=c8baf66 pkgbase=kernelsrc -vers=4.1.15_plamoRPi2 +vers=4.9.36_plamo@LV@ arch=noarch -build=P3 -src=linux +build=P1 +src=linux-4.9.36 +patchfiles="" OPT_CONFIG="" DOCS="" +template=20170713 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +case `uname -m` in i686) lv=SMP ;; x86_64) lv=64 ;; armv7l) lv=RPi2 ;; esac +url=${url/@LV@/$lv} ; vers=${vers/@LV@/$lv} +prepare "$@" if [ $opt_download -eq 1 ] ; then - for i in $url ; do - case ${i##*.} in - git) if [ ! -d `basename ${i##*/} .git` ] ; then git clone $i ; fi ;; - *) if [ ! -f ${i##*/} ] ; then wget $i ; fi ;; - esac - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - xz) tar xvpJf ${i##*/} ;; - git) ( cd `basename ${i##*/} .git` - case `basename ${i##*/} .git` in - linux) git checkout origin/rpi-4.1.y ; git reset --hard d51c7d8 ;; - aufs4-*) git checkout origin/aufs4.1 ; git reset --hard 2b569cf ;; - esac ) ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd $B - rm -rf .git ; touch .git - patch -Np1 -i $W/vd_unicon-kernel-20150627-4.1.patch + patch -Np1 -i $W/vd_unicon-kernel-20161217-4.9.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -227,22 +58,22 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.1-panic_beep.patch - patch -Np1 -i $W/4.1-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.1.6-2015-08-22.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.9-panic_beep.patch + patch -Np1 -i $W/4.9-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 | patch -Np1 -i - + chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - cp -p $W/config-4.1.15-plamoRPi2 .config + if [ `uname -m` == armv7l ] ; then + unxz -c $W/rpi-4.9.36-20170705-3ecb1db.patch.xz | patch -Np1 -i - + chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} + chmod 755 scripts/{knlinfo,mkknlimg} + fi + cp -p $W/config-4.9.36-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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 @@ -259,12 +90,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -275,45 +101,50 @@ fi done install -d $P/usr/src - cp -dR . $P/usr/src/$src-4.1.15 - rm $P/usr/src/$src-4.1.15/.git - find $P/usr/src/$src-4.1.15 \( -name ".get_maintainer.ignore" \ - -o -name ".gitignore" -o -name ".mailmap" -o -name "*.orig" \) \ - -exec rm {} \; - ln -s $src-4.1.15 $P/usr/src/linux + cp -dR . $P/usr/src/$src + find $P/usr/src/$src \( -name ".cocciconfig" \ + -o -name ".get_maintainer.ignore" -o -name ".gitattributes" \ + -o -name ".gitignore" -o -name ".mailmap" \ + -o -name "*.orig" \) -exec rm {} \; + ln -s $src $P/usr/src/linux install -d $P/sbin - cat <<- "EOF" > $P/sbin/installkernel - #!/bin/sh - # - # arch/arm/boot/install.sh - # - # This file is subject to the terms and conditions of the GNU General Public - # License. See the file "COPYING" in the main directory of this archive - # for more details. - # - # Copyright (C) 1995 by Linus Torvalds - # - # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin - # Adapted from code in arch/i386/boot/install.sh by Russell King - # - # "make install" script for arm architecture - # - # Arguments: - # $1 - kernel version - # $2 - kernel image file - # $3 - kernel map file - # $4 - default install path (blank if root directory) - # - + if [ `uname -m` == i686 -o `uname -m` == x86_64 ] ; then + sed '/^verify/,$d' $B/arch/x86/boot/install.sh > $P/sbin/installkernel + else + sed '/^verify/,$d' $B/arch/arm/boot/install.sh > $P/sbin/installkernel + fi + cat <<- "EOF" >> $P/sbin/installkernel [ -f $4/config ] && mv $4/config $4/config.old cp .config $4/config + EOF + if [ `uname -m` == i686 -o `uname -m` == x86_64 ] ; then + cat <<- "EOF" >> $P/sbin/installkernel + [ -f $4/vmlinuz ] && mv $4/vmlinuz $4/vmlinuz.old + cat $2 > $4/vmlinuz + EOF + else + cat <<- "EOF" >> $P/sbin/installkernel [ -f $4/kernel7.img ] && mv $4/kernel7.img $4/kernel7.old - scripts/mkknlimg $2 > $4/kernel7.img + scripts/mkknlimg $2 $4/kernel7.img + EOF + fi + cat <<- "EOF" >> $P/sbin/installkernel [ -f $4/System.map ] && mv $4/System.map $4/System.old cp $3 $4/System.map + EOF + if [ `uname -m` == i686 -o `uname -m` == x86_64 ] ; then + cat <<- "EOF" >> $P/sbin/installkernel + if [ -x /sbin/lilo -a -f /etc/lilo.conf ] ; then + /sbin/lilo + EOF + else + cat <<- "EOF" >> $P/sbin/installkernel if [ -x /sbin/loadmap ] ; then /sbin/loadmap + EOF + fi + cat <<- "EOF" >> $P/sbin/installkernel else sync fi @@ -324,38 +155,32 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - install -d $docdir/$src - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - touch -t `date '+%m%d0900'` $docdir/$src - convert + install -d $docdir/$src + setup_docdir + convert_links prune_symlink $P/usr/src - touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/arm/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/metag/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/mips/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/arch/powerpc/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src-4.1.15/tools/testing/selftests/powerpc/copyloops + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm/boot/dts + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/arm + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/broadcom + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/socionext + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/cris/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/metag/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/mips/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/powerpc/boot/dts/include + touch -t `date '+%m%d0900'` $P/usr/src/$src/include/dt-bindings/input + touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/copyloops + touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/primitives + touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/primitives/asm + touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/stringloops + touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/vphn tar cvpf $pkg.tar -C $P `cd $P ; find usr/src -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find sbin | 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/09_kernel/old/kernelsrc-20170727/PlamoBuild.kernelsrc-4.9.36_plamoRPi2 2017-07-27 11:37:59.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.10.17_plamoRPi2 2017-08-13 17:50:32.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.36.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20161217-4.9.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.17.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170225-4.10.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.9-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.9.36-20170705-3ecb1db.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.9.36-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.10.17-20170521-78cfe36.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.10.17-plamo@LV@" verify= digest= -branch[3]=aufs4.9 -commitid[3]=c8baf66 +branch[3]=aufs4.10 +commitid[3]=a19543b pkgbase=kernelsrc -vers=4.9.36_plamo@LV@ +vers=4.10.17_plamo@LV@ arch=noarch build=P1 -src=linux-4.9.36 +src=linux-4.10.17 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20161217-4.9.patch + patch -Np1 -i $W/vd_unicon-kernel-20170225-4.10.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.9-panic_beep.patch - patch -Np1 -i $W/4.9-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.9.1-2017-01-06.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.10-panic_beep.patch + patch -Np1 -i $W/4.10-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.9.36-20170705-3ecb1db.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.10.17-20170521-78cfe36.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.9.36-plamo$lv .config + cp -p $W/config-4.10.17-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -159,6 +159,7 @@ setup_docdir convert_links prune_symlink $P/usr/src + touch -t `date '+%m%d0900'` $P/usr/src/$src/Documentation touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm/boot/dts touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm/boot/dts/include touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts --- plamo/09_kernel/old/kernelsrc-20170813/PlamoBuild.kernelsrc-4.10.17_plamoRPi2 2017-08-13 17:50:32.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.11.12_plamo@LV@ 2017-08-29 16:05:31.000000000 +0900 @@ -1,25 +1,27 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.10.17.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170225-4.10.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.11.12.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170506-4.11.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.10-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/aufs/4.11.12-aufs_fix.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/4.11.12-tuxonice_fix.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.10.17-20170521-78cfe36.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.10.17-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.11.12-20170719-d5c0e92.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.11.12-plamo@LV@" verify= digest= -branch[3]=aufs4.10 -commitid[3]=a19543b +branch[3]=aufs4.11.7+ +commitid[3]=71715aa pkgbase=kernelsrc -vers=4.10.17_plamo@LV@ +vers=4.11.12_plamo@LV@ arch=noarch build=P1 -src=linux-4.10.17 +src=linux-4.11.12 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170225-4.10.patch + patch -Np1 -i $W/vd_unicon-kernel-20170506-4.11.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +60,19 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.10-panic_beep.patch - patch -Np1 -i $W/4.10-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.10.17-2017-05-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.11.12-aufs_fix.patch + patch -Np1 -i $W/4.11-panic_beep.patch + patch -Np1 -i $W/4.11-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.11.12-tuxonice_fix.patch chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.10.17-20170521-78cfe36.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.11.12-20170719-d5c0e92.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.10.17-plamo$lv .config + cp -p $W/config-4.11.12-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20170829/PlamoBuild.kernelsrc-4.11.12_plamo@LV@ 2017-08-29 16:05:31.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.12.14_plamo@LV@ 2018-12-01 09:48:14.000000000 +0900 @@ -1,31 +1,29 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.11.12.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170506-4.11.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.12.14.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170708-4.12.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/aufs/4.11.12-aufs_fix.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.11-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/4.11.12-tuxonice_fix.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.11.12-20170719-d5c0e92.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.11.12-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.12.14-20170906-6fe4193.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.12.14-plamo@LV@" verify= digest= -branch[3]=aufs4.11.7+ -commitid[3]=71715aa +branch[3]=aufs4.12 +commitid[3]=31266c0 pkgbase=kernelsrc -vers=4.11.12_plamo@LV@ +vers=4.12.14_plamo@LV@ arch=noarch build=P1 -src=linux-4.11.12 +src=linux-4.12.14 patchfiles="" OPT_CONFIG="" DOCS="" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -51,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170506-4.11.patch + patch -Np1 -i $W/vd_unicon-kernel-20170708-4.12.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -60,19 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.11.12-aufs_fix.patch - patch -Np1 -i $W/4.11-panic_beep.patch - patch -Np1 -i $W/4.11-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.11.12-2017-07-24.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/4.11.12-tuxonice_fix.patch + patch -Np1 -i $W/4.12-panic_beep.patch + patch -Np1 -i $W/4.12-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.11.12-20170719-d5c0e92.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.12.14-20170906-6fe4193.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.11.12-plamo$lv .config + cp -p $W/config-4.12.14-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -156,36 +152,25 @@ chmod 755 $P/sbin/installkernel touch $W/i.et cd $W - find $P ! -type l -newer i.st ! -newer i.et \ - -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ + -exec touch -t `date -u '+%m%d0000'` {} \; compress install -d $docdir/$src setup_docdir convert_links prune_symlink $P/usr/src - touch -t `date '+%m%d0900'` $P/usr/src/$src/Documentation - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm/boot/dts - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/arm - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/broadcom - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/arm64/boot/dts/socionext - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/cris/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/metag/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/mips/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/arch/powerpc/boot/dts/include - touch -t `date '+%m%d0900'` $P/usr/src/$src/include/dt-bindings/input - touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/copyloops - touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/primitives - touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/primitives/asm - touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/stringloops - touch -t `date '+%m%d0900'` $P/usr/src/$src/tools/testing/selftests/powerpc/vphn + for i in Documentation arch/arm/boot/dts \ + arch/arm64/boot/dts{/arm,/broadcom,/socionext,} \ + include/dt-bindings/input scripts/dtc/include-prefixes \ + tools/testing/selftests/powerpc/{copyloops,primitives{/asm,}} \ + tools/testing/selftests/powerpc/{stringloops,vphn} ; do + TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/src/$src/$i + done tar cvpf $pkg.tar -C $P `cd $P ; find usr/src -maxdepth 1 | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find sbin | 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 + TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar + xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup fi --- plamo/09_kernel/old/kernelsrc-20181201/PlamoBuild.kernelsrc-4.12.14_plamo@LV@ 2018-12-01 09:48:14.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.13.16_plamo@LV@ 2018-12-04 18:06:28.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.12.14.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170708-4.12.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.16.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170909-4.13.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.12-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.12.14-20170906-6fe4193.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.12.14-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.13.16-20171117-c9b4367.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.13.16-plamo@LV@" verify= digest= -branch[3]=aufs4.12 -commitid[3]=31266c0 +branch[3]=aufs4.13 +commitid[3]=78cbc7f pkgbase=kernelsrc -vers=4.12.14_plamo@LV@ +vers=4.13.16_plamo@LV@ arch=noarch build=P1 -src=linux-4.12.14 +src=linux-4.13.16 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170708-4.12.patch + patch -Np1 -i $W/vd_unicon-kernel-20170909-4.13.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.12-panic_beep.patch - patch -Np1 -i $W/4.12-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.12.14-2017-09-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.13-panic_beep.patch + patch -Np1 -i $W/4.13-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.12.14-20170906-6fe4193.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.13.16-20171117-c9b4367.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.12.14-plamo$lv .config + cp -p $W/config-4.13.16-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20181204/PlamoBuild.kernelsrc-4.13.16_plamo@LV@ 2018-12-04 18:06:28.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.14.85_plamo@LV@ 2018-12-16 12:26:48.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.16.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20170909-4.13.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.85.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20171118-4.14.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.13-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.13.16-20171117-c9b4367.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.13.16-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.14.85-20181205-802d877.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.14.85-plamo@LV@" verify= digest= -branch[3]=aufs4.13 -commitid[3]=78cbc7f +branch[3]=aufs4.14.73+ +commitid[3]=df6d0ef pkgbase=kernelsrc -vers=4.13.16_plamo@LV@ +vers=4.14.85_plamo@LV@ arch=noarch build=P1 -src=linux-4.13.16 +src=linux-4.14.85 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20170909-4.13.patch + patch -Np1 -i $W/vd_unicon-kernel-20171118-4.14.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.13-panic_beep.patch - patch -Np1 -i $W/4.13-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.13.16-2017-11-24.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.14-panic_beep.patch + patch -Np1 -i $W/4.14-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.13.16-20171117-c9b4367.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.14.85-20181205-802d877.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.13.16-plamo$lv .config + cp -p $W/config-4.14.85-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -160,7 +160,7 @@ convert_links prune_symlink $P/usr/src for i in Documentation arch/arm/boot/dts \ - arch/arm64/boot/dts{/arm,/broadcom,/socionext,} \ + arch/arm64/boot/dts{/arm,/broadcom,} \ include/dt-bindings/input scripts/dtc/include-prefixes \ tools/testing/selftests/powerpc/{copyloops,primitives{/asm,}} \ tools/testing/selftests/powerpc/{stringloops,vphn} ; do --- plamo/09_kernel/old/kernelsrc-20181216/PlamoBuild.kernelsrc-4.14.85_plamo@LV@ 2018-12-16 12:26:48.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.15.18_plamo@LV@ 2018-12-19 09:09:08.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.85.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20171118-4.14.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180203-4.15.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.14-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.14.85-20181205-802d877.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.14.85-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.15.18-20180521-1b75d3e.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.15.18-plamo@LV@" verify= digest= -branch[3]=aufs4.14.73+ -commitid[3]=df6d0ef +branch[3]=aufs4.15 +commitid[3]=8289398 pkgbase=kernelsrc -vers=4.14.85_plamo@LV@ +vers=4.15.18_plamo@LV@ arch=noarch build=P1 -src=linux-4.14.85 +src=linux-4.15.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20171118-4.14.patch + patch -Np1 -i $W/vd_unicon-kernel-20180203-4.15.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.14-panic_beep.patch - patch -Np1 -i $W/4.14-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.14.32-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.15-panic_beep.patch + patch -Np1 -i $W/4.15-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.14.85-20181205-802d877.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.15.18-20180521-1b75d3e.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.14.85-plamo$lv .config + cp -p $W/config-4.15.18-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20181219/PlamoBuild.kernelsrc-4.15.18_plamo@LV@ 2018-12-19 09:09:08.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.16.18_plamo@LV@ 2018-12-23 20:56:07.000000000 +0900 @@ -1,25 +1,25 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180203-4.15.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180407-4.16.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.15-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.15.18-20180521-1b75d3e.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.15.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.16.18-20180614-fd4f278.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.16.18-plamo@LV@" verify= digest= -branch[3]=aufs4.15 -commitid[3]=8289398 +branch[3]=aufs4.16 +commitid[3]=e0f5222 pkgbase=kernelsrc -vers=4.15.18_plamo@LV@ +vers=4.16.18_plamo@LV@ arch=noarch build=P1 -src=linux-4.15.18 +src=linux-4.16.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -49,7 +49,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180203-4.15.patch + patch -Np1 -i $W/vd_unicon-kernel-20180407-4.16.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +58,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.15-panic_beep.patch - patch -Np1 -i $W/4.15-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.15.15-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.16-panic_beep.patch + patch -Np1 -i $W/4.16-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.15.18-20180521-1b75d3e.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.16.18-20180614-fd4f278.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.15.18-plamo$lv .config + cp -p $W/config-4.16.18-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20181223/PlamoBuild.kernelsrc-4.16.18_plamo@LV@ 2018-12-23 20:56:07.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.17.19_plamo@LV@ 2020-10-24 15:18:31.000000000 +0900 @@ -1,25 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180407-4.16.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.17.19.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180609-4.17.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.16-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.16.18-20180614-fd4f278.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.16.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.17.19-20180630-b0b5a34.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.17.19-plamo@LV@" verify= digest= -branch[3]=aufs4.16 -commitid[3]=e0f5222 +branch[4]=aufs4.17 +commitid[4]=4662af5 pkgbase=kernelsrc -vers=4.16.18_plamo@LV@ +vers=4.17.19_plamo@LV@ arch=noarch build=P1 -src=linux-4.16.18 +src=linux-4.17.19 patchfiles="" OPT_CONFIG="" DOCS="" @@ -42,6 +43,12 @@ prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources + cat <<- "EOF" | patch aufs4-standalone/aufs4-mmap.patch + 304c304 + < kmem_cache_free(vm_area_cachep, vma); + --- + > vm_area_free(vma); + EOF fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -49,7 +56,8 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180407-4.16.patch + patch -Np1 -i $W/vd_unicon-kernel-20180609-4.17.patch + patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch @@ -58,17 +66,17 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.16-panic_beep.patch - patch -Np1 -i $W/4.16-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.16.0-2018-04-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.17-panic_beep.patch + patch -Np1 -i $W/4.17-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.16.18-20180614-fd4f278.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.17.19-20180630-b0b5a34.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.16.18-plamo$lv .config + cp -p $W/config-4.17.19-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -102,7 +110,7 @@ done install -d $P/usr/src cp -dR . $P/usr/src/$src - find $P/usr/src/$src \( -name ".cocciconfig" \ + find $P/usr/src/$src \( -name ".clang-format" -o -name ".cocciconfig" \ -o -name ".get_maintainer.ignore" -o -name ".gitattributes" \ -o -name ".gitignore" -o -name ".mailmap" \ -o -name "*.orig" \) -exec rm {} \; --- plamo/09_kernel/old/kernelsrc-20201024/PlamoBuild.kernelsrc-4.17.19_plamo@LV@ 2020-10-24 15:18:31.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.18.20_plamo@LV@ 2021-02-18 20:06:39.000000000 +0900 @@ -1,26 +1,27 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.17.19.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180609-4.17.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.18.20.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180818-4.18.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.17-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.17.19-20180630-b0b5a34.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.17.19-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/4.18.20-revert-drm-i915-ringbuffer.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.18.20-20181023-d58c595.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.18.20-plamo@LV@" verify= digest= -branch[4]=aufs4.17 -commitid[4]=4662af5 +branch[4]=aufs4.18 +commitid[4]=c0cdacc pkgbase=kernelsrc -vers=4.17.19_plamo@LV@ +vers=4.18.20_plamo@LV@ arch=noarch build=P1 -src=linux-4.17.19 +src=linux-4.18.20 patchfiles="" OPT_CONFIG="" DOCS="" @@ -43,12 +44,6 @@ prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources - cat <<- "EOF" | patch aufs4-standalone/aufs4-mmap.patch - 304c304 - < kmem_cache_free(vm_area_cachep, vma); - --- - > vm_area_free(vma); - EOF fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do @@ -56,7 +51,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180609-4.17.patch + patch -Np1 -i $W/vd_unicon-kernel-20180818-4.18.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -66,17 +61,18 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.17-panic_beep.patch - patch -Np1 -i $W/4.17-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.17.19-2018-09-06.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.18-panic_beep.patch + patch -Np1 -i $W/4.18-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/4.18.20-revert-drm-i915-ringbuffer.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.17.19-20180630-b0b5a34.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.18.20-20181023-d58c595.patch.xz | patch -Np1 -i - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.17.19-plamo$lv .config + cp -p $W/config-4.18.20-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20210218/PlamoBuild.kernelsrc-4.18.20_plamo@LV@ 2021-02-18 20:06:39.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.19.127_plamo@LV@ 2021-02-21 13:06:11.000000000 +0900 @@ -1,27 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.18.20.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20180818-4.18.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.127.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181027-4.19.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.18-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/4.18.20-revert-drm-i915-ringbuffer.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.18.20-20181023-d58c595.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.18.20-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.19.127-20200717-cc39f1c.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.19.127-plamo@LV@" verify= digest= -branch[4]=aufs4.18 -commitid[4]=c0cdacc +branch[4]=aufs4.19.63+ +commitid[4]=1bb4caf pkgbase=kernelsrc -vers=4.18.20_plamo@LV@ +vers=4.19.127_plamo@LV@ arch=noarch build=P1 -src=linux-4.18.20 +src=linux-4.19.127 patchfiles="" OPT_CONFIG="" DOCS="" @@ -51,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20180818-4.18.patch + patch -Np1 -i $W/vd_unicon-kernel-20181027-4.19.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -61,18 +60,21 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.18-panic_beep.patch - patch -Np1 -i $W/4.18-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.18.20-2019-05-23.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/4.19-panic_beep.patch + patch -Np1 -i $W/4.19-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 | patch -Np1 -i - + cp -p kernel/power/snapshot.c{,.orig} + sed -i 's@indx@index@g' kernel/power/snapshot.c chmod 755 scripts/tuxonice_output_to_csv.sh + rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - patch -Np1 -i $W/4.18.20-revert-drm-i915-ringbuffer.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.18.20-20181023-d58c595.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.19.127-20200717-cc39f1c.patch.xz | patch -Np1 -i - + rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.18.20-plamo$lv .config + cp -p $W/config-4.19.127-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -87,9 +89,8 @@ cd ${B[$i]} if [ -f Makefile ] ; then make prepare scripts - mv include/generated/bounds.h $W + rm .config.old make clean - mv $W/bounds.h include/generated fi done fi --- plamo/09_kernel/old/kernelsrc-20210221/PlamoBuild.kernelsrc-4.19.127_plamo@LV@ 2021-02-21 13:06:11.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-4.20.17_plamo@LV@ 2021-06-27 16:10:57.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.127.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181027-4.19.patch +url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181229-4.20.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.19-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.19.127-20200717-cc39f1c.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.19.127-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.20.17-20190923-41f5d37.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.20.17-plamo@LV@" verify= digest= -branch[4]=aufs4.19.63+ -commitid[4]=1bb4caf +branch[4]=aufs4.20.4+ +commitid[4]=51f87f2 pkgbase=kernelsrc -vers=4.19.127_plamo@LV@ +vers=4.20.17_plamo@LV@ arch=noarch build=P1 -src=linux-4.19.127 +src=linux-4.20.17 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20181027-4.19.patch + patch -Np1 -i $W/vd_unicon-kernel-20181229-4.20.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch @@ -60,21 +60,19 @@ cp -av $W/aufs4-standalone/Documentation . cp -av $W/aufs4-standalone/fs . cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.19-panic_beep.patch - patch -Np1 -i $W/4.19-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.19.121-2020-05-09.patch.bz2 | patch -Np1 -i - - cp -p kernel/power/snapshot.c{,.orig} - sed -i 's@indx@index@g' kernel/power/snapshot.c + patch -Np1 -i $W/4.20-panic_beep.patch + patch -Np1 -i $W/4.20-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.19.127-20200717-cc39f1c.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-4.20.17-20190923-41f5d37.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.19.127-plamo$lv .config + cp -p $W/config-4.20.17-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -166,6 +164,7 @@ prune_symlink $P/usr/src for i in Documentation arch/arm/boot/dts \ arch/arm64/boot/dts{/arm,/broadcom,} \ + arch/csky/boot/dts/include \ include/dt-bindings/input scripts/dtc/include-prefixes \ tools/testing/selftests/powerpc/{copyloops,primitives{/asm,}} \ tools/testing/selftests/powerpc/{stringloops,vphn} ; do --- plamo/09_kernel/old/kernelsrc-20210627/PlamoBuild.kernelsrc-4.20.17_plamo@LV@ 2021-06-27 16:10:57.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-5.0.21_plamo@LV@ 2021-07-01 11:09:01.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.20.17.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20181229-4.20.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190309-5.0.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 - https://github.com/sfjro/aufs4-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/4.20-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 + https://github.com/sfjro/aufs5-standalone.git + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-4.20.17-20190923-41f5d37.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-4.20.17-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.0.21-20190923-0222b82.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.0.21-plamo@LV@" verify= digest= -branch[4]=aufs4.20.4+ -commitid[4]=51f87f2 +branch[4]=aufs5.0 +commitid[4]=25f304c pkgbase=kernelsrc -vers=4.20.17_plamo@LV@ +vers=5.0.21_plamo@LV@ arch=noarch build=P1 -src=linux-4.20.17 +src=linux-5.0.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,29 +50,28 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20181229-4.20.patch + patch -Np1 -i $W/vd_unicon-kernel-20190309-5.0.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/aufs4-standalone/aufs4-kbuild.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-base.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-mmap.patch - patch -Np1 -i $W/aufs4-standalone/aufs4-standalone.patch - cp -av $W/aufs4-standalone/Documentation . - cp -av $W/aufs4-standalone/fs . - cp -pv $W/aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/4.20-panic_beep.patch - patch -Np1 -i $W/4.20-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-4.20.17-2019-03-27.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch + cp -av $W/aufs5-standalone/Documentation . + cp -av $W/aufs5-standalone/fs . + cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux + patch -Np1 -i $W/5.0-panic_beep.patch + patch -Np1 -i $W/5.0-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh - rm shmem.diff patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-4.20.17-20190923-41f5d37.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.0.21-20190923-0222b82.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-4.20.17-plamo$lv .config + cp -p $W/config-5.0.21-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20210701/PlamoBuild.kernelsrc-5.0.21_plamo@LV@ 2021-07-01 11:09:01.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-5.1.21_plamo@LV@ 2021-07-06 09:07:29.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.0.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190309-5.0.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190511-5.1.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.0-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.0.21-20190923-0222b82.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.0.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.1.21-20190923-29ee73a.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.1.21-plamo@LV@" verify= digest= -branch[4]=aufs5.0 -commitid[4]=25f304c +branch[4]=aufs5.1 +commitid[4]=d051ff3 pkgbase=kernelsrc -vers=5.0.21_plamo@LV@ +vers=5.1.21_plamo@LV@ arch=noarch build=P1 -src=linux-5.0.21 +src=linux-5.1.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190309-5.0.patch + patch -Np1 -i $W/vd_unicon-kernel-20190511-5.1.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,18 +60,18 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.0-panic_beep.patch - patch -Np1 -i $W/5.0-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.0.21-2019-06-07.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.1-panic_beep.patch + patch -Np1 -i $W/5.1-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.0.21-20190923-0222b82.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.1.21-20190923-29ee73a.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.0.21-plamo$lv .config + cp -p $W/config-5.1.21-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20210706/PlamoBuild.kernelsrc-5.1.21_plamo@LV@ 2021-07-06 09:07:29.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-5.2.21_plamo@LV@ 2021-07-13 12:54:23.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190511-5.1.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190713-5.2.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.1-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.1.21-20190923-29ee73a.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.1.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.2.21-20191029-94dbfa7.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.2.21-plamo@LV@" verify= digest= -branch[4]=aufs5.1 -commitid[4]=d051ff3 +branch[4]=aufs5.2.5+ +commitid[4]=40a8029 pkgbase=kernelsrc -vers=5.1.21_plamo@LV@ +vers=5.2.21_plamo@LV@ arch=noarch build=P1 -src=linux-5.1.21 +src=linux-5.2.21 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190511-5.1.patch + patch -Np1 -i $W/vd_unicon-kernel-20190713-5.2.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,18 +60,18 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.1-panic_beep.patch - patch -Np1 -i $W/5.1-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.1.21-2019-08-19.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.2-panic_beep.patch + patch -Np1 -i $W/5.2-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.1.21-20190923-29ee73a.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.2.21-20191029-94dbfa7.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.1.21-plamo$lv .config + cp -p $W/config-5.2.21-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -86,7 +86,6 @@ cd ${B[$i]} if [ -f Makefile ] ; then make prepare scripts - rm .config.old make clean fi done @@ -163,7 +162,6 @@ prune_symlink $P/usr/src for i in Documentation arch/arm/boot/dts \ arch/arm64/boot/dts{/arm,/broadcom,} \ - arch/csky/boot/dts/include \ include/dt-bindings/input scripts/dtc/include-prefixes \ tools/testing/selftests/powerpc/{copyloops,primitives{/asm,}} \ tools/testing/selftests/powerpc/{stringloops,vphn} ; do --- plamo/09_kernel/old/kernelsrc-20210713/PlamoBuild.kernelsrc-5.2.21_plamo@LV@ 2021-07-13 12:54:23.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-5.3.18_plamo@LV@ 2021-07-21 13:31:22.000000000 +0900 @@ -1,26 +1,26 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190713-5.2.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.3.18.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190921-5.3.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.2-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.2.21-20191029-94dbfa7.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.2.21-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.3.18-20191201-32ba05a.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.3.18-plamo@LV@" verify= digest= -branch[4]=aufs5.2.5+ -commitid[4]=40a8029 +branch[4]=aufs5.3.16 +commitid[4]=28e5d4e pkgbase=kernelsrc -vers=5.2.21_plamo@LV@ +vers=5.3.18_plamo@LV@ arch=noarch build=P1 -src=linux-5.2.21 +src=linux-5.3.18 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +50,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190713-5.2.patch + patch -Np1 -i $W/vd_unicon-kernel-20190921-5.3.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,18 +60,17 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.2-panic_beep.patch - patch -Np1 -i $W/5.2-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.2.21-2019-10-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.3-panic_beep.patch + patch -Np1 -i $W/5.3-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.2.21-20191029-94dbfa7.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.3.18-20191201-32ba05a.patch.xz | patch -Np1 -i - rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} - chmod 755 scripts/{knlinfo,mkknlimg} fi - cp -p $W/config-5.2.21-plamo$lv .config + cp -p $W/config-5.3.18-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -126,7 +125,7 @@ else cat <<- "EOF" >> $P/sbin/installkernel [ -f $4/kernel7.img ] && mv $4/kernel7.img $4/kernel7.old - scripts/mkknlimg $2 $4/kernel7.img + cat $2 > $4/kernel7.img EOF fi cat <<- "EOF" >> $P/sbin/installkernel @@ -164,7 +163,7 @@ arch/arm64/boot/dts{/arm,/broadcom,} \ include/dt-bindings/input scripts/dtc/include-prefixes \ tools/testing/selftests/powerpc/{copyloops,primitives{/asm,}} \ - tools/testing/selftests/powerpc/{stringloops,vphn} ; do + tools/testing/selftests/powerpc/{stringloops,vphn{/asm,}} ; do TZ=UTC touch -t `date -u '+%m%d0000'` $P/usr/src/$src/$i done tar cvpf $pkg.tar -C $P `cd $P ; find usr/src -maxdepth 1 | tail -n+2` --- plamo/09_kernel/old/kernelsrc-20210721/PlamoBuild.kernelsrc-5.3.18_plamo@LV@ 2021-07-21 13:31:22.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-5.4.51_plamo@LV@ 2021-07-24 12:02:08.000000000 +0900 @@ -1,26 +1,28 @@ #!/bin/sh -x ###################################################################### -url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.3.18.tar.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20190921-5.3.patch +url="https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.51.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-20191130-5.4.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-device_set_font_noarg.patch ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/UNICON/vd_unicon-kernel-fonts-20140614.patch.bz2 https://github.com/sfjro/aufs5-standalone.git - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-panic_beep.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.3-morse_code_panics.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.4-panic_beep.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/mcp/5.4-morse_code_panics.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/toi/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/ovlfs/overlayfs-allow_unprivileged_mounts.patch - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.3.18-20191201-32ba05a.patch.xz - ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.3.18-plamo@LV@" + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/misc/5.4-mt7615-define-to_rssi-macro.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/rpi-5.4.51-20200715-7d9a391.patch.xz + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/rpi/5.4-CLK_BCM2835-RESET_CONTROLLER.patch + ftp://plamo.linet.gr.jp/pub/Plamo-test/kernelsrc_patches/config-5.4.51-plamo@LV@" verify= digest= -branch[4]=aufs5.3.16 -commitid[4]=28e5d4e +branch[4]=aufs5.4.3 +commitid[4]=1d622ad pkgbase=kernelsrc -vers=5.3.18_plamo@LV@ +vers=5.4.51_plamo@LV@ arch=noarch build=P1 -src=linux-5.3.18 +src=linux-5.4.51 patchfiles="" OPT_CONFIG="" DOCS="" @@ -50,7 +52,7 @@ done apply_patches cd $B - patch -Np1 -i $W/vd_unicon-kernel-20190921-5.3.patch + patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch @@ -60,17 +62,19 @@ cp -av $W/aufs5-standalone/Documentation . cp -av $W/aufs5-standalone/fs . cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.3-panic_beep.patch - patch -Np1 -i $W/5.3-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.3.18-2019-12-20.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/5.4-panic_beep.patch + patch -Np1 -i $W/5.4-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - chmod 755 scripts/tuxonice_output_to_csv.sh patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.3.18-20191201-32ba05a.patch.xz | patch -Np1 -i - + unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - + patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch rm -rf .github chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} fi - cp -p $W/config-5.3.18-plamo$lv .config + cp -p $W/config-5.4.51-plamo$lv .config for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then --- plamo/09_kernel/old/kernelsrc-20210724/PlamoBuild.kernelsrc-5.4.51_plamo@LV@ 2021-07-24 12:02:08.000000000 +0900 +++ plamo/09_kernel/kernelsrc/PlamoBuild.kernelsrc-5.4.51_plamo@LV@ 2021-09-22 20:00:16.000000000 +0900 @@ -21,7 +21,7 @@ pkgbase=kernelsrc vers=5.4.51_plamo@LV@ arch=noarch -build=P1 +build=P2 src=linux-5.4.51 patchfiles="" OPT_CONFIG="" @@ -42,6 +42,9 @@ fscheck case `uname -m` in i686) lv=SMP ;; x86_64) lv=64 ;; armv7l) lv=RPi2 ;; esac url=${url/@LV@/$lv} ; vers=${vers/@LV@/$lv} +if [ `uname -m` == armv7l ] ; then + src[0]=linux-5.4.51 ; src[1]=${src[0]} +fi prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources @@ -51,30 +54,36 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches - cd $B - patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch - patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch - bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - - patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch - patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch - cp -av $W/aufs5-standalone/Documentation . - cp -av $W/aufs5-standalone/fs . - cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux - patch -Np1 -i $W/5.4-panic_beep.patch - patch -Np1 -i $W/5.4-morse_code_panics.patch - bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - - chmod 755 scripts/tuxonice_output_to_csv.sh - patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch - patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch - if [ `uname -m` == armv7l ] ; then - unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - - patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch - rm -rf .github - chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} - fi - cp -p $W/config-5.4.51-plamo$lv .config + for i in `seq 0 $((${#B[@]} - 1))` ; do + cd ${B[$i]} + patch -Np1 -i $W/vd_unicon-kernel-20191130-5.4.patch + patch -Np1 -i $W/vd_unicon-kernel-device_set_font_noarg.patch + bunzip2 -c $W/vd_unicon-kernel-fonts-20140614.patch.bz2 | patch -Np1 -i - + patch -Np1 -i $W/aufs5-standalone/aufs5-kbuild.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-base.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-mmap.patch + patch -Np1 -i $W/aufs5-standalone/aufs5-standalone.patch + cp -av $W/aufs5-standalone/Documentation . + cp -av $W/aufs5-standalone/fs . + cp -pv $W/aufs5-standalone/include/uapi/linux/aufs_type.h include/uapi/linux + patch -Np1 -i $W/5.4-panic_beep.patch + patch -Np1 -i $W/5.4-morse_code_panics.patch + bunzip2 -c $W/tuxonice-for-linux-5.4.39-2020-05-09.patch.bz2 | patch -Np1 -i - + chmod 755 scripts/tuxonice_output_to_csv.sh + patch -Np1 -i $W/overlayfs-allow_unprivileged_mounts.patch + patch -Np1 -i $W/5.4-mt7615-define-to_rssi-macro.patch + if [ `uname -m` == armv7l ] ; then + unxz -c $W/rpi-5.4.51-20200715-7d9a391.patch.xz | patch -Np1 -i - + patch -Np1 -i $W/5.4-CLK_BCM2835-RESET_CONTROLLER.patch + rm -rf .github + chmod 755 drivers/net/wireless/realtek/rtl8192cu/{clean,runwpa,wlan0dhcp} + fi + cp -p $W/config-5.4.51-plamo$lv .config + if [ $i -eq 1 ] ; then + scripts/config --set-str LOCALVERSION "-plamoLPAE" -e ARM_LPAE \ + -e VMSPLIT_3G -d VMSPLIT_2G -e HIGHMEM -e PCIE_BRCMSTB --refresh + fi + done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -104,8 +113,12 @@ make install DESTDIR=$P fi done + cd $B install -d $P/usr/src cp -dR . $P/usr/src/$src + if [ `uname -m` == armv7l ] ; then + install -m 644 ${B[1]}/.config $P/usr/src/$src/.configl + fi find $P/usr/src/$src \( -name ".clang-format" -o -name ".cocciconfig" \ -o -name ".get_maintainer.ignore" -o -name ".gitattributes" \ -o -name ".gitignore" -o -name ".mailmap" \ @@ -113,37 +126,32 @@ ln -s $src $P/usr/src/linux install -d $P/sbin if [ `uname -m` == i686 -o `uname -m` == x86_64 ] ; then - sed '/^verify/,$d' $B/arch/x86/boot/install.sh > $P/sbin/installkernel + sed '/^verify/,$d' arch/x86/boot/install.sh > $P/sbin/installkernel else - sed '/^verify/,$d' $B/arch/arm/boot/install.sh > $P/sbin/installkernel + sed '/^verify/,$d' arch/arm/boot/install.sh > $P/sbin/installkernel fi - cat <<- "EOF" >> $P/sbin/installkernel - [ -f $4/config ] && mv $4/config $4/config.old - cp .config $4/config - EOF if [ `uname -m` == i686 -o `uname -m` == x86_64 ] ; then cat <<- "EOF" >> $P/sbin/installkernel + [ -f $4/config ] && mv $4/config $4/config.old + cp .config $4/config [ -f $4/vmlinuz ] && mv $4/vmlinuz $4/vmlinuz.old cat $2 > $4/vmlinuz - EOF - else - cat <<- "EOF" >> $P/sbin/installkernel - [ -f $4/kernel7.img ] && mv $4/kernel7.img $4/kernel7.old - cat $2 > $4/kernel7.img - EOF - fi - cat <<- "EOF" >> $P/sbin/installkernel [ -f $4/System.map ] && mv $4/System.map $4/System.old cp $3 $4/System.map - EOF - if [ `uname -m` == i686 -o `uname -m` == x86_64 ] ; then - cat <<- "EOF" >> $P/sbin/installkernel if [ -x /sbin/lilo -a -f /etc/lilo.conf ] ; then /sbin/lilo EOF else cat <<- "EOF" >> $P/sbin/installkernel + l=`[[ $1 =~ LPAE ]] && echo l` + [ -f $4/config$l ] && mv $4/config$l $4/config$l.old + cp .config $4/config$l + [ -f $4/kernel7$l.img ] && mv $4/kernel7$l.img $4/kernel7$l.old + cat $2 > $4/kernel7$l.img + [ -f $4/System$l.map ] && mv $4/System$l.map $4/System$l.old + cp $3 $4/System$l.map + if [ -x /sbin/loadmap ] ; then /sbin/loadmap EOF --- plamo/99_test/old/installer-20161222/PlamoBuild.installer-6.1 2016-12-22 15:24:20.000000000 +0900 +++ plamo/99_test/installer/PlamoBuild.installer-6.1 2016-12-24 18:46:23.000000000 +0900 @@ -26,10 +26,10 @@ http://mirror.opencompute.org/onie/dosfstools-3.0.26.tar.xz https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2016.2.22.tgz https://github.com/PhantomX/slackbuilds/raw/master/ntfs-3g/patches/ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/05_ext/ntfs_3g_ntfsprogs/ntfs-3g_ntfsprogs-2016.2.22-libtool.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/ntfs-3g_ntfsprogs-2016.2.22-libtool.patch http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-3.2.3.tar.bz2 ftp://sources.redhat.com/pub/lvm2/releases/LVM2.2.02.90.tgz - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/lvm2/LVM2.2.02.90-static.patch + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/LVM2.2.02.90-static.patch ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/installer-plamoinitrd.targz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/plamo_isolinux.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/rpi_firmware.tar.gz" --- plamo/99_test/old/installer-20161224/PlamoBuild.installer-6.1 2016-12-24 18:46:23.000000000 +0900 +++ plamo/99_test/installer/PlamoBuild.installer-6.2 2017-02-20 15:15:16.000000000 +0900 @@ -34,7 +34,7 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/plamo_isolinux.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/rpi_firmware.tar.gz" pkgbase=installer -vers=6.1 +vers=6.2 arch=`uname -m` build=P1 src[0]=busybox-1.25.1 @@ -115,7 +115,7 @@ OPT_CONFIG[17]="--enable-static_link --enable-applib --enable-cmdlib --enable-pkgconfig --enable-dmeventd --with-thin=internal" DOCS="" -template=20161020 +template=20170204 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -334,7 +334,7 @@ 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 - ;; + bz2) bunzip2 -c $W/$j | patch -Np1 -i - ;; xz) unxz -c $W/$j | patch -Np1 -i - ;; *) patch -Np1 -i $W/$j ;; esac @@ -644,8 +644,7 @@ mkisofs -v -f -J -r -b isolinux/isolinux.bin -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot \ -eltorito-platform efi -eltorito-boot isolinux/efiboot.img \ - -m old -m 02_x11 -m 03_xclassics -m 04_xapps -m 05_ext -m 06_xfce \ - -m 07_kde -m 08_tex -m 10_lof -m 11_mate -m contrib \ + -m old -m texlive_texmf[34]-*.txz \ -V plamo-$vers-$a -o plamo-${vers}_${a}_`date '+%y%m%d'`_dvd.iso $media else umount $media --- plamo/99_test/old/gcc_all-20160111/PlamoBuild.gcc_all-4.8.4 2016-01-11 18:25:36.000000000 +0900 +++ plamo/99_test/gcc_all/PlamoBuild.gcc_all-4.8.5 2016-01-27 16:51:19.000000000 +0900 @@ -1,20 +1,20 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2 +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 https://patchwork.ozlabs.org/patch/342434/mbox" pkgbase=gcc_all -vers=4.8.4 +vers=4.8.5 arch=`uname -m` -build=P3 +build=P2 src=gcc-$vers OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object --enable-linker-build-id --enable-plugin --with-system-zlib --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" -DOCS="COPYING.LIB MAINTAINERS ABOUT-NLS README COPYING3.LIB COPYING - COPYING.RUNTIME NEWS COPYING3 ChangeLog" +DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa + COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" ###################################################################### fscheck() { --- plamo/99_test/old/installer-20170220/PlamoBuild.installer-6.2 2017-02-20 15:15:16.000000000 +0900 +++ plamo/99_test/installer/PlamoBuild.installer-6.2 2017-03-04 11:43:30.000000000 +0900 @@ -570,9 +570,9 @@ touch -t `date '+%m%d0900'` $K/efiboot.img else img=plamo-${vers}_${a}_`date '+%y%m%d'`_sd.img - fallocate -l 640M $img + fallocate -l 768M $img cat <<- "EOF" | sfdisk $img - 8192,1302528,c,* + 8192,1564672,c,* EOF loop=`losetup -f` losetup -P $loop $img --- plamo/99_test/old/installer-20170304/PlamoBuild.installer-6.2 2017-03-04 11:43:30.000000000 +0900 +++ plamo/99_test/installer/PlamoBuild.installer-6.2 2017-08-17 11:26:18.000000000 +0900 @@ -18,6 +18,8 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15-plamo-compat.patch.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/kbd/kbd-1.15.5-revert_loadkeys_analize.patch.gz https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-175.tar.xz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/udev/udev-175-input-event-codes.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/udev/udev-175-mtd_probe_stdint.patch.gz http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/ncurses/ncurses-6.0-Charable.patch.gz http://www.kernel.org/pub/linux/utils/util-linux/v2.28/util-linux-2.28.tar.xz @@ -33,6 +35,10 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/installer-plamoinitrd.targz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/plamo_isolinux.tar.gz ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/99_test/installer/rpi_firmware.tar.gz" +verify= +digest= +branch= +commitid= pkgbase=installer vers=6.2 arch=`uname -m` @@ -55,27 +61,15 @@ src[15]=ntfs-3g_ntfsprogs-2016.2.22 src[16]=mdadm-3.2.3 src[17]=LVM2.2.02.90 -patchfiles[0]="" -patchfiles[1]="" -patchfiles[2]="" -patchfiles[3]="" -patchfiles[4]="" -patchfiles[5]="" patchfiles[6]="`echo tar-1.2{3-{tartime,txz},6-no-gets}.patch.gz`" -patchfiles[7]="" patchfiles[8]="`echo kbd-1.15-{backspace-1,plamo-compat}.patch.gz` kbd-1.15.5-revert_loadkeys_analize.patch.gz" -patchfiles[9]="" +patchfiles[9]="udev-175-input-event-codes.patch.gz + udev-175-mtd_probe_stdint.patch.gz" patchfiles[10]="ncurses-6.0-Charable.patch.gz" -patchfiles[11]="" -patchfiles[12]="" -patchfiles[13]="" -patchfiles[14]="" patchfiles[15]="ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch ntfs-3g_ntfsprogs-2016.2.22-libtool.patch" -patchfiles[16]="" patchfiles[17]="LVM2.2.02.90-static.patch" -OPT_CONFIG[0]="" OPT_CONFIG[1]="--enable-nls --with-ncursesw --enable-widec" OPT_CONFIG[2]="--enable-no-install-program=chroot,hostid,nice,who,users" OPT_CONFIG[2]+=",pinky,uptime,stty,df,stdbuf,[,base64,base32,basename,cat" @@ -88,12 +82,6 @@ OPT_CONFIG[2]+=",sha512sum,shred,shuf,sleep,sort,split,stat,sum,sync,tac" OPT_CONFIG[2]+=",tail,tee,test,timeout,touch,tr,true,truncate,tsort,tty" OPT_CONFIG[2]+=",uname,unexpand,uniq,unlink,vdir,wc,whoami,yes --without-gmp" -OPT_CONFIG[3]="" -OPT_CONFIG[4]="" -OPT_CONFIG[5]="" -OPT_CONFIG[6]="" -OPT_CONFIG[7]="" -OPT_CONFIG[8]="" OPT_CONFIG[9]="--libexecdir=/lib/udev --enable-static --disable-introspection --enable-rule_generator" OPT_CONFIG[10]="--without-debug --enable-widec --with-manpage-format=normal @@ -109,237 +97,36 @@ OPT_CONFIG[12]="--enable-symlink-install --disable-libuuid --disable-libblkid --disable-fsck --disable-e2initrd-helper --disable-uuidd" OPT_CONFIG[13]="--bindir=/sbin" -OPT_CONFIG[14]="" OPT_CONFIG[15]="--enable-really-static" -OPT_CONFIG[16]="" OPT_CONFIG[17]="--enable-static_link --enable-applib --enable-cmdlib --enable-pkgconfig --enable-dmeventd --with-thin=internal" DOCS="" -template=20170204 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in * ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions +else + source /usr/share/plamo/functions +fi fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot +prepare "$@" infodir=$P/share/info mandir=$P/share/man -docdir=$P/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 -else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done -fi +docdir=. if [ $opt_download -eq 1 ] ; then - for i in $url ; do - 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|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 + apply_patches cd ${B[0]} cp -p $W/busybox-1.25.1-config .config cd ${B[2]} @@ -424,12 +211,6 @@ sed -i 's@$(ELDFLAGS) @@' daemons/dmeventd/Makefile.in for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f [Mm]akefile ] ; then - make clean - fi - if [ -f config.log ] ; then - rm -rf config.cache config.log - fi if [ -x configure ] ; then ./configure --prefix= --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ @@ -458,12 +239,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -570,9 +346,9 @@ touch -t `date '+%m%d0900'` $K/efiboot.img else img=plamo-${vers}_${a}_`date '+%y%m%d'`_sd.img - fallocate -l 768M $img - cat <<- "EOF" | sfdisk $img - 8192,1564672,c,* + size=896 ; fallocate -l ${size}M $img + cat <<- EOF | sfdisk $img + 8192,$(((size - 4) * 2048)),c,* EOF loop=`losetup -f` losetup -P $loop $img @@ -608,38 +384,9 @@ cp -R --preserve=timestamps /mnt/work/Plamo-6.x/$a/$i $media fi done - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $media - touch -t `date '+%m%d0900'` $media/$myname - tmpl=${myname%%.*}-template-$template - if [ -f ../admin/$tmpl ] ; then - cp -p ../admin/$tmpl $media - else - ( cd $media - curl -Rs -o $tmpl $tmplurl/${tmpl/${myname%%.*}/PlamoBuild} ) - fi - spec=${myname%%.*}-spec - ( cd $media ; diff -u $tmpl $myname > $spec ) - touch -t `date '+%m%d0900'` $media/$spec - gzip $media/{$myname,$spec} - rm $media/$tmpl - mv $media/{$myname,$spec}.gz $C - mv $C/{$myname,$spec}.gz $media - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - ln $docdir/$src/$spec.gz $docdir/${src[$i]} - fi - touch -t `date '+%m%d0900'` $media - done - false && convert + src=$media ; setup_docdir + touch -t `date '+%m%d0900'` $media + false && convert_links if [ $media == DVD ] ; then mkisofs -v -f -J -r -b isolinux/isolinux.bin -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot \ @@ -650,6 +397,5 @@ umount $media losetup -d $loop fi - read -p "Do you want to keep work files? [y/N] " ans - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/99_test/old/gcc_all-20160127/PlamoBuild.gcc_all-4.8.5 2016-01-27 16:51:19.000000000 +0900 +++ plamo/99_test/gcc_all/PlamoBuild.gcc_all-4.8.5 2017-04-08 19:28:19.000000000 +0900 @@ -2,12 +2,15 @@ ###################################################################### url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - https://patchwork.ozlabs.org/patch/342434/mbox" + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +verify= +commitid= pkgbase=gcc_all vers=4.8.5 arch=`uname -m` -build=P2 +build=P3 src=gcc-$vers +patchfiles="gcc-4.8-filename-output.patch" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -15,214 +18,34 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" +template=20170323 +tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### -fscheck() { - PANGRAM="The quick brown fox jumps over the lazy dog." - echo -n "Checking for the filesystem ... " - mkdir pangram ; ( cd pangram ; touch $PANGRAM ) - mv pangram pangram~ ; mkdir pangram ; touch -r pangram~ pangram - tar cpf pangram.tar pangram ; rmdir pangram ; mv pangram~ pangram - for i in $PANGRAM ; do tar rpf pangram.tar pangram/$i ; done - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram1.tgz - tar cpf pangram.tar pangram - touch -t `date '+%m%d0900'` pangram.tar ; gzip pangram.tar - touch pangram.tar.gz ; mv pangram.tar.gz pangram2.tgz - if cmp -s pangram1.tgz pangram2.tgz ; then - echo "OK" - rm -rf pangram pangram1.tgz pangram2.tgz - else - echo "NG" - cat <<- "EOF" - Hmm, packaging may not be done properly on this filesystem. - Would you please try again on a default filesystem, thanks! - - Happy packaging!! - - Quitting... - EOF - exit - fi -} - -install2() { - install -d ${2%/*} ; install -m 644 $1 $2 -} - -strip_bindir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s extglob nullglob - cd $1 - for i in `echo !(*.so|*.so.*|*.a|*.o)` ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`file $i | grep "not stripped"`" ] ; then - echo "stripping -p $i" - strip -p $i - fi - done - ) fi -} - -strip_libdir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - shopt -s nullglob - cd $1 - for i in *.so *.so.* *.a ; do - echo "$i" - if [ -h $i ] ; then continue ; fi - if [ -n "`nm -a $i | grep " a "`" ] ; then - if [ $i != ${i%.a} ] ; then - echo -n "ranlib and " - touch -r $i $i.mt ; ranlib $i ; touch -r $i.mt $i ; rm $i.mt - fi - echo "stripping -gp $i" - strip -gp $i - fi - done - ) fi -} - -gzip_dir() { - echo "compressing in $1" - if [ -d $1 ] ; then ( - cd $1 - files=`ls -f --indicator-style=none | sed '/^\.\{1,2\}$/d'` - for i in $files ; do - echo "$i" - if [ ! -f $i -a ! -h $i -o $i != ${i%.gz} ] ; then continue ; fi - lnks=`ls -l $i | awk '{print $2}'` - if [ $lnks -gt 1 ] ; then - inum=`ls -i $i | awk '{print $1}'` - for j in `find . -maxdepth 1 -inum $inum` ; do - if [ ${j#./} == $i ] ; then - gzip -f $i - else - rm -f ${j#./} ; ln $i.gz ${j#./}.gz - fi - done - elif [ -h $i ] ; then - target=`readlink $i` ; rm -f $i ; ln -s $target.gz $i.gz - else - gzip $i - fi - done - for i in $files ; do mv ${i%.gz}.gz $C ; done - for i in $files ; do mv $C/${i%.gz}.gz . ; done - ) fi -} - -gzip_one() { - gzip $1 ; mv $1.gz $C ; mv $C/${1##*/}.gz ${1%/*} -} - -compress() { - for i in {$P,$P/usr}/{sbin,bin} ; do strip_bindir $i ; done - for i in {$P,$P/usr}/$libdir ; do strip_libdir $i ; done - if [ -f $infodir/dir ] ; then rm -f $infodir/dir ; fi - gzip_dir $infodir - for i in `seq 9` n ; do gzip_dir $mandir/man$i ; done -} - -prune_symlink() { - echo "pruning symlink in $1" - if [ -d $1 ] ; then ( - cd $P - rm -f /tmp/iNsT-a.$$ ; touch /tmp/iNsT-a.$$ - for i in `find ${1#$P/} -type l` ; do - target=`readlink $i` - echo "$i -> $target" - echo $i$'\n'$target >> /tmp/iNsT-a.$$ - done - COUNT=1 - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - while [ -n "$LINE" ] ; do - LINKGOESIN=`dirname $LINE` - LINKNAMEIS=`basename $LINE` - COUNT=$(($COUNT + 1)) - LINKPOINTSTO=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - if [ ! -d install ] ; then mkdir install ; fi - cat <<- EOF >> install/doinst.sh - ( cd $LINKGOESIN ; rm -rf $LINKNAMEIS ) - ( cd $LINKGOESIN ; ln -sf $LINKPOINTSTO $LINKNAMEIS ) - EOF - rm -rf $LINE ; touch -t `date '+%m%d0900'` install/doinst.sh $LINE - COUNT=$(($COUNT + 1)) - LINE=`sed -n "${COUNT}p" /tmp/iNsT-a.$$` - done - rm -f /tmp/iNsT-a.$$ - ) fi -} - -convert() { - for i in {$P,$P/usr}/{sbin,bin} ; do prune_symlink $i ; done - for i in {$P,$P/usr}/$libdir ; do prune_symlink $i ; done - prune_symlink $infodir - for i in `seq 9` n ; do prune_symlink $mandir/man$i ; done -} - -fscheck -W=`pwd` -for i in `seq 0 $((${#src[@]} - 1))` ; do - S[$i]=$W/${src[$i]} ; B[$i]=$W/build`test ${#src[@]} -eq 1 || echo $i` -done -P=$W/work ; C=$W/pivot -infodir=$P/usr/share/info -mandir=$P/usr/share/man -docdir=$P/usr/share/doc -myname=`basename $0` -pkg=$pkgbase-$vers-$arch-$build -case $arch in x86_64) libdir=lib64 ;; *) libdir=lib ;; esac -if [ $# -eq 0 ] ; then - opt_download=1 ; opt_config=1 ; opt_build=1 ; opt_package=1 +if [ -f functions ] ; then + source ./functions +elif [ ! -f /usr/share/plamo/functions ] ; then + wget ftp://plamo.linet.gr.jp/pub/Plamo-src/admin/functions + source ./functions else - opt_download=0 ; opt_config=0 ; opt_build=0 ; opt_package=0 - for i in $@ ; do - case $i in - download) opt_download=1 ;; - config) opt_config=1 ;; - build) opt_build=1 ;; - package) opt_package=1 ;; - esac - done + source /usr/share/plamo/functions fi + +fscheck +prepare "$@" if [ $opt_download -eq 1 ] ; then - alt=gcc-4.8-filename-output.patch - for i in $url ; do - if [ ${i##*/} == mbox ] ; then - [ ! -f $alt ] && wget $i -O $alt - elif [ ! -f ${i##*/} ] ; then - wget $i - fi - done - for i in $url ; do - case ${i##*.} in - tar) tar xvpf ${i##*/} ;; - gz) tar xvpzf ${i##*/} ;; - bz2) tar xvpjf ${i##*/} ;; - esac - done + download_sources fi if [ $opt_config -eq 1 ] ; then 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 - cd $B - patch -Np0 -i $W/gcc-4.8-filename-output.patch + apply_patches for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -f Makefile ] ; then - make clean - fi - if [ -f config.log ] ; then - 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]} \ --libexecdir=/usr/$libdir \ --build=$arch-pc-linux-gnu`[ $arch == armv7l ] && echo eabi` \ @@ -239,12 +62,7 @@ done fi if [ $opt_package -eq 1 ] ; then - if [ `id -u` -ne 0 ] ; then - read -p "Do you want to package as root? [y/N] " ans - if [ "x$ans" == "xY" -o "x$ans" == "xy" ] ; then - cd $W ; /bin/su -c "$0 package" ; exit - fi - fi + root_priv if [ -d $P ] ; then rm -rf $P ; fi ; mkdir -p $P if [ -d $C ] ; then rm -rf $C ; fi ; mkdir -p $C touch $W/i.st ; sleep 1 @@ -270,27 +88,15 @@ -exec touch -t `date '+%m%d0900'` {} \; compress strip_bindir $gcclibdir/install-tools - strip_bindir $gcclibdir + for i in cc1 cc1plus f951 go1 lto1 collect2 lto-wrapper ; do + echo "$i" + echo "stripping $i with -p" + strip -p $gcclibdir/$i + done strip_bindir $gcclibdir/plugin strip_libdir $gcclibdir - for i in `seq 0 $((${#DOCS[@]} - 1))` ; do - for j in ${DOCS[$i]} ; do - for k in ${S[$i]}/$j ; do - install2 $k $docdir/${src[$i]}/${k#${S[$i]}/} - touch -r $k $docdir/${src[$i]}/${k#${S[$i]}/} - gzip_one $docdir/${src[$i]}/${k#${S[$i]}/} - done - done - if [ $i -eq 0 ] ; then - install $myname $docdir/$src - touch -t `date '+%m%d0900'` $docdir/$src/$myname - gzip_one $docdir/$src/$myname - else - ln $docdir/$src/$myname.gz $docdir/${src[$i]} - fi - ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) - done - convert + setup_docdir + convert_links touch -t `date '+%m%d0900'` $gcclibdir{/install-tools,,/plugin} install -d $P/usr/share/gdb/auto-load/usr/$libdir mv $P/usr/$libdir/libstdc++.so.*-gdb.py \ @@ -301,7 +107,7 @@ tar rvpf $pkg.tar -C $P \ `cd $P ; find usr/share/gdb/auto-load/usr/$libdir | tail -n+2` tar rvpf $pkg.tar -C $P usr/include/c++ - 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/locale -name *.mo` tar rvpf $pkg.tar -C $P usr/share/gcc-$vers 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` @@ -310,6 +116,5 @@ 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 - if [ "x$ans" != "xY" -a "x$ans" != "xy" ] ; then rm -rf $P $C i.[se]t ; fi + cleanup fi --- plamo/99_test/old/installer-20170817/PlamoBuild.installer-6.2 2017-08-17 11:26:18.000000000 +0900 +++ plamo/99_test/installer/PlamoBuild.installer-6.2 2017-08-25 10:33:25.000000000 +0900 @@ -366,15 +366,8 @@ ln -f $K/config{-*,} ln -f $K/vmlinuz{-*,} ln -f $K/System.map{-*,} - else - cp -p $K/{Image-*,kernel7.img} fi ( cd $P ; find . | tail -n+2 | cpio -o -H newc | gzip -n ) > $K/initrd.gz - if [ $media == SD ] ; then - size=`printf %#x $(stat -c%s $K/initrd.gz)` - sed -i "s/$/$size/" $K/cmdline.txt - touch -t `date '+%m%d0900'` $K/cmdline.txt - fi touch -t `date '+%m%d0900'` $K{,/initrd.gz} for i in plamo contrib Change.Log{,-2011} \ README.{1ST,EUC,SJIS,GPT} README_GPT.pdf allpkgs.pickle ; do --- plamo/99_test/old/installer-20170825/PlamoBuild.installer-6.2 2017-08-25 10:33:25.000000000 +0900 +++ plamo/99_test/installer/PlamoBuild.installer-6.2 2019-06-16 15:59:07.000000000 +0900 @@ -24,7 +24,7 @@ ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/00_base/ncurses/ncurses-6.0-Charable.patch.gz http://www.kernel.org/pub/linux/utils/util-linux/v2.28/util-linux-2.28.tar.xz http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-1.43.3.tar.gz - https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.8.3.tar.gz + https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.12.1.tar.gz http://mirror.opencompute.org/onie/dosfstools-3.0.26.tar.xz https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2016.2.22.tgz https://github.com/PhantomX/slackbuilds/raw/master/ntfs-3g/patches/ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch @@ -56,7 +56,7 @@ src[10]=ncurses-6.0 src[11]=util-linux-2.28 src[12]=e2fsprogs-1.43.3 -src[13]=btrfs-progs-v4.8.3 +src[13]=btrfs-progs-v4.12.1 src[14]=dosfstools-3.0.26 src[15]=ntfs-3g_ntfsprogs-2016.2.22 src[16]=mdadm-3.2.3 @@ -101,7 +101,7 @@ OPT_CONFIG[17]="--enable-static_link --enable-applib --enable-cmdlib --enable-pkgconfig --enable-dmeventd --with-thin=internal" DOCS="" -template=20170713 +template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -267,14 +267,15 @@ touch $mandir/man[58]/* touch $W/i.et cd $W - find $P -newer i.st ! -newer i.et -exec touch -ht `date '+%m%d0900'` {} \; + TZ=UTC find $P -newer i.st ! -newer i.et \ + -exec touch -ht `date -u '+%m%d0000'` {} \; compress - find $mandir -type l -exec touch -ht `date '+%m%d0900'` {} \; + TZ=UTC find $mandir -type l -exec touch -ht `date -u '+%m%d0000'` {} \; strip_bindir $P/libexec strip_bindir $P/lib/udev strip_libdir $P/$libdir/device-mapper gzip_dir $mandir/de/man8 - touch -t `date '+%m%d0900'` $P/{bin,sbin,libexec,lib/udev} \ + TZ=UTC touch -t `date -u '+%m%d0000'` $P/{bin,sbin,libexec,lib/udev} \ $P/$libdir/device-mapper $infodir $mandir/{man[134578],de/man8} tar xvpzf installer-plamoinitrd.targz -C $P case $arch in i686) a=x86 ;; armv7l) a=arm ;; *) a=$arch ;; esac @@ -328,7 +329,7 @@ initrd (hd1)/isolinux/initrd.gz } EOF - find $media/EFI -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find $media/EFI -exec touch -t `date -u '+%m%d0000'` {} \; mkdir efiboot fallocate -l 1440K $K/efiboot.img /sbin/mkfs -t vfat $K/efiboot.img @@ -341,12 +342,12 @@ initrd (cd0)/isolinux/initrd.gz } EOF - find efiboot/EFI -exec touch -t `date '+%m%d0900'` {} \; + TZ=UTC find efiboot/EFI -exec touch -t `date -u '+%m%d0000'` {} \; umount efiboot - touch -t `date '+%m%d0900'` $K/efiboot.img + TZ=UTC touch -t `date -u '+%m%d0000'` $K/efiboot.img else img=plamo-${vers}_${a}_`date '+%y%m%d'`_sd.img - size=896 ; fallocate -l ${size}M $img + size=1920 ; fallocate -l ${size}M $img cat <<- EOF | sfdisk $img 8192,$(((size - 4) * 2048)),c,* EOF @@ -360,7 +361,7 @@ tar xvpJf kernel-*.txz -C $P ln -sfn /mnt/boot $P/boot touch -hr $P/{cdrom,boot} - touch -t `date '+%m%d0900'` $P/lib{,/modules} + TZ=UTC touch -t `date -u '+%m%d0000'` $P/lib{,/modules} rm -rf $P/{usr,install} if [ $media == DVD ] ; then ln -f $K/config{-*,} @@ -368,23 +369,25 @@ ln -f $K/System.map{-*,} fi ( cd $P ; find . | tail -n+2 | cpio -o -H newc | gzip -n ) > $K/initrd.gz - touch -t `date '+%m%d0900'` $K{,/initrd.gz} + TZ=UTC touch -t `date -u '+%m%d0000'` $K{,/initrd.gz} for i in plamo contrib Change.Log{,-2011} \ README.{1ST,EUC,SJIS,GPT} README_GPT.pdf allpkgs.pickle ; do if [ $media == DVD ] ; then ln -s /mnt/work/Plamo-6.x/$a/$i $media else - cp -R --preserve=timestamps /mnt/work/Plamo-6.x/$a/$i $media + ( cd /mnt/work/Plamo-6.x/$a + tar cpf - --exclude texlive_texmf_doc*.txz $i ) \ + | ( cd $media ; tar xpof - ) fi done src=$media ; setup_docdir - touch -t `date '+%m%d0900'` $media + TZ=UTC touch -t `date -u '+%m%d0000'` $media false && convert_links if [ $media == DVD ] ; then mkisofs -v -f -J -r -b isolinux/isolinux.bin -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot \ -eltorito-platform efi -eltorito-boot isolinux/efiboot.img \ - -m old -m texlive_texmf[34]-*.txz \ + -m old -m texlive_texmf_doc*.txz \ -V plamo-$vers-$a -o plamo-${vers}_${a}_`date '+%y%m%d'`_dvd.iso $media else umount $media --- plamo/99_test/old/gcc_all-20170408/PlamoBuild.gcc_all-4.8.5 2017-04-08 19:28:19.000000000 +0900 +++ plamo/99_test/gcc_all/PlamoBuild.gcc_all-4.8.5 2017-10-15 19:55:48.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 - ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/devel.txz/gcc/gcc-4.8-filename-output.patch" +url="http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2" verify= +digest= +branch= commitid= pkgbase=gcc_all vers=4.8.5 arch=`uname -m` -build=P3 +build=P4 src=gcc-$vers -patchfiles="gcc-4.8-filename-output.patch" +patchfiles="" OPT_CONFIG="--disable-werror --disable-multilib --enable-install-libiberty --enable-__cxa_atexit --enable-threads=posix --enable-shared --enable-languages=c,c++,fortran,go --enable-gnu-unique-object @@ -18,7 +19,7 @@ --with-linker-hash-style=gnu --enable-clocale=gnu --disable-libstdcxx-pch" DOCS="COPYING ChangeLog ABOUT-NLS NEWS COPYING3.LIB ChangeLog.tree-ssa COPYING3 COPYING.RUNTIME README COPYING.LIB MAINTAINERS" -template=20170323 +template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### --- plamo/99_test/old/installer-20190616/PlamoBuild.installer-6.2 2019-06-16 15:59:07.000000000 +0900 +++ plamo/99_test/installer/PlamoBuild.installer-6.2 2020-04-28 11:00:22.000000000 +0900 @@ -347,7 +347,7 @@ TZ=UTC touch -t `date -u '+%m%d0000'` $K/efiboot.img else img=plamo-${vers}_${a}_`date '+%y%m%d'`_sd.img - size=1920 ; fallocate -l ${size}M $img + size=2048 ; fallocate -l ${size}M $img cat <<- EOF | sfdisk $img 8192,$(((size - 4) * 2048)),c,* EOF