summaryrefslogtreecommitdiff
path: root/source/n/dhcpcd
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/dhcpcd')
-rw-r--r--source/n/dhcpcd/50-ntp.conf.diff29
-rw-r--r--source/n/dhcpcd/COPYRIGHT2
-rw-r--r--source/n/dhcpcd/define-SERVICEstuff-for-Slackware.patch32
-rwxr-xr-xsource/n/dhcpcd/dhcpcd.SlackBuild31
4 files changed, 56 insertions, 38 deletions
diff --git a/source/n/dhcpcd/50-ntp.conf.diff b/source/n/dhcpcd/50-ntp.conf.diff
deleted file mode 100644
index 63fd914b..00000000
--- a/source/n/dhcpcd/50-ntp.conf.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- ./dhcpcd-hooks/50-ntp.conf.orig 2010-11-19 04:17:14.000000000 -0600
-+++ ./dhcpcd-hooks/50-ntp.conf 2010-12-29 16:07:48.000000000 -0600
-@@ -8,6 +8,26 @@
- # NTP_CONF=/usr/pkg/etc/ntpd.conf
- # to use openntpd from pkgsrc instead of the system provided ntp.
-
-+# Detect OpenRC, Debian or BSD rc
-+# Distributions may want to just have their command here instead of this
-+if type rc-service >/dev/null 2>&1 && rc-service --exists ntpd; then
-+ ntpd_restart_cmd="rc-service ntpd -- -Ds restart"
-+elif type invoke-rc.d >/dev/null 2>&1; then
-+ if [ -x /etc/init.d/ntp ]; then
-+ ntpd_restart_cmd="invoke-rc.d ntp try-restart"
-+ fi
-+ # Debian as a seperate file for DHCP config to avoid stamping on
-+ # the master.
-+ [ -e /var/lib/ntp ] || mkdir /var/lib/ntp
-+ : ${NTP_DHCP_CONF:=/var/lib/ntp/ntp.conf.dhcp}
-+elif [ -x /etc/rc.d/ntpd ]; then
-+ ntpd_restart_cmd="/etc/rc.d/ntpd status >/dev/null 2>&1 && /etc/rc.d/ntpd restart"
-+elif [ -x /usr/local/etc/rc.d/ntpd ]; then
-+ ntpd_restart_cmd="/usr/local/etc/rc.d/ntpd status >/dev/null 2>&1 && /usr/local/etc/rc.d/ntpd restart"
-+elif [ -x /etc/rc.d/rc.ntpd ]; then
-+ ntpd_restart_cmd="/etc/rc.d/rc.ntpd status >/dev/null 2>&1 && /etc/rc.d/rc.ntpd restart"
-+fi
-+
- : ${ntpd_restart_cmd:=service_condcommand ntpd restart}
- if type invoke-rc.d >/dev/null 2>&1; then
- # Debian has a seperate file for DHCP config to avoid stamping on
diff --git a/source/n/dhcpcd/COPYRIGHT b/source/n/dhcpcd/COPYRIGHT
index 07d9e683..a75c8ce1 100644
--- a/source/n/dhcpcd/COPYRIGHT
+++ b/source/n/dhcpcd/COPYRIGHT
@@ -1,6 +1,6 @@
/*
* dhcpcd - DHCP client daemon
- * Copyright 2006-2008 Roy Marples <roy@marples.name>
+ * Copyright (c) 2006-2012 Roy Marples <roy@marples.name>
* All rights reserved
* Redistribution and use in source and binary forms, with or without
diff --git a/source/n/dhcpcd/define-SERVICEstuff-for-Slackware.patch b/source/n/dhcpcd/define-SERVICEstuff-for-Slackware.patch
new file mode 100644
index 00000000..ca0273f3
--- /dev/null
+++ b/source/n/dhcpcd/define-SERVICEstuff-for-Slackware.patch
@@ -0,0 +1,32 @@
+From 293f23ad36f2c84cf67c483d944157834f4417a6 Mon Sep 17 00:00:00 2001
+From: Robby Workman <rworkman@slackware.com>
+Date: Wed, 23 May 2012 21:33:30 -0500
+Subject: [PATCH] configure: Define SERVICE* for Slackware
+
+Slackware uses /etc/rc.d/rc.$service instead of just $service,
+so configure doesn't find those. This patch overrides the
+defaults for SERVICEEXISTS, SERVICECMD, and SERVICESTATUS.
+---
+ configure | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/configure b/configure
+index b334497..e6554ca 100755
+--- a/configure
++++ b/configure
+@@ -413,6 +413,12 @@ if [ -z "$SERVICECMD" ]; then
+ fi
+ done
+ fi
++if [ -e /etc/slackware-version ]; then
++ echo "Overriding service status check for Slackware Linux"
++ SERVICEEXISTS="[ -x /etc/rc.d/rc.\$1 ]"
++ SERVICECMD="/etc/rc.d/rc.\$1 \$2"
++ SERVICESTATUS="/etc/rc.d/rc.\$1 status 1>/dev/null 2>&1"
++fi
+ if [ -e /etc/arch-release ]; then
+ echo "Overriding service status check for Arch Linux"
+ SERVICESTATUS="[ -e /var/run/daemons/\$1 ]"
+--
+1.7.10.1
+
diff --git a/source/n/dhcpcd/dhcpcd.SlackBuild b/source/n/dhcpcd/dhcpcd.SlackBuild
index c50048ae..15f14e2f 100755
--- a/source/n/dhcpcd/dhcpcd.SlackBuild
+++ b/source/n/dhcpcd/dhcpcd.SlackBuild
@@ -72,8 +72,7 @@ find . \
# /etc/rc.d/rc.S, and /var should not be on a network filesystem. As such,
# we'll use the FHS layout instead of putting things in /etc/dhcpc
-# Fixup the 50-ntp.conf hook with our init script location
-zcat $CWD/50-ntp.conf.diff.gz | patch -p1 || exit 1
+zcat $CWD/define-SERVICEstuff-for-Slackware.patch.gz | patch -p1 || exit 1
# Yes, /lib/dhcpcd is correct, even on x86_64.
CFLAGS="$SLKCFLAGS" \
@@ -85,7 +84,6 @@ CFLAGS="$SLKCFLAGS" \
--dbdir=/var/lib/dhcpcd \
--libexecdir=/lib/dhcpcd \
--mandir=/usr/man \
- --with-hooks="50-ntp.conf 50-yp.conf" \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
@@ -97,16 +95,33 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \
# Let's not clobber the config file
mv $PKG/etc/dhcpcd.conf $PKG/etc/dhcpcd.conf.new
-# Compress manpages
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
mkdir -p $PKG/usr/doc/dhcpcd-$VERSION
cp -a README* $PKG/usr/doc/dhcpcd-$VERSION
zcat $CWD/COPYRIGHT.gz > $PKG/usr/doc/dhcpcd-$VERSION/COPYRIGHT
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh