summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-04-23 21:03:59 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-04-23 21:03:59 (GMT)
commit9cd55b71136e4b2b7b296549e39b23d02adc1817 (patch)
treeac90c3dda7505243099ba7c3e4a4c5227aa9d6bb
parent80c8eda6d28f0b38d9f0c078844f181166bc7a3b (diff)
downloadlinhes_pkgbuild-9cd55b71136e4b2b7b296549e39b23d02adc1817.zip
linhes_pkgbuild-9cd55b71136e4b2b7b296549e39b23d02adc1817.tar.gz
linhes_pkgbuild-9cd55b71136e4b2b7b296549e39b23d02adc1817.tar.bz2
nss-mdns: first appearance. Used for resolving hostnames via mdns
-rw-r--r--abs/core/nss-mdns/PKGBUILD34
-rw-r--r--abs/core/nss-mdns/mdns.allow8
-rw-r--r--abs/core/nss-mdns/nss-mdns.install20
3 files changed, 62 insertions, 0 deletions
diff --git a/abs/core/nss-mdns/PKGBUILD b/abs/core/nss-mdns/PKGBUILD
new file mode 100644
index 0000000..643dac8
--- /dev/null
+++ b/abs/core/nss-mdns/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 124100 2011-05-16 15:17:50Z andrea $
+# Maintainer:
+# Contributor: Travis Willard <travis@archlinux.org>
+
+pkgname=nss-mdns
+pkgver=0.10
+pkgrel=3
+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
+}
+
+package() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 "${srcdir}"/mdns.allow "${pkgdir}"/etc/mdns.allow
+}
+
diff --git a/abs/core/nss-mdns/mdns.allow b/abs/core/nss-mdns/mdns.allow
new file mode 100644
index 0000000..ed64c97
--- /dev/null
+++ b/abs/core/nss-mdns/mdns.allow
@@ -0,0 +1,8 @@
+#
+# /etc/mdns.allow
+#
+
+.local.
+.local
+
+# End of file
diff --git a/abs/core/nss-mdns/nss-mdns.install b/abs/core/nss-mdns/nss-mdns.install
new file mode 100644
index 0000000..85e4d26
--- /dev/null
+++ b/abs/core/nss-mdns/nss-mdns.install
@@ -0,0 +1,20 @@
+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
+}