]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - nss-myhostname/nss-myhostname.nm
9573d49b6ac3780fd4ef3649af5bd7c789515211
[people/amarx/ipfire-3.x.git] / nss-myhostname / nss-myhostname.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = nss-myhostname
7 version = 0.3
8 release = 1
9
10 groups = System/Libraries
11 url = http://0pointer.de/lennart/projects/nss-myhostname/
12 license = LGPLv2+
13 summary = glibc plugin for local system host name resolution.
14
15 description
16 nss-myhostname is a plugin for the GNU Name Service Switch (NSS)
17 functionality of the GNU C Library (glibc) providing host name
18 resolution for the locally configured system hostname as returned by
19 gethostname(2). Various software relies on an always resolvable local
20 host name. When using dynamic hostnames this is usually achieved by
21 patching /etc/hosts at the same time as changing the host name. This
22 however is not ideal since it requires a writable /etc file system and
23 is fragile because the file might be edited by the administrator at
24 the same time. nss-myhostname simply returns all locally configure
25 public IP addresses, or -- if none are configured -- the IPv4 address
26 127.0.0.2 (wich is on the local loopback) and the IPv6 address ::1
27 (which is the local host) for whatever system hostname is configured
28 locally. Patching /etc/hosts is thus no longer necessary.
29 end
30
31 source_dl =
32
33 build
34 configure_options += \
35 --libdir=/lib
36
37 install_cmds
38 mkdir -pv %{BUILDROOT}/usr/lib
39 ln -svf ../../lib/libnss_myhostname.so.2 \
40 %{BUILDROOT}/usr/lib/libnss_myhostname.so
41
42 rm -rf %{BUILDROOT}/usr/share/doc/nss-myhostname
43 end
44 end
45
46 packages
47 package %{name}
48 end