/[gentoo-x86]/sys-libs/pam/pam-1.1.5.ebuild
Gentoo

Contents of /sys-libs/pam/pam-1.1.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Thu Jul 5 16:17:52 2012 UTC (2 years, 1 month ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +3 -1 lines
Add patch to build with glibc 2.16. Thanks to Stevan Bajić in bug #424920 for the patch. Also remove old version.

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 jdhore 1.8 # Copyright 1999-2012 Gentoo Foundation
2 flameeyes 1.1 # Distributed under the terms of the GNU General Public License v2
3 flameeyes 1.9 # $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-1.1.5.ebuild,v 1.8 2012/05/04 07:33:11 jdhore Exp $
4 flameeyes 1.1
5     EAPI="4"
6    
7     inherit libtool multilib eutils pam toolchain-funcs flag-o-matic db-use
8    
9     MY_PN="Linux-PAM"
10     MY_P="${MY_PN}-${PV}"
11    
12 flameeyes 1.5 HOMEPAGE="https://fedorahosted.org/linux-pam/"
13 flameeyes 1.1 DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
14    
15     SRC_URI="https://fedorahosted.org/releases/l/i/linux-pam/${MY_P}.tar.bz2
16     https://fedorahosted.org/releases/l/i/linux-pam/${MY_P}-docs.tar.bz2"
17    
18     LICENSE="|| ( BSD GPL-2 )"
19     SLOT="0"
20 xarthisius 1.7 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
21 flameeyes 1.1 IUSE="cracklib nls elibc_FreeBSD selinux vim-syntax audit test elibc_glibc debug berkdb nis"
22    
23     RDEPEND="nls? ( virtual/libintl )
24     cracklib? ( >=sys-libs/cracklib-2.8.3 )
25     audit? ( sys-process/audit )
26     selinux? ( >=sys-libs/libselinux-1.28 )
27     berkdb? ( sys-libs/db )
28     elibc_glibc? (
29     >=sys-libs/glibc-2.7
30     nis? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) )
31     )"
32     DEPEND="${RDEPEND}
33     >=sys-devel/libtool-2
34     sys-devel/flex
35     nls? ( sys-devel/gettext )
36 jdhore 1.8 virtual/pkgconfig"
37 flameeyes 1.1 PDEPEND="sys-auth/pambase
38     vim-syntax? ( app-vim/pam-syntax )"
39     RDEPEND="${RDEPEND}
40     !sys-auth/openpam
41     !sys-auth/pam_userdb"
42    
43     S="${WORKDIR}/${MY_P}"
44    
45     check_old_modules() {
46     local retval="0"
47    
48     if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | fgrep -q pam_stack.so; then
49     eerror ""
50     eerror "Your current setup is using the pam_stack module."
51     eerror "This module is deprecated and no longer supported, and since version"
52     eerror "0.99 is no longer installed, nor provided by any other package."
53     eerror "The package will be built (to allow binary package builds), but will"
54     eerror "not be installed."
55     eerror "Please replace pam_stack usage with proper include directive usage,"
56     eerror "following the PAM Upgrade guide at the following URL"
57     eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml"
58     eerror ""
59    
60     retval=1
61     fi
62    
63     if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | egrep -q 'pam_(pwdb|console)'; then
64     eerror ""
65     eerror "Your current setup is using one or more of the following modules,"
66     eerror "that are not built or supported anymore:"
67     eerror "pam_pwdb, pam_console"
68     eerror "If you are in real need for these modules, please contact the maintainers"
69     eerror "of PAM through http://bugs.gentoo.org/ providing information about its"
70     eerror "use cases."
71     eerror "Please also make sure to read the PAM Upgrade guide at the following URL:"
72     eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml"
73     eerror ""
74    
75     retval=1
76     fi
77    
78     return $retval
79     }
80    
81     pkg_setup() {
82     check_old_modules
83     }
84    
85     src_prepare() {
86 flameeyes 1.9 epatch "${FILESDIR}"/${MY_P}+glibc-2.16.patch
87    
88 flameeyes 1.1 elibtoolize
89     }
90    
91     src_configure() {
92     local myconf
93    
94     if use hppa || use elibc_FreeBSD; then
95     myconf="${myconf} --disable-pie"
96     fi
97    
98     # Disable automatic detection of libxcrypt; we _don't_ want the
99     # user to link libxcrypt in by default, since we won't track the
100     # dependency and allow to break PAM this way.
101     export ac_cv_header_xcrypt_h=no
102    
103     econf \
104     --disable-dependency-tracking \
105     --enable-fast-install \
106     --libdir="${EPREFIX}"/usr/$(get_libdir) \
107     --docdir="${EPREFIX}"/usr/share/doc/${PF} \
108     --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
109     --enable-securedir="${EPREFIX}"/$(get_libdir)/security \
110     --enable-isadir="${EPREFIX}"/$(get_libdir)/security \
111     $(use_enable nls) \
112     $(use_enable selinux) \
113     $(use_enable cracklib) \
114     $(use_enable audit) \
115     $(use_enable debug) \
116     $(use_enable berkdb db) \
117     $(use_enable nis) \
118     --with-db-uniquename=-$(db_findver sys-libs/db) \
119     --disable-prelude \
120     ${myconf}
121     }
122    
123     src_compile() {
124     emake sepermitlockdir="${EPREFIX}/var/run/sepermit" || die "emake failed"
125     }
126    
127     src_test() {
128     # explicitly allow parallel-build during testing
129     emake sepermitlockdir="${EPREFIX}/var/run/sepermit" check || die "emake check failed"
130     }
131    
132     src_install() {
133     local lib
134    
135     emake DESTDIR="${D}" install \
136     sepermitlockdir="${EPREFIX}/var/run/sepermit" || die "make install failed"
137    
138     # Need to be suid
139     fperms u+s /sbin/unix_chkpwd
140    
141     gen_usr_ldscript -a pam pamc pam_misc
142    
143     # create extra symlinks just in case something depends on them...
144     for lib in pam pamc pam_misc; do
145     if ! [[ -f "${ED}"/$(get_libdir)/lib${lib}$(get_libname) ]]; then
146     dosym lib${lib}$(get_libname 0) /$(get_libdir)/lib${lib}$(get_libname)
147     fi
148     done
149    
150     dodoc CHANGELOG ChangeLog README AUTHORS Copyright NEWS
151    
152     docinto modules
153     for dir in modules/pam_*; do
154     newdoc "${dir}"/README README."$(basename "${dir}")"
155     done
156    
157     # Get rid of the .la files. We certainly don't need them for PAM
158     # modules, and libpam is installed as a shared object only, so we
159     # don't need them for static linking either.
160     find "${D}" -name '*.la' -delete
161     }
162    
163     pkg_preinst() {
164     check_old_modules || die "deprecated PAM modules still used"
165     }
166    
167     pkg_postinst() {
168     ewarn "Some software with pre-loaded PAM libraries might experience"
169     ewarn "warnings or failures related to missing symbols and/or versions"
170     ewarn "after any update. While unfortunate this is a limit of the"
171     ewarn "implementation of PAM and the software, and it requires you to"
172     ewarn "restart the software manually after the update."
173     ewarn ""
174     ewarn "You can get a list of such software running a command like"
175     ewarn " lsof / | egrep -i 'del.*libpam\\.so'"
176     ewarn ""
177     ewarn "Alternatively, simply reboot your system."
178     if [ -x "${ROOT}"/var/log/tallylog ] ; then
179     elog ""
180     elog "Because of a bug present up to version 1.1.1-r2, you have"
181     elog "an executable /var/log/tallylog file. You can safely"
182     elog "correct it by running the command"
183     elog " chmod -x /var/log/tallylog"
184     elog ""
185     fi
186     }

  ViewVC Help
Powered by ViewVC 1.1.20