--- /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 = Linux-PAM
+PKG_VER = 1.1.0
+PKG_REL = 0
+
+PKG_MAINTAINER =
+PKG_GROUP = System/Base
+PKG_URL = http://www.us.kernel.org/pub/linux/libs/pam/index.html
+PKG_LICENSE = BSD and GPLv2+ and BSD with advertising
+PKG_SUMMARY = An extensible library which provides authentication for applications.
+
+PKG_BUILD_DEPS+= bison flex
+PKG_DEPS += cracklib
+
+define PKG_DESCRIPTION
+ PAM (Pluggable Authentication Modules) is a system security tool that \
+ allows system administrators to set authentication policy without \
+ having to recompile programs that handle authentication.
+endef
+
+PKG_TARBALL = $(THISAPP).tar.bz2
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+define STAGE_BUILD
+ cd $(DIR_APP) && \
+ ./configure \
+ $(CONFIGURE_ARCH) \
+ --libdir=/lib \
+ --sbindir=/lib/security \
+ --enable-securedir=/lib/security \
+ --docdir=/usr/share/doc/Linux-PAM-$(PKG_VER) \
+ --enable-read-both-confs
+
+ cd $(DIR_APP) && make $(PARALLELISMFLAGS)
+endef
+
+define STAGE_INSTALL
+ cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT)
+
+ -mkdir -pv $(BUILDROOT)/sbin
+ chmod -v 4755 $(BUILDROOT)/lib/security/unix_chkpwd
+ mv -v $(BUILDROOT)/lib/security/pam_tally $(BUILDROOT)/sbin
+
+ -mkdir -pv $(BUILDROOT)/usr/lib
+ for LINK in libpam{,c,_misc}.so; do \
+ ln -v -sf ../../lib/$$(readlink $(BUILDROOT)/lib/$${LINK}) \
+ $(BUILDROOT)/usr/lib/$${LINK} && \
+ rm -v $(BUILDROOT)/lib/$${LINK}; \
+ done
+
+ #useradd -D -b /home
+ #sed -i 's/yes/no/' $(BUILDROOT)/etc/default/useradd
+ -mkdir -pv $(BUILDROOT)/etc/security
+ install -v -m644 $(DIR_SOURCE)/pam_env.conf $(BUILDROOT)/etc/security/pam_env.conf
+ cp -vf $(DIR_SOURCE)/{login.defs,securetty} $(BUILDROOT)/etc
+
+ -mkdir -pv $(BUILDROOT)/etc/pam.d
+ cp -vf $(DIR_SOURCE)/pam.d/{other,system-auth} $(BUILDROOT)/etc/pam.d/
+endef