Commit | Line | Data |
---|---|---|
388db563 DC |
1 | Name: icmpdn |
2 | Version: @VERSION@ | |
3 | Release: 1 | |
4 | Vendor: Fredrik Tolf <fredrik@dolda2000.com> | |
5 | License: LGPL for library, GPL for utilities | |
6 | Group: System Environment/Libraries | |
7 | Summary: ICMP host name utilities | |
8 | Source: %name-%version.tar.gz | |
9 | URL: http://www.dolda2000.com/~fredrik/icmp-dn/ | |
10 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
11 | ||
12 | %description | |
13 | Since the Linux kernel does not support the ICMP host name facilities as | |
14 | described in RFC 1788, I wrote a simple implementation in user-space. | |
15 | It comprises three parts: | |
16 | ||
17 | * icmpdnd – The ICMP Domain Name daemon, which listens to ICMP | |
18 | domain name requests and replies to them. | |
19 | ||
20 | * idnlookup – A user utility to query a host for its host name over | |
21 | ICMP. Like ping and all other utilities that use ICMP, it needs to | |
22 | be installed SUID root. | |
23 | ||
24 | * libnss_icmp.so.2 – A glibc NSS module, which uses idnlookup to | |
25 | perform queries for the gethostbyaddr function. | |
26 | ||
27 | %prep | |
28 | %setup | |
29 | ||
30 | %build | |
31 | CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" \ | |
32 | ./configure \ | |
33 | --prefix=%_prefix \ | |
34 | --sysconfdir=%_sysconfdir \ | |
35 | --libdir=/lib | |
36 | make | |
37 | ||
38 | %install | |
39 | [ "$RPM_BUILD_ROOT" != "/" ] && [ -d "$RPM_BUILD_ROOT" ] && rm -rf "$RPM_BUILD_ROOT" | |
40 | mkdir $RPM_BUILD_ROOT | |
41 | make DESTDIR=$RPM_BUILD_ROOT install | |
42 | ||
43 | %post | |
44 | # $1 = 0 is remove; $1 = 1 is update | |
45 | ||
46 | %postun | |
47 | # $1 = 0 is remove; $1 = 1 is update | |
48 | ||
49 | %files | |
50 | %defattr(-,root,root) | |
51 | /lib/libnss_icmp.so | |
52 | /lib/libnss_icmp.la | |
53 | /lib/libnss_icmp.so.2.0.0 | |
54 | /lib/libnss_icmp.so.2 | |
55 | %config %{_sysconfdir}/nss-icmp.conf | |
56 | ||
57 | %attr(4755,root,root) %{_bindir}/idnlookup | |
58 | ||
59 | %{_sysconfdir}/init.d/icmpdnd | |
60 | %{_sbindir}/icmpdnd | |
61 | ||
62 | %doc AUTHORS ChangeLog COPYING INSTALL NEWS README | |
63 | ||
64 | %clean | |
65 | [ "$RPM_BUILD_ROOT" != "/" ] && [ -d "$RPM_BUILD_ROOT" ] && rm -rf "$RPM_BUILD_ROOT" | |
66 |