build_hdparm() { HERE=`pwd` BUILDDEPS="compiletc.tcz gettext.tcz intltool.tcz" #DEPS= for I in `echo "$BUILDDEPS"`; do su tc -c "tce-load -i "$I"" || su tc -c "tce-load -iw "$I"" done PKGPATH=$1 export LDFLAGS="-L$PKGPATH/lib" export CPPFLAGS="-I$PKGPATH/include" export PATH="$PKGPATH/bin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$PKGPATH/lib:$LD_LIBRARY_PATH" [ -d "$PKGPATH"/include ] || mkdir -p "$PKGPATH"/include [ -d "$PKGPATH"/lib ] || mkdir -p "$PKGPATH"/lib tar xvf hdparm-9.39.tar.gz || exit 1 cd hdparm-9.39 || exit 1 patch -Np1 -i ../wiper.sh.2_6.max-ranges.patch || exit 1 make || exit 1 make binprefix="$PKGPATH" install || exit 1 mv "$PKGPATH"/sbin "$PKGPATH"/bin cp -a wiper/wiper.sh "$PKGPATH"/bin/ mkdir -p "$PKGPATH"/share/doc/wiper/ cp -a wiper/README.txt "$PKGPATH"/share/doc/wiper/ cd "$HERE" touch "$TMPDIR"/hdparm }