--- admin/PlamoBuild-template-20170323 2017-03-23 06:38:12.000000000 +0900 +++ plamo/00_base/kmod/PlamoBuild.kmod-22 2017-04-07 15:47:32.000000000 +0900 @@ -1,17 +1,17 @@ #!/bin/sh ###################################################################### -url="" +url="https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-22.tar.xz" verify= commitid= -pkgbase= -vers= +pkgbase=kmod +vers=22 arch=`uname -m` -build=P1 +build=P5 src=$pkgbase-$vers patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--bindir=/bin" +DOCS="NEWS COPYING TODO README" template=20170323 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -63,16 +63,63 @@ 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} 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` + 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 cleanup