From cc57cb201ddb179d2bb481c13dd4f286ae643b12 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 4 Jun 2013 00:27:56 -0700 Subject: Tue Jun 4 00:27:56 PDT 2013 --- extra/dhcp/PKGBUILD | 39 +++++++++++++++++----------------- extra/dhcp/dhcp | 10 --------- extra/dhcp/dhcp.conf.d | 6 ------ extra/dhcp/dhcp4 | 57 -------------------------------------------------- extra/dhcp/dhcp6 | 57 -------------------------------------------------- extra/dhcp/dhcpd | 40 ----------------------------------- 6 files changed, 19 insertions(+), 190 deletions(-) delete mode 100644 extra/dhcp/dhcp delete mode 100644 extra/dhcp/dhcp.conf.d delete mode 100644 extra/dhcp/dhcp4 delete mode 100644 extra/dhcp/dhcp6 delete mode 100755 extra/dhcp/dhcpd (limited to 'extra/dhcp') diff --git a/extra/dhcp/PKGBUILD b/extra/dhcp/PKGBUILD index 70f7eadf8..10a547001 100644 --- a/extra/dhcp/PKGBUILD +++ b/extra/dhcp/PKGBUILD @@ -1,32 +1,31 @@ -# $Id: PKGBUILD 180410 2013-03-21 12:04:16Z jgc $ +# $Id: PKGBUILD 187056 2013-06-03 11:16:27Z allan $ # Maintainer: Daniel Isenmann pkgbase=dhcp pkgname=('dhcp' 'dhclient') # separate patch levels with a period to maintain proper versioning. -pkgver=4.2.5 -_pkgver=4.2.5 -pkgrel=1 +pkgver=4.2.5.p1 +_pkgver=4.2.5-P1 +pkgrel=2 arch=('i686' 'x86_64') license=('custom:isc-dhcp') url="https://www.isc.org/software/dhcp" makedepends=('bash' 'iproute2') source=(ftp://ftp.isc.org/isc/${pkgbase}/${_pkgver}/${pkgbase}-${_pkgver}.tar.gz{,.asc} - dhcp4 dhcp6 dhcp dhcpd4.service dhcpd6.service + dhcpd4.service + dhcpd6.service dhcp-4.2.5-client_script-1.patch dhcp-4.2.5-missing_ipv6-1.patch) -md5sums=('6489e919ac093d17249270ee9be1020e' - '022bc7038b3061cfb31da4736e7ab8a8' - 'c49b1497837ba56c54e401a66e1bab9b' - '12c2f3ae47ed23eb698eb7f1bfd80f20' - '8f357e46e1efcbb746f38737a3f977a2' +md5sums=('f68e3c1f00a9af5742bc5e71d567cf93' + 'SKIP' '439ee2f145a1e86dd644cb94a854f8e7' '588aa85b6fe228c45623185a58d11992' '9e4dcf90beec15bfcb6631809cdcc780' 'da655f02f1cf4d95b4708e84e69edbc8') -build() { + +prepare() { cd "${srcdir}/${pkgbase}-${_pkgver}" # Define _GNU_SOURCE to fix IPV6. @@ -36,8 +35,11 @@ build() { patch -Np1 -i ../dhcp-4.2.5-missing_ipv6-1.patch # Make dhcp client script suck less. patch -Np1 -i ../dhcp-4.2.5-client_script-1.patch +} - ./configure --prefix=/usr --sysconfdir=/etc \ +build() { + cd "${srcdir}/${pkgbase}-${_pkgver}" + ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc \ --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \ @@ -48,15 +50,12 @@ build() { package_dhcp(){ pkgdesc="A DHCP server, client, and relay agent" - backup=('etc/dhcpd.conf' 'etc/conf.d/dhcp') + backup=('etc/dhcpd.conf') install=dhcp.install - + cd "${srcdir}/${pkgbase}-${_pkgver}" make DESTDIR="${pkgdir}" install - install -D -m755 "${srcdir}/dhcp4" "${pkgdir}/etc/rc.d/dhcp4" - install -D -m755 "${srcdir}/dhcp6" "${pkgdir}/etc/rc.d/dhcp6" - install -D -m644 "${srcdir}/dhcp" "${pkgdir}/etc/conf.d/${pkgbase}" install -d "${pkgdir}/var/lib/dhcp" install -D -m644 "${srcdir}/dhcpd4.service" "${pkgdir}/usr/lib/systemd/system/dhcpd4.service" @@ -67,7 +66,7 @@ package_dhcp(){ # Remove dhclient make -C client DESTDIR="${pkgdir}" uninstall - + # install license install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhcp/LICENSE" } @@ -82,11 +81,11 @@ package_dhclient(){ install -m755 -d "${pkgdir}/usr/share/dhclient" mv "${pkgdir}/etc/dhclient.conf.example" "${pkgdir}/usr/share/dhclient/" - + install -d "${pkgdir}/var/lib/dhclient" # install dhclient linux script - install -m755 -D client/scripts/linux "${pkgdir}/sbin/dhclient-script" + install -m755 client/scripts/linux "${pkgdir}/usr/bin/dhclient-script" # install license install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhclient/LICENSE" diff --git a/extra/dhcp/dhcp b/extra/dhcp/dhcp deleted file mode 100644 index d4f228d9c..000000000 --- a/extra/dhcp/dhcp +++ /dev/null @@ -1,10 +0,0 @@ -# -# Arguments to be passed to the DHCP server daemon -# - -# ipv4 runtime parameters -DHCP4_ARGS="-q" - -# ipv6 runtime parameters -DHCP6_ARGS="-q" - diff --git a/extra/dhcp/dhcp.conf.d b/extra/dhcp/dhcp.conf.d deleted file mode 100644 index 99ba6d13d..000000000 --- a/extra/dhcp/dhcp.conf.d +++ /dev/null @@ -1,6 +0,0 @@ -# -# Arguments to be passed to the DHCP server daemon -# - -DHCP_ARGS="-q" - diff --git a/extra/dhcp/dhcp4 b/extra/dhcp/dhcp4 deleted file mode 100644 index 8e1277a37..000000000 --- a/extra/dhcp/dhcp4 +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/dhcp - -PIDFILE="/var/run/dhcpd.pid" - -if [[ -f $PIDFILE ]]; then - read -r PID < "$PIDFILE" - - # prevent stale pidfiles from hanging around - if [[ ! -d /proc/$PID ]]; then - echo 'pid not found. deleteing stale pidfile' - unset PID - rm -f "$PIDFILE" - fi -fi - -case "$1" in - start) - stat_busy "Starting DHCPv4 Server" - if [[ $PID ]]; then - stat_fail - exit 1 - fi - if /usr/sbin/dhcpd -4 -pf "$PIDFILE" $DHCP4_ARGS; then - add_daemon dhcp4 - stat_done - else - stat_fail - exit 1 - fi - ;; - stop) - stat_busy "Stopping DHCPv4 Server" - if [[ ! $PID ]]; then - stat_fail - exit 1 - fi - if { kill $PID && rm -f "$PIDFILE"; } &>/dev/null; then - rm_daemon dhcp4 - stat_done - else - stat_fail - exit 1 - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac - diff --git a/extra/dhcp/dhcp6 b/extra/dhcp/dhcp6 deleted file mode 100644 index 6b4b4d359..000000000 --- a/extra/dhcp/dhcp6 +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/dhcp - -PIDFILE="/var/run/dhcp6.pid" - -if [[ -f $PIDFILE ]]; then - read -r PID < "$PIDFILE" - - # prevent stale pidfiles from hanging around - if [[ ! -d /proc/$PID ]]; then - echo 'pid not found. deleteing stale pidfile' - unset PID - rm -f "$PIDFILE" - fi -fi - -case "$1" in - start) - stat_busy "Starting DHCPv6 Server" - if [[ $PID ]]; then - stat_fail - exit 1 - fi - if /usr/sbin/dhcpd -6 -pf "$PIDFILE" $DHCP6_ARGS; then - add_daemon dhcp6 - stat_done - else - stat_fail - exit 1 - fi - ;; - stop) - stat_busy "Stopping DHCPv6 Server" - if [[ ! $PID ]]; then - stat_fail - exit 1 - fi - if { kill $PID && rm -f "$PIDFILE"; } &>/dev/null; then - rm_daemon dhcp6 - stat_done - else - stat_fail - exit 1 - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac - diff --git a/extra/dhcp/dhcpd b/extra/dhcp/dhcpd deleted file mode 100755 index 1fbb31e7c..000000000 --- a/extra/dhcp/dhcpd +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/dhcp - -PIDFILE="/var/run/dhcpd.pid" -PID=`cat $PIDFILE 2>/dev/null` -case "$1" in - start) - stat_busy "Starting DHCP Server" - if [ "$PID" = "" ]; then - /usr/sbin/dhcpd $DHCP_ARGS - fi - if [ "$PID" != "" -o $? -gt 0 ]; then - stat_fail - else - add_daemon dhcpd - stat_done - fi - ;; - stop) - stat_busy "Stopping DHCP Server" - [ ! -z "$PID" ] && kill $PID &> /dev/null - rm -f $PIDFILE - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon dhcpd - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -- cgit v1.2.3-54-g00ecf