aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim 'max_posedon' Melnikau <maxposedon@gmail.com>2010-06-08 02:25:22 +0300
committerMaksim 'max_posedon' Melnikau <maxposedon@gmail.com>2010-06-08 02:25:22 +0300
commit1deeaa617012a95fcb09a01aff4414efedf8b57b (patch)
treeef9d4e921986d5cc6ec74866c878adcb03406036
parentupdate gnutls-2.8.6 cross compilation fix (diff)
downloadembedded-cross-1deeaa617012a95fcb09a01aff4414efedf8b57b.tar.gz
embedded-cross-1deeaa617012a95fcb09a01aff4414efedf8b57b.tar.bz2
embedded-cross-1deeaa617012a95fcb09a01aff4414efedf8b57b.zip
bump cross compilatation aware pam-1.1.1-r2
Signed-off-by: Maksim 'max_posedon' Melnikau <maxposedon@gmail.com>
-rw-r--r--sys-libs/pam/Manifest8
-rw-r--r--sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch82
-rw-r--r--sys-libs/pam/files/Linux-PAM-1.1.0-xcrypt.patch16
-rw-r--r--sys-libs/pam/files/Linux-PAM-1.1.1+berkdb-5.patch12
-rw-r--r--sys-libs/pam/files/Linux-PAM-1.1.1-gentoodb.patch20
-rw-r--r--sys-libs/pam/files/Linux-PAM-1.1.1-xcrypt.patch21
-rw-r--r--sys-libs/pam/pam-1.1.1-r2.ebuild186
7 files changed, 345 insertions, 0 deletions
diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest
index 0869c8d..f69aa37 100644
--- a/sys-libs/pam/Manifest
+++ b/sys-libs/pam/Manifest
@@ -5,10 +5,18 @@ AUX Linux-PAM-1.0.4-cross-compile.patch 959 RMD160 ab3a1bb8dd3d5a376c47fda06651a
AUX Linux-PAM-1.0.4-fix-tests.patch 377 RMD160 8e8a27b78f02e4f8ed7e69f150e3ce5d4bd0a023 SHA1 aeae82aa6a298b899273dea6e99e4e1b2b446a38 SHA256 c0ff81fdf941c179f22050f2c5081ad4c70bbabb1aa29d3a64f87d0ab2e8060c
AUX Linux-PAM-1.1.0-debug.patch 565 RMD160 545e499fa45d7ec568387f4ee4fd8474cbfb3210 SHA1 31ee0fab111e55e6df270bb0483ef586d3177472 SHA256 8452c6397bb7dcbd1b7f9dd87c4021014d70adf0ceba6326c7428937503db3e9
AUX Linux-PAM-1.1.0-nonls.patch 367 RMD160 80ff3ce536e3bf3cb4e4448bf1062972b2b143bf SHA1 f67af3138312092514f61212073392779084d877 SHA256 7777ca2a86e716ee4cc5b2059d45bd526d8d887a81f5ec083a59076245c4a429
+AUX Linux-PAM-1.1.0-uclibc.patch 2643 RMD160 4294e27b8d90d8d9ee93c427d7eaf8af419f72f6 SHA1 aae4eb27892e1671c34d045a2d596d834aeb95e5 SHA256 b20ff20402778ff174694fe059afeecc6e8df8266d8ecae30419c7c930ffa5ae
+AUX Linux-PAM-1.1.0-xcrypt.patch 609 RMD160 115048d4d4d501c03ea5604c0f5bb6f10435fe8b SHA1 2e5cb04fa6d10c3b19800d555e30b590a651583f SHA256 98304d8534bc44c3acbf5300f06a25c30b3ec8ce9e19bcacd6112b8434857398
+AUX Linux-PAM-1.1.1+berkdb-5.patch 473 RMD160 a03806a7406c97944b7efbd0cc624c219fa13c20 SHA1 1cd13c810fb1c967734e78c1fdec75e176261544 SHA256 76c9cea947452e1d15ab815df7052bf74e434ab598dde7e5afab8e46cf8c7dd0
+AUX Linux-PAM-1.1.1-gentoodb.patch 1145 RMD160 a9f8a6adf67f4804eaf0dab51d48545bf2ab41cf SHA1 48b08cccd47f1fe63d3ac9c048e071c9955bf657 SHA256 7cbb9477d9a83b642e9f2a5e4d9be7c0831b7d131890482c623e08a2193beadc
+AUX Linux-PAM-1.1.1-xcrypt.patch 867 RMD160 8742c63058f01198b3c0bc5e6c0a430c90c65b90 SHA1 0c8830ceb483ff071f2aa5722c16c52183b3de55 SHA256 447b85fd045c688fa995791f58c6be45e73dec071dd43ee9773df1a6b7eb0486
AUX other.pamd 139 RMD160 d0f52fd0b830c86b0e933ebfaa8c2c1545337e43 SHA1 6d1f1a5f55c65f13b7fd35396c7f302c1946116e SHA256 3df996d0f5713c92598ac2d3be2b139ec79f3d1e2010bbc53da14c3dd55e64c2
AUX system-auth.pamd.epam 593 RMD160 262c88da0e6ac9ae09f0f1190de2f76396877807 SHA1 926c91cfa56c1480a7fe867ba902a94cf7e36ab7 SHA256 7896556f671ee88582babce4edd851fdc105a101bd8da48d2ef1dfd940b32eca
DIST Linux-PAM-1.0.4.tar.bz2 1004979 RMD160 8eacf6344663c0ce2f42d374d82d717211ca10e5 SHA1 60146a363b653324d4477dce4a3e999834a2d713 SHA256 13136d438f5748d08dcb2227e44e53a3c611351b96e11891052e0c8c2557f3ca
DIST Linux-PAM-1.1.0-docs.tar.bz2 494697 RMD160 324f4cdabbaaa85ac5afca9babea1bfe21e32285 SHA1 56cdc680d48a3dc1ffbd9becb855a4724d5f39ad SHA256 7d8e4455cf44937ccc0c7fb370d469c9bef33c68979b23f706fb37727bf8812b
DIST Linux-PAM-1.1.0.tar.bz2 1106379 RMD160 b57473ac39ef5c5ec22459e78e00abdbead396e5 SHA1 1ef5b91bf483ecf31e8f07c3c0322b397b13af70 SHA256 139b1abb0f1c402e443ad9083b5ff0512f4a5ae7bc806528e9d7eced13384ed7
+DIST Linux-PAM-1.1.1-docs.tar.bz2 495534 RMD160 182639c3fa79c96dbc263f2d16346345949bb0c8 SHA1 9e25f276546844bb5a58f30b5e5d5a97d25c5af5 SHA256 89950180aba6e5e05671c43d970d9738fd2b71b1421a2cf4d504f5c529586ac6
+DIST Linux-PAM-1.1.1.tar.bz2 1120055 RMD160 2d3c39cb2c3542d380e1331fef08c7086cc829d9 SHA1 8baf11b04396230ba7cf8b2bfb2d2bd75aab8fa6 SHA256 608d3eb9d7a5e1a7505fff62e6a583fdb6e52dc05bf54dc9661c5f395b1fb904
EBUILD pam-1.0.4.ebuild 5903 RMD160 7648a493da401d5c1510300d656979be3cf408b6 SHA1 eb745c0d87631d6d60503c1d64cf9dca68bb0308 SHA256 b6ec7a808780caa66ee91154542fd183d099abe1e47b0401e02618eeeb0d45b1
EBUILD pam-1.1.0.ebuild 4998 RMD160 db5d7014253428326f8ac1eb0448030583fa425c SHA1 f88307702510ac4d294d7d82010ee6559c6cf017 SHA256 6265cdae5b871bed62c80bb4c0710c29c74b685bb94ded007a839861337f41a5
+EBUILD pam-1.1.1-r2.ebuild 5785 RMD160 1dbfcae32ba0ffddfe8324a2c0ee69e20e494924 SHA1 893bd01262e5eed24b7696552ef639b77429db77 SHA256 58c5a86de47d33ba626043e56a0ffe45d16525b3992ea424d7f3d50238f68ce8
diff --git a/sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch b/sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch
new file mode 100644
index 0000000..6b8fa25
--- /dev/null
+++ b/sys-libs/pam/files/Linux-PAM-1.1.0-uclibc.patch
@@ -0,0 +1,82 @@
+Index: Linux-PAM-1.1.0/modules/pam_pwhistory/opasswd.c
+===================================================================
+--- Linux-PAM-1.1.0.orig/modules/pam_pwhistory/opasswd.c
++++ Linux-PAM-1.1.0/modules/pam_pwhistory/opasswd.c
+@@ -94,6 +94,23 @@ parse_entry (char *line, opwd *data)
+ return 0;
+ }
+
++static int
++compare_password(const char *newpass, const char *oldpass)
++{
++ char *outval;
++#ifdef HAVE_CRYPT_R
++ struct crypt_data output;
++
++ output.initialized = 0;
++
++ outval = crypt_r (newpass, oldpass, &output);
++#else
++ outval = crypt (newpass, oldpass);
++#endif
++
++ return strcmp(outval, oldpass) == 0;
++}
++
+ /* Check, if the new password is already in the opasswd file. */
+ int
+ check_old_password (pam_handle_t *pamh, const char *user,
+@@ -167,12 +184,9 @@ check_old_password (pam_handle_t *pamh,
+ if (found)
+ {
+ const char delimiters[] = ",";
+- struct crypt_data output;
+ char *running;
+ char *oldpass;
+
+- memset (&output, 0, sizeof (output));
+-
+ running = strdupa (entry.old_passwords);
+ if (running == NULL)
+ return PAM_BUF_ERR;
+@@ -180,7 +194,7 @@ check_old_password (pam_handle_t *pamh,
+ do {
+ oldpass = strsep (&running, delimiters);
+ if (oldpass && strlen (oldpass) > 0 &&
+- strcmp (crypt_r (newpass, oldpass, &output), oldpass) == 0)
++ compare_password(newpass, oldpass) )
+ {
+ if (debug)
+ pam_syslog (pamh, LOG_DEBUG, "New password already used");
+Index: Linux-PAM-1.1.0/configure.in
+===================================================================
+--- Linux-PAM-1.1.0.orig/configure.in
++++ Linux-PAM-1.1.0/configure.in
+@@ -458,7 +458,7 @@ AC_FUNC_MEMCMP
+ AC_FUNC_VPRINTF
+ AC_CHECK_FUNCS(fseeko gethostname gettimeofday lckpwdf mkdir select)
+ AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname)
+-AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
++AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
+ AC_CHECK_FUNCS(getgrouplist getline getdelim)
+ AC_CHECK_FUNCS(inet_ntop inet_pton ruserok_af)
+
+Index: Linux-PAM-1.1.0/modules/pam_timestamp/pam_timestamp.c
+===================================================================
+--- Linux-PAM-1.1.0.orig/modules/pam_timestamp/pam_timestamp.c
++++ Linux-PAM-1.1.0/modules/pam_timestamp/pam_timestamp.c
+@@ -200,7 +200,13 @@ check_login_time(const char *ruser, time
+ time_t oldest_login = 0;
+
+ setutent();
+- while(!getutent_r(&utbuf, &ut)) {
++ while(
++#ifdef HAVE_GETUTENT_R
++ !getutent_r(&utbuf, &ut)
++#else
++ (ut = getutent()) != NULL
++#endif
++ ) {
+ if (ut->ut_type != USER_PROCESS) {
+ continue;
+ }
diff --git a/sys-libs/pam/files/Linux-PAM-1.1.0-xcrypt.patch b/sys-libs/pam/files/Linux-PAM-1.1.0-xcrypt.patch
new file mode 100644
index 0000000..4f4872d
--- /dev/null
+++ b/sys-libs/pam/files/Linux-PAM-1.1.0-xcrypt.patch
@@ -0,0 +1,16 @@
+Index: Linux-PAM-1.1.1/configure.in
+===================================================================
+--- Linux-PAM-1.1.1.orig/configure.in
++++ Linux-PAM-1.1.1/configure.in
+@@ -360,6 +360,10 @@ AC_SUBST(LIBAUDIT)
+ AC_CHECK_HEADERS(xcrypt.h crypt.h)
++AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"],
++ [crypt_libs="xcrypt crypt"],
++ [crypt_libs="crypt"])
++
+ BACKUP_LIBS=$LIBS
+-AC_SEARCH_LIBS([crypt],[xcrypt crypt], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
++AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
+ AC_CHECK_FUNCS(crypt_r crypt_gensalt_rn)
+ LIBS=$BACKUP_LIBS
+ AC_SUBST(LIBCRYPT)
diff --git a/sys-libs/pam/files/Linux-PAM-1.1.1+berkdb-5.patch b/sys-libs/pam/files/Linux-PAM-1.1.1+berkdb-5.patch
new file mode 100644
index 0000000..ece9211
--- /dev/null
+++ b/sys-libs/pam/files/Linux-PAM-1.1.1+berkdb-5.patch
@@ -0,0 +1,12 @@
+Index: Linux-PAM-1.1.1/modules/pam_userdb/pam_userdb.c
+===================================================================
+--- Linux-PAM-1.1.1.orig/modules/pam_userdb/pam_userdb.c
++++ Linux-PAM-1.1.1/modules/pam_userdb/pam_userdb.c
+@@ -30,6 +30,7 @@
+ #else
+ # ifdef HAVE_DB_H
+ # define DB_DBM_HSEARCH 1 /* use the dbm interface */
++# define HAVE_DBM /* for BerkDB 5.0 and later */
+ # include <db.h>
+ # else
+ # error "failed to find a libdb or equivalent"
diff --git a/sys-libs/pam/files/Linux-PAM-1.1.1-gentoodb.patch b/sys-libs/pam/files/Linux-PAM-1.1.1-gentoodb.patch
new file mode 100644
index 0000000..0334496
--- /dev/null
+++ b/sys-libs/pam/files/Linux-PAM-1.1.1-gentoodb.patch
@@ -0,0 +1,20 @@
+Index: Linux-PAM-1.1.1/configure.in
+===================================================================
+--- Linux-PAM-1.1.1.orig/configure.in
++++ Linux-PAM-1.1.1/configure.in
+@@ -389,10 +389,11 @@ AC_ARG_WITH([db-uniquename],
+ AS_HELP_STRING([--with-db-uniquename=extension],[Unique name for db libraries and functions.]))
+ if test x"$WITH_DB" != xno ; then
+ if test x"$WITH_DB" = xyes -o x"$WITH_DB" = xdb ; then
+- AC_CHECK_LIB([db$with_db_uniquename], [db_create$with_db_uniquename], LIBDB="-ldb$with_db_uniquename", LIBDB="")
+- if test -z "$LIBDB" ; then
+- AC_CHECK_LIB([db$with_db_uniquename], [dbm_store$with_db_uniquename], LIBDB="-ldb$with_db_uniquename", LIBDB="")
+- fi
++ old_libs=$LIBS
++ LIBS="$LIBS -ldb$with_db_uniquename"
++ AC_CHECK_FUNCS([db_create$with_db_uniquename db_create dbm_store$with_db_uniquename dbm_store],
++ [LIBDB="-ldb$with_db_uniquename"; break])
++ LIBS=$old_libs
+ fi
+ if test -z "$LIBDB" ; then
+ AC_CHECK_LIB([ndbm],[dbm_store], LIBDB="-lndbm", LIBDB="")
diff --git a/sys-libs/pam/files/Linux-PAM-1.1.1-xcrypt.patch b/sys-libs/pam/files/Linux-PAM-1.1.1-xcrypt.patch
new file mode 100644
index 0000000..f842da7
--- /dev/null
+++ b/sys-libs/pam/files/Linux-PAM-1.1.1-xcrypt.patch
@@ -0,0 +1,21 @@
+Index: Linux-PAM-1.1.1/configure.in
+===================================================================
+--- Linux-PAM-1.1.1.orig/configure.in
++++ Linux-PAM-1.1.1/configure.in
+@@ -361,10 +361,14 @@ AM_CONDITIONAL([HAVE_AUDIT_TTY_STATUS],
+ [test "x$HAVE_AUDIT_TTY_STATUS" = xyes])
+
+ AC_CHECK_HEADERS(xcrypt.h crypt.h)
++AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"],
++ [crypt_libs="xcrypt crypt"],
++ [crypt_libs="crypt"])
++
+ BACKUP_LIBS=$LIBS
+-AC_SEARCH_LIBS([crypt],[xcrypt crypt], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
++AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
+ AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
+-Libs=$BACKUP_LIBS
++LIBS=$BACKUP_LIBS
+ AC_SUBST(LIBCRYPT)
+ if test "$LIBCRYPT" = "-lxcrypt" -a "$ac_cv_header_xcrypt_h" = "yes" ; then
+ AC_DEFINE([HAVE_LIBXCRYPT], 1, [Define to 1 if xcrypt support should be compiled in.])
diff --git a/sys-libs/pam/pam-1.1.1-r2.ebuild b/sys-libs/pam/pam-1.1.1-r2.ebuild
new file mode 100644
index 0000000..d5f433e
--- /dev/null
+++ b/sys-libs/pam/pam-1.1.1-r2.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-1.1.1-r2.ebuild,v 1.4 2010/05/22 09:09:08 jlec Exp $
+
+EAPI="3"
+
+inherit libtool multilib eutils autotools pam toolchain-funcs flag-o-matic db-use
+
+MY_PN="Linux-PAM"
+MY_P="${MY_PN}-${PV}"
+
+HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
+DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
+
+SRC_URI="mirror://kernel/linux/libs/pam/library/${MY_P}.tar.bz2
+ mirror://kernel/linux/libs/pam/documentation/${MY_P}-docs.tar.bz2"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE="cracklib nls elibc_FreeBSD selinux vim-syntax audit test elibc_glibc debug berkdb"
+
+RDEPEND="nls? ( virtual/libintl )
+ cracklib? ( >=sys-libs/cracklib-2.8.3 )
+ audit? ( sys-process/audit )
+ selinux? ( >=sys-libs/libselinux-1.28 )
+ berkdb? ( sys-libs/db )
+ elibc_glibc? ( >=sys-libs/glibc-2.7 )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ nls? ( sys-devel/gettext )"
+PDEPEND="sys-auth/pambase
+ vim-syntax? ( app-vim/pam-syntax )"
+RDEPEND="${RDEPEND}
+ !sys-auth/pam_userdb"
+
+S="${WORKDIR}/${MY_P}"
+
+PROVIDE="virtual/pam"
+
+check_old_modules() {
+ local retval="0"
+
+ if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | fgrep -q pam_stack.so; then
+ eerror ""
+ eerror "Your current setup is using the pam_stack module."
+ eerror "This module is deprecated and no longer supported, and since version"
+ eerror "0.99 is no longer installed, nor provided by any other package."
+ eerror "The package will be built (to allow binary package builds), but will"
+ eerror "not be installed."
+ eerror "Please replace pam_stack usage with proper include directive usage,"
+ eerror "following the PAM Upgrade guide at the following URL"
+ eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml"
+ eerror ""
+
+ retval=1
+ fi
+
+ if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | egrep -q 'pam_(pwdb|console)'; then
+ eerror ""
+ eerror "Your current setup is using one or more of the following modules,"
+ eerror "that are not built or supported anymore:"
+ eerror "pam_pwdb, pam_console"
+ eerror "If you are in real need for these modules, please contact the maintainers"
+ eerror "of PAM through http://bugs.gentoo.org/ providing information about its"
+ eerror "use cases."
+ eerror "Please also make sure to read the PAM Upgrade guide at the following URL:"
+ eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml"
+ eerror ""
+
+ retval=1
+ fi
+
+ return $retval
+}
+
+pkg_setup() {
+ check_old_modules
+}
+
+src_prepare() {
+ # Avoid building xtests during "make all"; note that for what
+ # we're concerned xtests are not even executed, so we should
+ # probably use EXTRA_PROGRAMS.
+ epatch "${FILESDIR}/${MY_PN}-0.99.8.1-xtests.patch"
+
+ # Fix building on uClibc; it is added since 1.1.1 but applies to
+ # 1.1.0 as well.
+ epatch "${FILESDIR}/${MY_PN}-1.1.0-uclibc.patch"
+
+ # Fix tests to find Berkeley DB as installed by Gentoo (with a
+ # library suffix but no suffix on the ELF symbols).
+ epatch "${FILESDIR}/${MY_PN}-1.1.1-gentoodb.patch"
+
+ # make it possible to skip libxcrypt detection if header is not
+ # found
+ epatch "${FILESDIR}/${MY_PN}-1.1.1-xcrypt.patch"
+
+ # fix building with Berkeley DB 5.0 and later; now defining
+ # DB_DBM_HSEARCH is not enough; bug #319831
+ epatch "${FILESDIR}/${MY_PN}-1.1.1+berkdb-5.patch"
+
+ # Fix building of doc/specs
+ epatch "${FILESDIR}/${MY_PN}-1.0.4-cross-compile.patch"
+
+ # Remove libtool-2 libtool macros, see bug 261167
+ rm m4/libtool.m4 m4/lt*.m4 || die "rm libtool macros failed."
+
+ eautoreconf
+
+ elibtoolize
+}
+
+src_configure() {
+ local myconf
+
+ if use hppa || use elibc_FreeBSD; then
+ myconf="${myconf} --disable-pie"
+ fi
+
+ # Disable automatic detection of libxcrypt; we _don't_ want the
+ # user to link libxcrypt in by default, since we won't track the
+ # dependency and allow to break PAM this way.
+ export ac_cv_header_xcrypt_h=no
+
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --enable-securedir="${EPREFIX}"/$(get_libdir)/security \
+ --enable-isadir="${EPREFIX}"/$(get_libdir)/security \
+ $(use_enable nls) \
+ $(use_enable selinux) \
+ $(use_enable cracklib) \
+ $(use_enable audit) \
+ $(use_enable debug) \
+ $(use_enable berkdb db) \
+ --with-db-uniquename=-$(db_findver sys-libs/db) \
+ --disable-dependency-tracking \
+ --disable-prelude \
+ ${myconf}
+}
+
+src_compile() {
+ emake sepermitlockdir="${EPREFIX}/var/run/sepermit" || die "emake failed"
+}
+
+src_test() {
+ # explicitly allow parallel-build during testing
+ emake sepermitlockdir="${EPREFIX}/var/run/sepermit" check || die "emake check failed"
+}
+
+src_install() {
+ local lib
+
+ emake DESTDIR="${D}" install \
+ sepermitlockdir="${EPREFIX}/var/run/sepermit" || die "make install failed"
+
+ # Need to be suid
+ fperms u+s /sbin/unix_chkpwd
+
+ gen_usr_ldscript -a pam pamc pam_misc
+
+ # create extra symlinks just in case something depends on them...
+ for lib in pam pamc pam_misc; do
+ if ! [[ -f "${ED}"/$(get_libdir)/lib${lib}$(get_libname) ]]; then
+ dosym lib${lib}$(get_libname 0) /$(get_libdir)/lib${lib}$(get_libname)
+ fi
+ done
+
+ dodoc CHANGELOG ChangeLog README AUTHORS Copyright NEWS || die
+
+ docinto modules
+ for dir in modules/pam_*; do
+ newdoc "${dir}"/README README."$(basename "${dir}")"
+ done
+
+ # Get rid of the .la files. We certainly don't need them for PAM
+ # modules, and libpam is installed as a shared object only, so we
+ # don't ned them for static linking either.
+ find "${D}" -name '*.la' -delete
+}
+
+pkg_preinst() {
+ check_old_modules || die "deprecated PAM modules still used"
+}