#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-dhcpcd VERSION=4.0.1 ARCH=alpha BUILD=1 rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf dhcpcd-$VERSION tar xjf $CWD/dhcpcd-$VERSION.tar.bz2 cd dhcpcd-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; find . -perm 444 -exec chmod 644 {} \; make || exit 1 install -d /tmp/package-dhcpcd/sbin install dhcpcd /tmp/package-dhcpcd/sbin install -d /tmp/package-dhcpcd/usr/man/man8 install -m 0444 dhcpcd.8 /tmp/package-dhcpcd/usr/man/man8 install -d /tmp/package-dhcpcd/usr/man/man5 install -m 0444 dhcpcd.conf.5 /tmp/package-dhcpcd/usr/man/man5 mkdir -p $PKG/etc/dhcpc cat << EOF > $PKG/etc/dhcpc/dhcpcd-eth0.exe #!/bin/sh echo "(dhcpcd) IP address changed to \$1" | logger EOF chmod 750 $PKG/etc/dhcpc/dhcpcd-eth0.exe strip --strip-unneeded $PKG/sbin/* 2> /dev/null gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/dhcpcd-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/dhcpcd.build.log