void-packages/srcpkgs/dhcp/template

53 lines
1.8 KiB
Bash
Raw Normal View History

2015-03-28 17:55:09 +00:00
# Template file for 'dhcp'
pkgname=dhcp
2015-05-13 07:33:48 +00:00
version=4.3.2
2015-07-25 08:42:52 +00:00
revision=5
build_pie=yes
2015-03-28 17:55:09 +00:00
build_style=gnu-configure
hostmakedepends="perl"
2015-05-13 07:33:48 +00:00
conf_files="/etc/dhcpd.conf"
2015-03-28 17:55:09 +00:00
short_desc="Server from the Internet Software Consortium's implementation of DHCP"
maintainer="Enno Boland <eb@s01.de>"
license="ISC"
homepage="https://www.isc.org/software/dhcp"
2015-05-13 07:33:48 +00:00
distfiles="http://ftp.isc.org/isc/dhcp/${version}/dhcp-${version}.tar.gz"
checksum=6246c9b358759f6cdcc45104caaf76e732a211dbbbbf64a21f499c8db1298165
pre_configure() {
2015-06-02 09:00:24 +00:00
local _args=" --sbindir=/usr/bin --enable-paranoia
2015-05-13 07:33:48 +00:00
--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
--with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases"
2015-05-26 11:31:08 +00:00
local cargs="$(echo $configure_args | tr '\n' ' ')"
2015-05-13 07:33:48 +00:00
2015-03-28 19:03:44 +00:00
# patching bind Makefile to patch with a cross fix while building (WTF?!)
2015-05-26 11:31:08 +00:00
sed -i "s#./configure#patch -p0 < $FILESDIR/003_cross_fix.patch \&\& ./configure --with-randomdev=/dev/urandom $cargs#" bind/Makefile
# set real configure_args
2015-05-13 07:33:48 +00:00
export configure_args+="${_args}"
}
2015-03-28 17:55:09 +00:00
post_install() {
2015-05-13 07:33:48 +00:00
mv ${DESTDIR}/etc/dhclient.conf.example ${DESTDIR}/etc/dhclient.conf
mv ${DESTDIR}/etc/dhcpd.conf.example ${DESTDIR}/etc/dhcpd.conf
sed -i "s/^/#/" $DESTDIR/etc/dhclient.conf $DESTDIR/etc/dhcpd.conf
2015-03-28 17:55:09 +00:00
vsv dhcpd4
vsv dhcpd6
2015-03-29 07:10:46 +00:00
# Remove development stuff, useless...
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib ${DESTDIR}/usr/share/man/man3
2015-03-28 17:55:09 +00:00
}
dhclient_package() {
short_desc="Client from the Internet Software Consortium's implementation of DHCP"
conf_files="/etc/dhclient.conf"
make_dirs="/var/lib/dhclient 0755 root root"
2015-03-28 17:55:09 +00:00
pkg_install() {
vmove etc/dhclient.conf
2015-06-02 09:00:24 +00:00
vmove usr/bin/dhclient
2015-03-28 17:55:09 +00:00
vmove usr/share/man/man5/dhclient*
vmove usr/share/man/man8/dhclient*
2015-06-02 09:00:24 +00:00
vbin client/scripts/linux dhclient-script
2015-03-28 17:55:09 +00:00
vsv dhclient
}
}