diff options
author | davidovski <david@davidovski.xyz> | 2022-05-31 11:05:19 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-31 11:05:19 +0100 |
commit | 48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch) | |
tree | 00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/dhcp/dhcp.xibuild | |
parent | 871b2b573f01c1b3176a0f65458b3d281b41c437 (diff) |
removed idea of repos
Diffstat (limited to 'repo/dhcp/dhcp.xibuild')
-rw-r--r-- | repo/dhcp/dhcp.xibuild | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/repo/dhcp/dhcp.xibuild b/repo/dhcp/dhcp.xibuild new file mode 100644 index 0000000..9ebe292 --- /dev/null +++ b/repo/dhcp/dhcp.xibuild @@ -0,0 +1,69 @@ +#!/bin/sh + +MAKEDEPS="bash iproute2 libldap" +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 + +} + |