Contents of /trunk/core/pam/pam-1.2.1-r1.smage2
Parent Directory | Revision Log
Revision 26993 -
(show annotations)
(download)
Fri Nov 6 10:47:13 2015 UTC (8 years, 7 months ago) by niro
File size: 3404 byte(s)
Fri Nov 6 10:47:13 2015 UTC (8 years, 7 months ago) by niro
File size: 3404 byte(s)
-removed all hacks
1 | # $Id$ |
2 | |
3 | PNAME="pam" |
4 | PVER="1.2.1" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="sys-libs" |
8 | |
9 | DESCRIPTION="Pluggable Authentication Modules." |
10 | HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= sys-libs/cracklib-2.9 |
14 | >= dev-db/db-6.1" |
15 | |
16 | SDEPEND=">= sys-dev/autoconf-5 |
17 | >= sys-dev/automake-4 |
18 | >= sys-dev/flex-2.5.35" |
19 | |
20 | SRCFILE="Linux-PAM-${PVER}.tar.bz2" |
21 | SRCDIR="${BUILDDIR}/Linux-PAM-${PVER}" |
22 | |
23 | PAMCONFIG_PVER="1.6" |
24 | PAMCONFIG_SRCFILE="pam-config-${PAMCONFIG_PVER}.tar.bz2" |
25 | PAMCONFIG_SRCDIR="${BUILDDIR}/pam-config-${PAMCONFIG_PVER}" |
26 | |
27 | sminclude mtools multilib |
28 | |
29 | SRC_URI=( |
30 | http://linux-pam.org/library/${SRCFILE} |
31 | mirror://${PNAME}/${SRCFILE} |
32 | mirror://${PNAME}/${PAMCONFIG_SRCFILE} |
33 | mirror://${PNAME}/${PNAME}-1.1.8-full-relro.patch |
34 | ) |
35 | |
36 | UP2DATE="updatecmd http://linux-pam.org/library/ | highesttarball" |
37 | |
38 | # the strip option is not allowed, pam needs libpam.a |
39 | msetfeature "!strip" |
40 | CFLAGS="${CFLAGS/-s/}" |
41 | CXXFLAGS="${CFLAGS}" |
42 | |
43 | src_prepare() |
44 | { |
45 | munpack ${SRCFILE} || die |
46 | SRCDIR=${PAMCONFIG_SRCDIR} munpack ${PAMCONFIG_SRCFILE} || die |
47 | |
48 | mpatch ${PNAME}-1.1.8-full-relro.patch || die |
49 | mautoreconf || die |
50 | |
51 | # make sure to install readmes from all modules |
52 | local abi |
53 | for abi in ${MULTILIB_ABIS} |
54 | do |
55 | cd ${SRCDIR}-${abi} |
56 | install -d doc/txts || die |
57 | for readme in modules/pam_*/README |
58 | do |
59 | cp -f "${readme}" doc/txts/README.$(dirname "${readme}" | \ |
60 | sed -e 's|^modules/||') |
61 | done |
62 | |
63 | # search in /usr/lib/cracklib |
64 | sed -i 's|DICT_DIR_CANDIDATES="|&/lib /usr/lib/cracklib |' configure || die |
65 | done |
66 | } |
67 | |
68 | src_compile() |
69 | { |
70 | mconfigure \ |
71 | --libdir=/usr/'$(mlibdir)' \ |
72 | --sbindir=/usr/sbin \ |
73 | --docdir=/usr/share/doc/${PNAME}-${PVER} \ |
74 | --enable-securedir=/usr/'$(mlibdir)'/security \ |
75 | --enable-isadir=/usr/'$(mlibdir)'/security \ |
76 | --enable-read-both-confs \ |
77 | || die |
78 | |
79 | # python stuff in docs gives sandbox problems |
80 | all-abis "sed -i 's|modules doc examples|modules|' Makefile" || die |
81 | |
82 | mmake -j1 || die |
83 | } |
84 | |
85 | src_install() |
86 | { |
87 | # needed directories |
88 | minstalldir /etc/pam.d || die |
89 | all-abis minstalldir /usr/'$(mlibdir)' || die |
90 | minstalldir /usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die |
91 | |
92 | mmake -j1 DESTDIR=${BINDIR} install || die |
93 | |
94 | # fix permissions |
95 | mchmod 4755 /usr/sbin/unix_chkpwd || die |
96 | |
97 | # install missing man-pages |
98 | minstallman doc/man/*.3 || die |
99 | minstallman doc/man/*.8 || die |
100 | |
101 | # missing empty dirs |
102 | mkeepdir /etc/security/console.perms.d || die |
103 | mkeepdir /etc/security/namespace.d || die |
104 | mkeepdir /etc/security/limits.d || die |
105 | |
106 | # install our pam setup |
107 | SRCDIR=${PAMCONFIG_SRCDIR} mmake DESTDIR=${BINDIR} install || die |
108 | |
109 | minstalldocs CHANGELOG Copyright README || die |
110 | minstallfile doc/specs/\*.raw /usr/share/doc/${PNAME}-${PVER}/spec || die |
111 | minstallfile doc/specs/\*.txt /usr/share/doc/${PNAME}-${PVER}/spec || die |
112 | minstallfile doc/txts/\* /usr/share/doc/${PNAME}-${PVER}/txt || die |
113 | gzip -9r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die |
114 | |
115 | # check for pam_cracklib existence or die |
116 | [ -e ${BINDIR}/usr/$(mlibdir)/security/pam_cracklib.so ] || die "pam_cracklib not found, your sys-libs/cracklib installation may be corrupt!" |
117 | } |
118 | |
119 | postinstall() |
120 | { |
121 | local i |
122 | local conf="halt reboot poweroff" |
123 | |
124 | # remove deprecated pam configs |
125 | for i in ${conf} |
126 | do |
127 | if [ -f ${MROOT}/etc/pam.d/${i} ]] |
128 | then |
129 | rm ${MROOT}/etc/pam.d/${i} |
130 | fi |
131 | done |
132 | |
133 | # remove deprected nproc.conf |
134 | if [ -f ${MROOT}/etc/security/limits.d/nproc.conf ] |
135 | then |
136 | rm ${MROOT}/etc/security/limits.d/nproc.conf |
137 | fi |
138 | } |