--- admin/PlamoBuild-template-20170415 2017-04-15 12:25:32.000000000 +0900 +++ plamo/00_base/old/sysvinit-20170507/PlamoBuild.sysvinit-2.88dsf 2017-05-07 23:16:02.000000000 +0900 @@ -1,18 +1,20 @@ #!/bin/sh ###################################################################### -url="" +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" verify= digest= commitid= -pkgbase= -vers= +pkgbase=sysvinit +vers=2.88dsf arch=`uname -m` -build=P1 +build=P20 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="`echo doc/{bootlogd.README,Install,Changelog,Propaganda}` + COPYING COPYRIGHT Makefile README" template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -61,19 +63,61 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + make install ROOT=$P fi done + cat <<- "EOF" > $P/sbin/link_rootdev.sh + #!/bin/sh + + root="`cat /proc/cmdline | sed -n 's@.*\=\([^ ]*\).*@\1@p'`" + if grep -q "^PARTUUID=" <<< $root ; then + # root=PARTUUID= + root_part=`blkid | tr -d '"' | grep $root | cut -d: -f1 | sed 's@/dev/@@'` + else + 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 + ln -sf $root_part /dev/root + EOF + chmod 755 $P/sbin/link_rootdev.sh touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + cp -a etc $P + chown -R root.root $P/etc setup_docdir convert_links - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + 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 + 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 + #%% end + 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/include | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find etc -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 `cd $P ; find usr/share/man/man5 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup