#!/bin/bash # # hddtemp.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # hddtemp.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="hddtemp" PACKAGE_EXT="bz2" VERSION=${VERSION:=0.3-beta15} PATCHVER=53 BUILD=${BUILD:=$PATCHVER} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required # First get the patchfile. PATCHFILE="${PACKAGE}_${VERSION}-${PATCHVER}.diff.gz" URL="http://ftp.debian.org/debian/pool/main/h/${PACKAGE}/${PATCHFILE}" get_source $PATCHFILE $URL # Then the main source SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="http://download.savannah.gnu.org/releases/${PACKAGE}/$SRC" get_source $SRC $URL unpack_source $SRC $PACKAGE-$VERSION zcat $CWD/$PATCHFILE | patch -p1 #cat $CWD/hddtemp-0.3_beta15-satacmds.patch | patch -p1 #cat $CWD/hddtemp-0.3_beta15-byteswap.patch | patch -p1 #cat $CWD/hddtemp-0.3_beta15-execinfo.patch | patch -p1 #cat $CWD/hddtemp-0.3_beta15-nls.patch | patch -p1 #cat $CWD/hddtemp-0.3_beta15-iconv.patch | patch -p1 #cat $CWD/hddtemp-0.3_beta15-dontwake.patch | patch -p1 CFLAGS="$SLKCFLAGS" ./configure \ --prefix=/usr \ --mandir=/usr/man \ --with-db-path=/usr/share/hddtemp/hddtemp.db \ --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || exit 2 make DESTDIR=$PKG install mkdir -p $PKG/usr/share/hddtemp/ cat $CWD/hddtemp.db > $PKG/usr/share/hddtemp/hddtemp.db cat $CWD/hddgentoo.db >> $PKG/usr/share/hddtemp/hddtemp.db cat $CWD/hddmbse.db >> $PKG/usr/share/hddtemp/hddtemp.db mkdir -p $PKG/etc/rc.d/init.d cp $CWD/hddtemp-init $PKG/etc/rc.d/init.d/hddtemp chmod 755 $PKG/etc/rc.d/init.d/hddtemp mkdir -p $PKG/var/log/setup cp $CWD/setup.hddtemp $PKG/var/log/setup/setup.hddtemp chmod 755 $PKG/var/log/setup/setup.hddtemp mkdir -p $DOCS cp -a ABOUT-NLS ChangeLog GPL-2 INSTALL README* TODO $DOCS VERSION=$VERSION-$PATCHVER fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi