diff options
Diffstat (limited to 'aports')
-rw-r--r-- | aports/mDNSResponder/APKBUILD | 78 | ||||
-rw-r--r-- | aports/mDNSResponder/Clients-dns-sd.c.patch | 16 | ||||
-rw-r--r-- | aports/mDNSResponder/mDNSPosix-nss_mdns.c.patch | 13 | ||||
-rw-r--r-- | aports/mDNSResponder/mDNSShared-dnsextd_parser.y.patch | 29 | ||||
-rw-r--r-- | aports/mDNSResponder/mdnsd.initd | 12 | ||||
-rw-r--r-- | aports/mDNSResponder/mdnsresponderposix.confd | 1 | ||||
-rw-r--r-- | aports/mDNSResponder/mdnsresponderposix.initd | 15 |
7 files changed, 164 insertions, 0 deletions
diff --git a/aports/mDNSResponder/APKBUILD b/aports/mDNSResponder/APKBUILD new file mode 100644 index 0000000..ab973b3 --- /dev/null +++ b/aports/mDNSResponder/APKBUILD @@ -0,0 +1,78 @@ +# Maintainer: Gabor Pali <pali.gabor@gmail.com> + +pkgname='mDNSResponder' +pkgver=1310.140.1 +pkgrel=0 +pkgdesc='Bonjour (zero-configuration networking) by Apple' +arch="x86_64" +url='https://opensource.apple.com/tarballs/mDNSResponder/' +license="APACHE-2.0 BSD3" +makedepends="musl-nscd-dev" +depends="" +install= +options="!check !strip" +source="https://opensource.apple.com/tarballs/$pkgname/$pkgname-$pkgver.tar.gz + Clients-dns-sd.c.patch + mDNSPosix-nss_mdns.c.patch + mDNSShared-dnsextd_parser.y.patch + mdnsd.initd + mdnsresponderposix.initd + mdnsresponderposix.confd" + +build() { + make -j 1 -C "$srcdir"/"$pkgname"-"$pkgver"/mDNSPosix all dnsextd os=linux +} + +_srcdir="$srcdir"/"$pkgname"-"$pkgver" +_libs="libdns_sd.so + libnss_mdns-0.2.so" +_bins="mDNSClientPosix + mDNSNetMonitor + mDNSProxyResponderPosix + mDNSResponderPosix" +_clients=dns-sd +_sbins="dnsextd + mdnsd" + +package() { + mkdir -p \ + "$pkgdir"/usr/bin \ + "$pkgdir"/usr/lib \ + "$pkgdir"/usr/sbin \ + "$pkgdir"/etc/conf.d \ + "$pkgdir"/etc/init.d + cd "$_srcdir"/mDNSPosix/build/prod + for i in $_libs; do + install -m644 "$i" "$pkgdir"/usr/lib/"$i" || return 1 + done + for i in $_bins; do + install -m755 "$i" "$pkgdir"/usr/bin/"$i" || return 1 + strip "$pkgdir"/usr/bin/"$i" || return 1 + done + for i in $_sbins; do + install -m755 "$i" "$pkgdir"/usr/sbin/"$i" || return 1 + strip "$pkgdir"/usr/sbin/"$i" || return 1 + done + cd "$_srcdir"/Clients/build + for i in $_clients; do + install -m755 "$i" "$pkgdir"/usr/bin/"$i" || return 1 + strip "$pkgdir"/usr/bin/"$i" || return 1 + done + cd "$srcdir" + for i in *.initd; do + install -m755 "$i" "$pkgdir"/etc/init.d/"${i%.*}" || return 1 + done + for i in *.confd; do + install -m644 "$i" "$pkgdir"/etc/conf.d/"${i%.*}" || return 1 + done +} + +sha512sums=" +8ebf7ccb9cc40f0165c6570e190c5491834d6f36c8699605e86797e13adf60e4b7083867624bdd5a3241eb2c7cdf9adbee168783bd72f5f482c7553c1cd9a33e mDNSResponder-1310.140.1.tar.gz +e9aa4cfb315ac41ab0f3e90574d750dd04c33e1b2a167c02599313fbe0f58297ba0ff0e0686d9c7381acd0c2830b6bca17c330a27b5b109c738bbce8ccddd14f Clients-dns-sd.c.patch +f1032d803681478186a32574575d8dd360484dfc8e1d3bbec7faf1e5dd458f663228584eb935c3db14c1849d4ef5242ea92bdc057fdf9d9606f1b3b57ec855d5 mDNSPosix-nss_mdns.c.patch +39436034052ccee9affacdbdf9b4cfe66cc75e070d61e3bfd3a43b568797129804a32da8a49ef86488dc84f1952a7a473e0a25ce4c0c0054d7813934faaafbe8 mDNSShared-dnsextd_parser.y.patch +1a041d16545dbe1636acfe3bb084bfd8407f757e2fb13674d0035eec08a4107aa6679b28db34b6ea6db3d31b7cbaee712f51d593201bb0a8951dc8cd1f524c3c mdnsd.initd +6de992b3a3147039033312e1b5a256ff5d90246503615743d75d24c7e2d5e05c8af2dc63bc90bb2a2c8edbc7f657f13e1d2b87ee0fc6c71192a2010f52c43ab1 mdnsresponderposix.initd +b53af6a0a1351bd328a54fc8826350340371ad3134fc4131d3a8d1b0e016cf074141a89e515054b2119dc0eff84c609a0b7c422669c3fa00a17d2460140bc24f mdnsresponderposix.confd +" diff --git a/aports/mDNSResponder/Clients-dns-sd.c.patch b/aports/mDNSResponder/Clients-dns-sd.c.patch new file mode 100644 index 0000000..350cc37 --- /dev/null +++ b/aports/mDNSResponder/Clients-dns-sd.c.patch @@ -0,0 +1,16 @@ +--- mDNSResponder-1310.140.1/Clients/dns-sd.c.orig ++++ mDNSResponder-1310.140.1/Clients/dns-sd.c +@@ -58,11 +58,13 @@ + //#define TEST_NEW_CLIENTSTUB 1 + + #include <ctype.h> ++#include <stdarg.h> // For va_list + #include <stdio.h> // For stdout, stderr + #include <stdlib.h> // For exit() + #include <string.h> // For strlen(), strcpy() + #include <errno.h> // For errno, EINTR + #include <time.h> ++#include <sys/param.h> // For MIN + #include <sys/types.h> // For u_char + #ifdef APPLE_OSX_mDNSResponder + #include <inttypes.h> // For PRId64 diff --git a/aports/mDNSResponder/mDNSPosix-nss_mdns.c.patch b/aports/mDNSResponder/mDNSPosix-nss_mdns.c.patch new file mode 100644 index 0000000..96fee4e --- /dev/null +++ b/aports/mDNSResponder/mDNSPosix-nss_mdns.c.patch @@ -0,0 +1,13 @@ +--- mDNSResponder-1310.140.1/mDNSPosix/nss_mdns.c.orig ++++ mDNSResponder-1310.140.1/mDNSPosix/nss_mdns.c +@@ -87,6 +87,10 @@ + #define BIND_8_COMPAT 1 + #include <arpa/nameser.h> + ++#if !defined(NETDB_INTERNAL) ++# define NETDB_INTERNAL (-1) ++#endif ++ + #include <dns_sd.h> + + diff --git a/aports/mDNSResponder/mDNSShared-dnsextd_parser.y.patch b/aports/mDNSResponder/mDNSShared-dnsextd_parser.y.patch new file mode 100644 index 0000000..d9ce22a --- /dev/null +++ b/aports/mDNSResponder/mDNSShared-dnsextd_parser.y.patch @@ -0,0 +1,29 @@ +--- mDNSResponder-1310.140.1/mDNSShared/dnsextd_parser.y.orig ++++ mDNSResponder-1310.140.1/mDNSShared/dnsextd_parser.y +@@ -23,7 +23,7 @@ + #include "DebugServices.h" + #include "dnsextd.h" + +-void yyerror( const char* error ); ++void yyerror( void *context, const char* error ); + int yylex(void); + + +@@ -131,6 +131,8 @@ + %type <string> addressstatement + %type <string> networkaddress + ++%parse-param {void *context} ++ + %% + + commands: +@@ -409,7 +411,7 @@ + + extern int yylineno; + +-void yyerror( const char *str ) ++void yyerror( void *context, const char *str ) + { + fprintf( stderr,"%s:%d: error: %s\n", g_filename, yylineno, str ); + } diff --git a/aports/mDNSResponder/mdnsd.initd b/aports/mDNSResponder/mdnsd.initd new file mode 100644 index 0000000..0647458 --- /dev/null +++ b/aports/mDNSResponder/mdnsd.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +name="Multicast and Unicast DNS daemon" +description="Daemon for Multicast DNS and DNS Service Discovery" + +command="/usr/sbin/$SVCNAME" +pidfile="/var/run/$SVCNAME.pid" + +depend() { + need net + after firewall +} diff --git a/aports/mDNSResponder/mdnsresponderposix.confd b/aports/mDNSResponder/mdnsresponderposix.confd new file mode 100644 index 0000000..b3ebc2e --- /dev/null +++ b/aports/mDNSResponder/mdnsresponderposix.confd @@ -0,0 +1 @@ +MDNSRESPONDERPOSIX_OPTS="-f /media/etc/mdnsd-services.conf" diff --git a/aports/mDNSResponder/mdnsresponderposix.initd b/aports/mDNSResponder/mdnsresponderposix.initd new file mode 100644 index 0000000..b3b7ca7 --- /dev/null +++ b/aports/mDNSResponder/mdnsresponderposix.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon +name="Multicast and Unicast DNS responder" +description="Responder for Multicast DNS and DNS Service Discovery" + +pidfile="/var/run/$SVCNAME.pid" +command=/usr/bin/mDNSResponderPosix +command_args="-P ${pidfile} $MDNSRESPONDERPOSIX_OPTS " +command_args_background="-b" + +depend() { + need net mdnsd + after firewall +} |