--- /dev/null
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include $(PKGROOT)/Include
+
+PKG_NAME = nss-myhostname
+PKG_VER = 0.3
+PKG_REL = 1
+
+PKG_MAINTAINER =
+PKG_GROUPS = System/Libraries
+PKG_URL = http://0pointer.de/lennart/projects/nss-myhostname/
+PKG_LICENSE = LGPLv2+
+PKG_SUMMARY = glibc plugin for local system host name resolution.
+
+define PKG_DESCRIPTION
+ nss-myhostname is a plugin for the GNU Name Service Switch (NSS)
+ functionality of the GNU C Library (glibc) providing host name
+ resolution for the locally configured system hostname as returned by
+ gethostname(2). Various software relies on an always resolvable local
+ host name. When using dynamic hostnames this is usually achieved by
+ patching /etc/hosts at the same time as changing the host name. This
+ however is not ideal since it requires a writable /etc file system and
+ is fragile because the file might be edited by the administrator at
+ the same time. nss-myhostname simply returns all locally configure
+ public IP addresses, or -- if none are configured -- the IPv4 address
+ 127.0.0.2 (wich is on the local loopback) and the IPv6 address ::1
+ (which is the local host) for whatever system hostname is configured
+ locally. Patching /etc/hosts is thus no longer necessary.
+endef
+
+PKG_TARBALL = $(THISAPP).tar.gz
+
+CONFIGURE_OPTIONS += \
+ --libdir=/lib
+
+define STAGE_INSTALL_CMDS
+ -mkdir -pv $(BUILDROOT)/usr/lib
+ ln -svf ../../lib/libnss_myhostname.so.2 \
+ $(BUILDROOT)/usr/lib/libnss_myhostname.so
+
+ rm -rf $(BUILDROOT)/usr/share/doc/nss-myhostname
+endef