X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=admin%2Ficmpdn.spec.in;fp=admin%2Ficmpdn.spec.in;h=051d48a4910dfd2d0f19a448dc2739f61259627e;hb=388db5631dc33ab5b1eaad1bd5d98c34f87971f0;hp=0000000000000000000000000000000000000000;hpb=ce25dc6fa4ca91274bef2e3cbd327d4aefbb0e34;p=icmp-dn.git diff --git a/admin/icmpdn.spec.in b/admin/icmpdn.spec.in new file mode 100644 index 0000000..051d48a --- /dev/null +++ b/admin/icmpdn.spec.in @@ -0,0 +1,66 @@ +Name: icmpdn +Version: @VERSION@ +Release: 1 +Vendor: Fredrik Tolf +License: LGPL for library, GPL for utilities +Group: System Environment/Libraries +Summary: ICMP host name utilities +Source: %name-%version.tar.gz +URL: http://www.dolda2000.com/~fredrik/icmp-dn/ +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Since the Linux kernel does not support the ICMP host name facilities as +described in RFC 1788, I wrote a simple implementation in user-space. +It comprises three parts: + + * icmpdnd – The ICMP Domain Name daemon, which listens to ICMP + domain name requests and replies to them. + + * idnlookup – A user utility to query a host for its host name over + ICMP. Like ping and all other utilities that use ICMP, it needs to + be installed SUID root. + + * libnss_icmp.so.2 – A glibc NSS module, which uses idnlookup to + perform queries for the gethostbyaddr function. + +%prep +%setup + +%build +CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" \ + ./configure \ + --prefix=%_prefix \ + --sysconfdir=%_sysconfdir \ + --libdir=/lib +make + +%install +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d "$RPM_BUILD_ROOT" ] && rm -rf "$RPM_BUILD_ROOT" +mkdir $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +%post +# $1 = 0 is remove; $1 = 1 is update + +%postun +# $1 = 0 is remove; $1 = 1 is update + +%files +%defattr(-,root,root) +/lib/libnss_icmp.so +/lib/libnss_icmp.la +/lib/libnss_icmp.so.2.0.0 +/lib/libnss_icmp.so.2 +%config %{_sysconfdir}/nss-icmp.conf + +%attr(4755,root,root) %{_bindir}/idnlookup + +%{_sysconfdir}/init.d/icmpdnd +%{_sbindir}/icmpdnd + +%doc AUTHORS ChangeLog COPYING INSTALL NEWS README + +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d "$RPM_BUILD_ROOT" ] && rm -rf "$RPM_BUILD_ROOT" +