From db60f36d0fa83920a4873b17204a6f5b4f6a2aaa63531d3b9219722036577e12 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 14 Mar 2007 11:34:05 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nss-mdns?expand=0&rev=1 --- .gitattributes | 23 +++++++++ .gitignore | 1 + nss-mdns-0.9.tar.bz2 | 3 ++ nss-mdns.changes | 5 ++ nss-mdns.spec | 119 +++++++++++++++++++++++++++++++++++++++++++ ready | 0 6 files changed, 151 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 nss-mdns-0.9.tar.bz2 create mode 100644 nss-mdns.changes create mode 100644 nss-mdns.spec create mode 100644 ready diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/nss-mdns-0.9.tar.bz2 b/nss-mdns-0.9.tar.bz2 new file mode 100644 index 0000000..da0f66e --- /dev/null +++ b/nss-mdns-0.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47cc89d3847a46946670498e071987eff97dff2d38ad93e9c915418806a7c3fc +size 249634 diff --git a/nss-mdns.changes b/nss-mdns.changes new file mode 100644 index 0000000..4ea9f3e --- /dev/null +++ b/nss-mdns.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Feb 20 17:58:09 CET 2007 - sbrabec@suse.cz + +- New SuSE package, version 0.9. + diff --git a/nss-mdns.spec b/nss-mdns.spec new file mode 100644 index 0000000..8513a91 --- /dev/null +++ b/nss-mdns.spec @@ -0,0 +1,119 @@ +# +# spec file for package nss-mdns (Version 0.9) +# +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: nss-mdns +# lynx is not needed, text version of README is already present +#BuildRequires: lynx +Version: 0.9 +Release: 1 +Group: Productivity/Networking/DNS/Utilities +License: GNU General Public License (GPL) +URL: http://0pointer.de/lennart/projects/nss-mdns/ +Summary: Host Name Resolution via Multicast DNS (Zeroconf) for glibc +Source: %{name}-%{version}.tar.bz2 +AutoReqProv: on +PreReq: sed grep +Requires: avahi +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +nss-mdns is a plugin for the GNU Name Service Switch (NSS) +functionality of the GNU C Library (glibc) providing host name +resolution via Multicast DNS (aka Zeroconf, aka Apple Rendezvous, aka +Apple Bonjour), effectively allowing name resolution by common +Unix/Linux programs in the ad-hoc mDNS domain .local. + +nss-mdns provides client functionality only, which means that you have +to run a mDNS responder daemon seperately from nss-mdns if you want to +register the local host name via mDNS. I recommend Avahi. + +By default nss-mdns tries to contact a running avahi-daemon for +resolving host names and addresses and making use of its superior +record cacheing. + + + +Authors: +-------- + Lennart Poettering + +%prep +%setup -q + +%build +%configure --libdir=/%{_lib} + +%install +%makeinstall + +%post +/sbin/ldconfig +# If none currently supported module is configured, add the default configuration. +if ! grep -q "[[:space:]]\\(mdns\\|mdns4\\|mdns4_minimal\\|mdns_minimal\\|mdns6\\|mdns6_minimal\\)\\([[:space:]]\\|$\\)" etc/nsswitch.conf ; then +# If "dns" is present (most probably), add the proposed line. Otherwise add it to the end of the list. + sed -i "/^hosts:/{ + s/\\([[:space:]]\\)dns\\([[:space:]]\\|\$\\)/\\1mdns_minimal [NOTFOUND=return] dns mdns\\2/; + t1; + s/\$/ mdns_minimal [NOTFOUND=return] mdns/; + :1; + }" etc/nsswitch.conf +fi + +%posttrans +# We repeat exactly the same as in %%post to catch situation, when only discontinued modules were present before upgrade. +# If none currently supported module is configured, add the default configuration. +if ! grep -q "[[:space:]]\\(mdns\\|mdns4\\|mdns4_minimal\\|mdns_minimal\\|mdns6\\|mdns6_minimal\\)\\([[:space:]]\\|$\\)" etc/nsswitch.conf ; then +# If "dns" is present (most probably), add the proposed line. Otherwise add it to the end of the list. + sed -i "/^hosts:/{ + s/\\([[:space:]]\\)dns\\([[:space:]]\\|\$\\)/\\1mdns_minimal [NOTFOUND=return] dns mdns\\2/; + t1; + s/\$/ mdns_minimal [NOTFOUND=return] mdns/; + :1; + }" etc/nsswitch.conf +fi + +%postun +/sbin/ldconfig +# Build a regexp removing all no more provided libraries. +# If there are no known libraries installed, remove also related "[NOTFOUND=return]" +REMOVE_REGEXP= +REAL_REMOVE=true +for NSS_NAME in mdns mdns4 mdns4_minimal mdns_minimal mdns6 mdns6_minimal ; do + if test -f %{_lib}/libnss_$NSS_NAME.so.2 ; then + REAL_REMOVE=false + else + REMOVE_REGEXP="${REMOVE_REGEXP} + s/\\([[:space:]][[:space:]]*\\)$NSS_NAME\\([[:space:]][[:space:]]*\\)/\\1/g; + s/\\([[:space:]][[:space:]]*\\)$NSS_NAME\$//g;" + fi +done +if $REAL_REMOVE ; then + REMOVE_REGEXP="s/\\(mdns[46]*_minimal\\)[[:space:]][[:space:]]*\\[NOTFOUND=return\\]/\\1/;$REMOVE_REGEXP" +fi +sed -i "/^hosts:/{$REMOVE_REGEXP}" etc/nsswitch.conf + +%files +%defattr(-,root,root) +%doc LICENSE README doc/*.html doc/*.css +/%{_lib}/libnss_mdns.so.2 +/%{_lib}/libnss_mdns4.so.2 +/%{_lib}/libnss_mdns4_minimal.so.2 +/%{_lib}/libnss_mdns6.so.2 +/%{_lib}/libnss_mdns6_minimal.so.2 +/%{_lib}/libnss_mdns_minimal.so.2 + +%clean +rm -rf $RPM_BUILD_ROOT + +%changelog +* Tue Feb 20 2007 - sbrabec@suse.cz +- New SuSE package, version 0.9. diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4