commit 3af941a7fb22af6295c09873ac3a8889ae84391a Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:51:09 2019 +0800 Package init diff --git a/nss-mdns-0.14.1.tar.gz b/nss-mdns-0.14.1.tar.gz new file mode 100644 index 0000000..c7e74df Binary files /dev/null and b/nss-mdns-0.14.1.tar.gz differ diff --git a/nss-mdns.spec b/nss-mdns.spec new file mode 100644 index 0000000..fe211f6 --- /dev/null +++ b/nss-mdns.spec @@ -0,0 +1,66 @@ +Name: nss-mdns +Version: 0.14.1 +Release: 3 +Summary: Host name resolution for GNU Name Service Switch +License: LGPLv2+ +URL: https://github.com/lathiat/nss-mdns +Source0: https://github.com/lathiat/nss-mdns/releases/download/v%{version}/nss-mdns-%{version}.tar.gz + +BuildRequires: gcc pkgconfig(check) +Requires: avahi + +%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. + +%package_help + +%prep +%autosetup -n %{name}-%{version} + +%build +%configure --libdir=/%{_lib} +%make_build + +%install +%make_install + +%check +make check + +%pre + +%preun +if [ "$1" -eq 0 -a -f /etc/nsswitch.conf ] ; then + sed -i.bak ' + /^hosts:/ !b + s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g + ' /etc/nsswitch.conf +fi + +%post +/sbin/ldconfig +if [ -f /etc/nsswitch.conf ] ; then + sed -i.bak ' + /^hosts:/ !b + /\/ b + s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g + ' /etc/nsswitch.conf +fi + +%postun +/sbin/ldconfig + +%files +%defattr(-,root,root) +%license LICENSE +/%{_lib}/*.so.* + +%files help +%doc README.md NEWS.md ACKNOWLEDGEMENTS.md + +%changelog +* Fri Nov 8 2019 openEuler Buildteam - 0.14.1-3 +- Package init