summaryrefslogtreecommitdiff
path: root/source/n/dhcp/dhcp.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2011-04-25 13:37:00 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:45:18 +0200
commit75a4a592e5ccda30715f93563d741b83e0dcf39e (patch)
tree502f745607e77a2c4386ad38d818ddcafe81489c /source/n/dhcp/dhcp.SlackBuild
parentb76270bf9e6dd375e495fec92140a79a79415d27 (diff)
downloadcurrent-75a4a592e5ccda30715f93563d741b83e0dcf39e.tar.gz
Slackware 13.37slackware-13.37
Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun!
Diffstat (limited to 'source/n/dhcp/dhcp.SlackBuild')
-rwxr-xr-xsource/n/dhcp/dhcp.SlackBuild30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/n/dhcp/dhcp.SlackBuild b/source/n/dhcp/dhcp.SlackBuild
index 6baf041a..c328b3cb 100755
--- a/source/n/dhcp/dhcp.SlackBuild
+++ b/source/n/dhcp/dhcp.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,8 +21,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-$(echo dhcp-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+PKGNAM=dhcp
+# Leave this one .gz as other compressors do not help much and we can keep
+# the original upstream .asc
+VERSION=${VERSION:-$(basename $(echo $PKGNAM-*.tar.gz | cut -f 2- -d -) .tar.gz)}
+BUILD=${BUILD:-1}
+
+PKG_VERSION=$(echo $VERSION | tr - _)
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -59,7 +64,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf dhcp-$VERSION
-tar xvf $CWD/dhcp-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/dhcp-$VERSION.tar.gz || exit 1
cd dhcp-$VERSION || exit 1
chown -R root:root .
@@ -102,12 +107,12 @@ mv $PKG/usr/sbin/dhclient $PKG/sbin
cat client/scripts/linux > $PKG/sbin/dhclient-script
chmod 700 $PKG/sbin/dhclient-script
+# Create the initial *.leases files:
mkdir -p $PKG/var/state/dhcp
-# The daemon should create these automatically as needed
-#touch $PKG/var/state/dhcp/dhcpd.leases.new
-#touch $PKG/var/state/dhcp/dhcpd6.leases.new
-#touch $PKG/var/state/dhcp/dhclient.leases.new
-#touch $PKG/var/state/dhcp/dhclient6.leases.new
+touch $PKG/var/state/dhcp/dhcpd.leases.new
+touch $PKG/var/state/dhcp/dhcpd6.leases.new
+touch $PKG/var/state/dhcp/dhclient.leases.new
+touch $PKG/var/state/dhcp/dhclient6.leases.new
cat << EOF > $PKG/etc/dhcpd.conf.new
# dhcpd.conf
@@ -153,10 +158,5 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $TMP/dhcp-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/dhcp-$PKG_VERSION-$ARCH-$BUILD.txz
-# Clean up the extra stuff:
-if [ "$1" = "--cleanup" ]; then
- rm -rf $TMP/dhcp-$VERSION
- rm -rf $PKG
-fi