summaryrefslogtreecommitdiff
path: root/repo/system/dhcp/dhcp.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
commit739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch)
tree09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /repo/system/dhcp/dhcp.xibuild
parent4c585ad54388285500fd18a6aaa516894e0f2c16 (diff)
moved everything to new file formatting
Diffstat (limited to 'repo/system/dhcp/dhcp.xibuild')
-rw-r--r--repo/system/dhcp/dhcp.xibuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/repo/system/dhcp/dhcp.xibuild b/repo/system/dhcp/dhcp.xibuild
new file mode 100644
index 0000000..241dee1
--- /dev/null
+++ b/repo/system/dhcp/dhcp.xibuild
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+MAKEDEPS="bash iproute2 openldap"
+DEPS="musl libldap"
+
+PKG_VER=4.4.3b1
+SOURCE=https://ftp.isc.org/isc/dhcp/$PKG_VER/dhcp-$PKG_VER.tar.gz
+
+ADDITIONAL="
+01-dhclient-script-fix-bare-ip.patch
+02-dhclient-script-remove-bashisms.patch
+03-fix-unwind-import.patch
+dhcpd.confd
+dhcpd.initd
+"
+
+DESC="A DHCP server, client and relay"
+
+package () {
+ apply_patches
+
+ sed -i '/o.*dhcp_type/d' server/mdb.c &&
+ sed -r '/u.*(local|remote)_port/d' \
+ -i client/dhclient.c \
+ relay/dhcrelay.c
+}
+
+
+build () {
+ # fix ipv6
+
+ export CFLAGS="$CFLAGS -D_GNU_SOURCE \
+ -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/dhcp \
+ --localstatedir=/var \
+ --with-srv-conf-file=/etc/dhcp/dhcpd.conf \
+ --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
+ --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \
+ --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
+ --with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \
+ --with-srv-pid-file=/run/dhcp/dhcpd.pid \
+ --with-srv6-pid-file=/run/dhcp/dhcpd6.pid \
+ --with-cli-pid-file=/run/dhcp/dhclient.pid \
+ --with-cli6-pid-file=/run/dhcp/dhclient6.pid \
+ --with-relay-pid-file=/run/dhcp/dhcrelay.pid \
+ --with-relay6-pid-file=/run/dhcp/dhcrelay6.pid \
+ --with-libbind=no \
+ --enable-dhcpv4o6 \
+ --enable-paranoia \
+ --enable-log-pid \
+
+ make -j1 -C bind && make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+
+ install -d $PKG_DEST/var/lib/dhcp
+ install -d $PKG_DEST/run/dhcp
+
+
+ install -m755 -D dhcpd.initd $PKG_DEST/etc/init.d/dhcpd
+ install -m644 -D dhcpd.confd $PKG_DEST/etc/conf.d/dhcpd
+
+}
+