diff --git a/srcpkgs/iwd/files/iwd/run b/srcpkgs/iwd/files/iwd/run new file mode 100755 index 0000000000..b7d22b7f9e --- /dev/null +++ b/srcpkgs/iwd/files/iwd/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec 2>&1 +exec /usr/libexec/iwd ${OPTS} diff --git a/srcpkgs/iwd/patches/fix-musl.patch b/srcpkgs/iwd/patches/fix-musl.patch new file mode 100644 index 0000000000..a4959ced9b --- /dev/null +++ b/srcpkgs/iwd/patches/fix-musl.patch @@ -0,0 +1,79 @@ +Source: John +Upstream: Unknown +Reason: Fixes compilation with musl libc + +--- ell/dhcp-transport.c ++++ ell/dhcp-transport.c +@@ -185,12 +183,12 @@ + ip->saddr = L_CPU_TO_BE32(saddr); + ip->daddr = L_CPU_TO_BE32(daddr); + +- udp->source = L_CPU_TO_BE16(sport); +- udp->dest = L_CPU_TO_BE16(dport); ++ udp->uh_sport = L_CPU_TO_BE16(sport); ++ udp->uh_dport = L_CPU_TO_BE16(dport); + +- udp->len = L_CPU_TO_BE16(len + sizeof(*udp)); ++ udp->uh_ulen = L_CPU_TO_BE16(len + sizeof(*udp)); + +- ip->check = udp->len; ++ ip->check = udp->uh_ulen; + + iov[0].iov_base = &ip->ttl; + iov[0].iov_len = sizeof(*ip) - 8; +@@ -198,7 +196,7 @@ + iov[1].iov_len = sizeof(*udp); + iov[2].iov_base = (void *) data; + iov[2].iov_len = len; +- udp->check = _dhcp_checksumv(iov, 3); ++ udp->uh_sum = _dhcp_checksumv(iov, 3); + + ip->ttl = IPDEFTTL; + ip->check = 0; +--- ell/dhcp.c ++++ ell/dhcp.c +@@ -25,9 +25,9 @@ + #endif + + #include ++#include + #include + #include +-#include + #include + #include + +--- monitor/nlmon.c ++++ monitor/nlmon.c +@@ -31,6 +31,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -38,8 +40,6 @@ + #include + #include + #include +-#include +-#include + #include + + #ifndef ARPHRD_NETLINK + +--- plugins/ofono.c ++++ plugins/ofono.c +@@ -653,7 +653,9 @@ + * has been seen to happen. + */ + l_error("modem %s already found", path); ++#if defined(__GLIBC__) + __iwd_backtrace_print(2); ++#endif + exit(1); + } + + diff --git a/srcpkgs/iwd/template b/srcpkgs/iwd/template new file mode 100644 index 0000000000..66c1bf2cf0 --- /dev/null +++ b/srcpkgs/iwd/template @@ -0,0 +1,24 @@ +# Template file for 'iwd' +pkgname=iwd +version=0.2 +revision=1 +build_style=gnu-configure +configure_args="--disable-systemd-service --enable-docs" +hostmakedepends="asciidoc pkg-config" +makedepends="readline-devel dbus-devel" +depends="dbus" +short_desc="Internet Wireless Daemon by Intel that aims to replace wpa_supplicant" +maintainer="maxice8 " +license="LGPL-2.1-or-later" +homepage="https://iwd.wiki.kernel.org/" +distfiles="${KERNEL_SITE}/network/wireless/iwd-${version}.tar.xz" +checksum=25cc09cb75a707e0441dc52901d8bba9c73d9460f42116c34ffc4f0f3676ea44 +make_dirs="/var/lib/iwd 0600 root root" + +post_install() { + vmkdir etc/iwd + touch "${DESTDIR}"/etc/iwd/.empty + + vsconf doc/main.conf + vsv iwd +}