summaryrefslogtreecommitdiff
path: root/extra/dhcp/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/dhcp/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/dhcp/PKGBUILD')
-rw-r--r--extra/dhcp/PKGBUILD81
1 files changed, 81 insertions, 0 deletions
diff --git a/extra/dhcp/PKGBUILD b/extra/dhcp/PKGBUILD
new file mode 100644
index 000000000..fe232f5bb
--- /dev/null
+++ b/extra/dhcp/PKGBUILD
@@ -0,0 +1,81 @@
+# $Id: PKGBUILD 104595 2011-01-04 13:21:07Z daniel $
+# Maintainer: Daniel Isenmann <daniel @archlinux.org>
+
+pkgbase=dhcp
+pkgname=('dhcp' 'dhclient')
+
+# separate patch levels with a period to maintain proper versioning.
+pkgver=4.2.0.2
+_pkgver=4.2.0-P2
+
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('custom:isc-dhcp')
+url="https://www.isc.org/software/dhcp"
+source=(http://ftp.isc.org/isc/${pkgname}/${pkgname}-${_pkgver}.tar.gz
+ dhcpd dhcp.conf.d
+ dhcp-4.1.1-missing-ipv6-not-fatal.patch
+ dhclient-script-pathFixes.patch)
+md5sums=('a98f4ce3ca651e7e28a5a1ae6398689e'
+ 'df22cffa7d7415ece7bb025b7bf774dd'
+ '49da3192e5c885e3c7d02f447c2dea5e'
+ 'fd64aeb4f399dcc41ea43089a3811094'
+ 'ddcc5cd576ec631ade6c4da21952b50b')
+
+build() {
+ cd ${srcdir}/${pkgname}-${_pkgver}
+
+ # Define _GNU_SOURCE to fix IPV6.
+ sed '/^CFLAGS="$CFLAGS/ s/INGS"/INGS -D_GNU_SOURCE"/' -i configure
+
+ # Make not having ipv6 non-fatal.
+ patch -Np0 -i ${srcdir}/dhcp-4.1.1-missing-ipv6-not-fatal.patch
+
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \
+ --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases
+
+ make
+
+ patch -i ${srcdir}/dhclient-script-pathFixes.patch client/scripts/linux
+}
+
+package_dhcp(){
+ pkgdesc="A DHCP server, client, and relay agent"
+ depends=('openssl>=0.9.8a')
+ backup=('etc/dhcpd.conf' 'etc/conf.d/dhcp')
+ install=dhcp.install
+
+ cd ${srcdir}/${pkgname}-${_pkgver}
+ make DESTDIR=${pkgdir} install
+
+ install -D -m755 ${srcdir}/dhcpd ${pkgdir}/etc/rc.d/dhcpd
+ install -D -m644 ${srcdir}/dhcp.conf.d ${pkgdir}/etc/conf.d/${pkgbase}
+ mkdir -p ${pkgdir}/var/state/dhcp
+
+ # Remove dhclient
+ make -C client DESTDIR=${pkgdir} uninstall
+
+ # install license
+ install -m644 -D LICENSE ${pkgdir}/usr/share/licenses/dhcp/LICENSE
+}
+
+package_dhclient(){
+ pkgdesc="dhclient is standalone client from the dhcp package"
+ depends=('bash')
+
+ cd ${srcdir}/${pkgname}-${_pkgver}
+ make -C client DESTDIR=${pkgdir} install
+
+ # move dhclient.conf to dhclient.conf.example
+ mv ${pkgdir}/etc/dhclient.conf{,.example}
+
+ # directory needed for leasefiles
+ mkdir -p ${pkgdir}/var/lib/dhclient
+
+ # install dhclient linux script
+ install -m755 -D client/scripts/linux ${pkgdir}/sbin/dhclient-script
+
+ # install license
+ install -m644 -D LICENSE ${pkgdir}/usr/share/licenses/dhclient/LICENSE
+}