summaryrefslogtreecommitdiff
path: root/repo/system
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-02-06 14:15:05 +0000
committerdavidovski <david@davidovski.xyz>2022-02-06 14:15:05 +0000
commit31723b3943baa14269be93abcb03e1ffe44a3407 (patch)
treeb47e2094372b4c15a57220bfb1d70cdf87ed1eee /repo/system
parent16fc77be18cd3bdd4f6a9af86b9857663894f522 (diff)
adde a few extra utilities
Diffstat (limited to 'repo/system')
-rw-r--r--repo/system/dhcp.xibuild73
-rw-r--r--repo/system/libusb.xibuild17
-rw-r--r--repo/system/networkmanager.xibuild2
3 files changed, 91 insertions, 1 deletions
diff --git a/repo/system/dhcp.xibuild b/repo/system/dhcp.xibuild
new file mode 100644
index 0000000..6b57b1d
--- /dev/null
+++ b/repo/system/dhcp.xibuild
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+MAKEDEPS=(bash iproute2 openldap)
+DEPS=(glibc libldap)
+
+PKG_VER=4.4.2-P1
+SOURCE=https://ftp.isc.org/isc/dhcp/$PKG_VER/dhcp-$PKG_VER.tar.gz
+
+BOOTSCRIPTS=blfs-bootscripts-20210826
+ADDITIONAL=(
+ https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz
+ )
+
+DESC="A DHCP server, client and relay"
+
+package () {
+ sed -i '/o.*dhcp_type/d' server/mdb.c &&
+ sed -r '/u.*(local|remote)_port/d' \
+ -i client/dhclient.c \
+ relay/dhcrelay.c
+}
+
+
+build () {
+ ( export CFLAGS="${CFLAGS:--g -O2} -Wall -fno-strict-aliasing \
+ -D_PATH_DHCLIENT_SCRIPT='\"/usr/sbin/dhclient-script\"' \
+ -D_PATH_DHCPD_CONF='\"/etc/dhcp/dhcpd.conf\"' \
+ -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'" &&
+
+./configure --prefix=/usr \
+ --sysconfdir=/etc/dhcp \
+ --localstatedir=/var \
+ --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
+ --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases \
+ --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
+ --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases
+) &&
+make -j1
+
+}
+
+package () {
+ make -C client DESTDIR=$PKG_DEST install &&
+ install -v -m755 client/scripts/linux $PKG_DEST/usr/sbin/dhclient-script
+
+ install -vdm755 /etc/dhcp &&
+ cat > $PKG_DEST/etc/dhcp/dhclient.conf << "EOF"
+# Begin /etc/dhcp/dhclient.conf
+#
+# Basic dhclient.conf(5)
+
+#prepend domain-name-servers 127.0.0.1;
+request subnet-mask, broadcast-address, time-offset, routers,
+ domain-name, domain-name-servers, domain-search, host-name,
+ netbios-name-servers, netbios-scope, interface-mtu,
+ ntp-servers;
+require subnet-mask, domain-name-servers;
+#timeout 60;
+#retry 60;
+#reboot 10;
+#select-timeout 5;
+#initial-interval 2;
+
+# End /etc/dhcp/dhclient.conf
+EOF
+ install -v -dm 755 $PKG_DEST/var/lib/dhclient
+
+ tar xf $BOOTSCRIPTS.tar.xz
+ cd $BOOTSCRIPTS
+ make DESTDIR=$PKG_DEST install-service-dhclient
+
+}
+
diff --git a/repo/system/libusb.xibuild b/repo/system/libusb.xibuild
new file mode 100644
index 0000000..764341c
--- /dev/null
+++ b/repo/system/libusb.xibuild
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+MAKEDEPS=(make)
+DEPS=(glibc eudev)
+
+PKG_VER=1.0.25
+SOURCE=https://github.com/libusb/libusb/releases/download/v$PKG_VER/libusb-$PKG_VER.tar.bz2
+DESC="Library that provides generic access to USB devices"
+
+build () {
+ ./configure --prefix=/usr --disable-static &&
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/system/networkmanager.xibuild b/repo/system/networkmanager.xibuild
index 36ae070..3a59ce4 100644
--- a/repo/system/networkmanager.xibuild
+++ b/repo/system/networkmanager.xibuild
@@ -1,7 +1,7 @@
#!/bin/bash
MAKEDEPS=(grep meson ninja python intltool glib)
-DEPS=(jansson libndp curl wpa_supplicant newt nss polkit libpsl audit dbus gobject-introspection)
+DEPS=(jansson libndp curl wpa_supplicant newt nss polkit libpsl audit dbus gobject-introspection dhcp)
PKG_VER=1.35.5
SOURCE=https://download.gnome.org/sources/NetworkManager/$(echo $PKG_VER | cut -d. -f-2)/NetworkManager-$PKG_VER.tar.xz