--- 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`