--- admin/PlamoBuild.template.common.without_comment 2016-06-15 20:51:13.000000000 +0900 +++ plamo/00_base/old/kmod-20160606/PlamoBuild.kmod-22 2016-06-06 08:18:11.000000000 +0900 @@ -1,15 +1,14 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-22.tar.xz" +pkgbase=kmod +vers=22 arch=`uname -m` -build=P1 +build=P4 src=$pkgbase-$vers -patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--bindir=/bin" +DOCS="NEWS COPYING TODO README" ###################################################################### fscheck() { @@ -224,17 +223,6 @@ 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 @@ -272,11 +260,38 @@ make install DESTDIR=$P fi done + install -d $P/sbin + for i in {dep,ins,rm}mod mod{probe,info} ; do + ln -s /bin/kmod $P/sbin/$i + done + install -d $P/usr/bin + 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.new + # sample modprobe.conf entries + # + # alias 定義をしておけば modprobe eth0 で必要なモジュールをロード可能 + # alias eth0 skge + # + # モジュールをロードする際のオプションは option 定義で指定可能 + # options sb io=0x220 irq=7 dma=1 dma15=5 mpu_io=0x330 + # options skge debug=16 + # + # install 定義はそのモジュールを組み込む際の動作を指定する。 + # ロードして欲しくないモジュールはこういう風に指定すればいい + # install intel_rng /bin/true + # install rng_core_rng /bin/true + # install ieee1394 /bin/true + # install ohci1394 /bin/true + + 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 @@ -295,9 +310,29 @@ ( 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/share/man/man1 | tail -n+2` + cat <<- "EOF" >> $P/install/doinst.sh + + mv etc/modprobe.d/plamo-default.conf.new /tmp + if [ -f etc/modprobe.d/plamo-default.conf ] ; then + mv /tmp/plamo-default.conf.new etc/modprobe.d/plamo-default.conf.dist + else + 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` 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