New package: iwd-0.2.

This commit is contained in:
maxice8 2018-05-14 16:03:56 -03:00 committed by Enno Boland
parent e7dbb87fe7
commit bb7120b7fb
3 changed files with 107 additions and 0 deletions

4
srcpkgs/iwd/files/iwd/run Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
[ -r ./conf ] && . ./conf
exec 2>&1
exec /usr/libexec/iwd ${OPTS}

View file

@ -0,0 +1,79 @@
Source: John <johnz@posteo.net>
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 <netinet/ip.h>
+#include <net/ethernet.h>
#include <linux/types.h>
#include <linux/if_arp.h>
-#include <net/ethernet.h>
#include <errno.h>
#include <time.h>
--- monitor/nlmon.c
+++ monitor/nlmon.c
@@ -31,6 +31,8 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <arpa/inet.h>
+#include <net/ethernet.h>
+#include <netinet/ether.h>
#include <linux/if.h>
#include <linux/if_packet.h>
#include <linux/if_ether.h>
@@ -38,8 +40,6 @@
#include <linux/genetlink.h>
#include <linux/rtnetlink.h>
#include <linux/filter.h>
-#include <net/ethernet.h>
-#include <netinet/ether.h>
#include <ell/ell.h>
#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);
}

24
srcpkgs/iwd/template Normal file
View file

@ -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 <thinkabit.ukim@gmail.com>"
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
}