#!/bin/sh # Set initial variables: CWD=`pwd` TMP=/tmp PKG=$TMP/package-smartmontools VERSION=5.37 ARCH=alpha BUILD=1 rm -rf $PKG mkdir -p $PKG ( cd $TMP tar xzf $CWD/smartmontools-$VERSION.tar.gz cd smartmontools-$VERSION ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-docdir=/usr/doc/smartmontools-$VERSION || exit make || exit make install DESTDIR=$PKG || exit rm -f $PKG/usr/doc/smartmontools-$VERSION/CHANGELOG $PKG/usr/doc/smartmontools-$VERSION/smartd.conf ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mv $PKG/etc/smartd.conf $PKG/etc/smartd.conf.new chmod 755 $PKG/usr/sbin/* chown -R root.bin $PKG/usr/sbin gzip -9 $PKG/usr/man/man{5,8}/* chmod 644 $PKG/usr/doc/smartmontools-$VERSION/* chown -R root.root $PKG/usr/doc/smartmontools-$VERSION rm -rf $PKG/etc/rc.d mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/smartmontools-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/smartmon.build.log