summaryrefslogtreecommitdiff
path: root/extra/nss-mdns
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/nss-mdns
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/nss-mdns')
-rw-r--r--extra/nss-mdns/PKGBUILD30
-rw-r--r--extra/nss-mdns/mdns.allow8
-rw-r--r--extra/nss-mdns/nss-mdns.install24
3 files changed, 62 insertions, 0 deletions
diff --git a/extra/nss-mdns/PKGBUILD b/extra/nss-mdns/PKGBUILD
new file mode 100644
index 000000000..6fe8d5653
--- /dev/null
+++ b/extra/nss-mdns/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 56016 2009-10-17 23:24:29Z giovanni $
+# Contributor: Travis Willard <travis@archlinux.org>
+
+pkgname=nss-mdns
+pkgver=0.10
+pkgrel=2
+pkgdesc="glibc plugin providing host name resolution via mDNS"
+arch=('i686' 'x86_64')
+url="http://0pointer.de/lennart/projects/nss-mdns/"
+license=('lgpl')
+depends=('glibc')
+makedepends=('pkgconfig')
+backup=('etc/mdns.allow')
+install=nss-mdns.install
+source=(http://0pointer.de/lennart/projects/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ mdns.allow)
+md5sums=('03938f17646efbb50aa70ba5f99f51d7'
+ '904abb492fb1f56722826c0c3a997bf0')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/ \
+ --disable-lynx \
+ --enable-avahi
+ make || return 1
+ make DESTDIR=${pkgdir} install
+ mkdir -p ${startdir}/pkg/etc
+ install -m644 ../mdns.allow ${startdir}/pkg/etc/mdns.allow
+}
+
diff --git a/extra/nss-mdns/mdns.allow b/extra/nss-mdns/mdns.allow
new file mode 100644
index 000000000..ed64c974c
--- /dev/null
+++ b/extra/nss-mdns/mdns.allow
@@ -0,0 +1,8 @@
+#
+# /etc/mdns.allow
+#
+
+.local.
+.local
+
+# End of file
diff --git a/extra/nss-mdns/nss-mdns.install b/extra/nss-mdns/nss-mdns.install
new file mode 100644
index 000000000..ed0fd0c24
--- /dev/null
+++ b/extra/nss-mdns/nss-mdns.install
@@ -0,0 +1,24 @@
+post_install() {
+ cat << 'EOM'
+==> To enable IPv4 multicast DNS lookups, append 'mdns4' to the hosts line
+ in /etc/nsswitch.conf. Use 'mdns6' for IPv6 or 'mdns' for both.
+EOM
+}
+
+post_upgrade() {
+ if [ "$2" == "0.7-1" ]; then
+ echo -n "disabling mdns lookups in /etc/nsswitch.conf... "
+ sed -i -e '/^hosts: / s/ mdns\([46]\)\?\>//g' etc/nsswitch.conf && echo "done."
+ fi
+ cat << 'EOM'
+==> Please note that due to security reasons from version 0.9 on the
+ minimal mDNS stack included in nss-mdns (dubbed "legacy") is no
+ longer built - nss-mdns will not work unless Avahi is running.
+EOM
+
+ post_install
+}
+
+op=$1
+shift
+$op $*