#!/bin/sh ###################################################################### url="http://downloads.sourceforge.net/linux-diag/sysfsutils-2.1.0.tar.gz 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=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 ###################################################################### if [ -f functions ] ; 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 prepare "$@" if [ $opt_download -eq 1 ] ; then download_sources fi if [ $opt_config -eq 1 ] ; then for 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 [ -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]} fi done fi if [ $opt_build -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then make fi done fi if [ $opt_package -eq 1 ] ; then root_priv if [ -d $P ] ; then 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 make install DESTDIR=$P fi done touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress 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 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 cleanup fi