Annotation of /branches/R11-stable/core/pam/pam-1.1.8-r1.smage2
Parent Directory | Revision Log
Revision 20804 -
(hide annotations)
(download)
Tue Feb 11 09:50:30 2014 UTC (10 years, 7 months ago) by niro
File size: 3536 byte(s)
Tue Feb 11 09:50:30 2014 UTC (10 years, 7 months ago) by niro
File size: 3536 byte(s)
-release branches/R11-stable
1 | niro | 20528 | # $Id$ |
2 | |||
3 | PNAME="pam" | ||
4 | PVER="1.1.8" | ||
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.0" | ||
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.5" | ||
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 | https://fedorahosted.org/releases/l/i/linux-pam/${SRCFILE} | ||
31 | http://www.kernel.org/pub/linux/libs/pam/library/${SRCFILE} | ||
32 | http://www.kernel.org/pub/linux/libs/pam/pre/library/${SRCFILE} | ||
33 | mirror://${PNAME}/${SRCFILE} | ||
34 | mirror://${PNAME}/${PNAME}-1.1.4-pam-console.patch | ||
35 | mirror://${PNAME}/${PAMCONFIG_SRCFILE} | ||
36 | ) | ||
37 | |||
38 | # dev releases | ||
39 | #UP2DATE="updatecmd http://www.kernel.org/pub/linux/libs/pam/pre/library | lasttarball" | ||
40 | # stable releases | ||
41 | #UP2DATE="updatecmd http://www.kernel.org/pub/linux/libs/pam/library | lasttarball" | ||
42 | # fedora hosted pam version | ||
43 | UP2DATE="updatecmd 'https://fedorahosted.org/releases/l/i/linux-pam/?C=M;O=A' | lasttarball" | ||
44 | |||
45 | # the strip option is not allowed, pam needs libpam.a | ||
46 | msetfeature "!strip" | ||
47 | CFLAGS="${CFLAGS/-s/}" | ||
48 | CXXFLAGS="${CFLAGS}" | ||
49 | |||
50 | src_prepare() | ||
51 | { | ||
52 | munpack ${SRCFILE} || die | ||
53 | SRCDIR=${PAMCONFIG_SRCDIR} munpack ${PAMCONFIG_SRCFILE} || die | ||
54 | |||
55 | # add pam_console module (Np1 is required!) | ||
56 | mpatch -Np1 ${PNAME}-1.1.4-pam-console.patch || die | ||
57 | |||
58 | # make sure to install readmes from all modules | ||
59 | local abi | ||
60 | for abi in ${MULTILIB_ABIS} | ||
61 | do | ||
62 | cd ${SRCDIR}-${abi} | ||
63 | install -d doc/txts || die | ||
64 | for readme in modules/pam_*/README | ||
65 | do | ||
66 | cp -f "${readme}" doc/txts/README.$(dirname "${readme}" | \ | ||
67 | sed -e 's|^modules/||') | ||
68 | done | ||
69 | |||
70 | # search in /usr/lib/cracklib | ||
71 | sed -i 's|DICT_DIR_CANDIDATES="|&/lib /usr/lib/cracklib |' configure || die | ||
72 | done | ||
73 | } | ||
74 | |||
75 | src_compile() | ||
76 | { | ||
77 | export CFLAGS="${CFLAGS} -fPIC" | ||
78 | |||
79 | mconfigure \ | ||
80 | --libdir=/usr/'$(mlibdir)' \ | ||
81 | --sbindir=/usr/sbin \ | ||
82 | --docdir=/usr/share/doc/${PNAME}-${PVER} \ | ||
83 | --enable-securedir=/usr/'$(mlibdir)'/security \ | ||
84 | --enable-isadir=/usr/'$(mlibdir)'/security \ | ||
85 | --enable-read-both-confs \ | ||
86 | || die | ||
87 | |||
88 | # python stuff in docs gives sandbox problems | ||
89 | all-abis "sed -i 's|modules doc examples|modules|' Makefile" || die | ||
90 | |||
91 | mmake -j1 || die | ||
92 | } | ||
93 | |||
94 | src_install() | ||
95 | { | ||
96 | # needed directories | ||
97 | minstalldir /etc/pam.d || die | ||
98 | all-abis minstalldir /usr/'$(mlibdir)' || die | ||
99 | minstalldir /usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die | ||
100 | |||
101 | mmake DESTDIR=${BINDIR} LDCONFIG="" install || die | ||
102 | |||
103 | # fix permissions | ||
104 | mchmod 4755 /usr/sbin/unix_chkpwd || die | ||
105 | |||
106 | # install missing man-pages | ||
107 | minstallman doc/man/*.3 || die | ||
108 | minstallman doc/man/*.8 || die | ||
109 | |||
110 | # missing empty dirs | ||
111 | mkeepdir /etc/security/console.perms.d || die | ||
112 | mkeepdir /etc/security/namespace.d || die | ||
113 | mkeepdir /etc/security/limits.d || die | ||
114 | |||
115 | # install our pam setup | ||
116 | SRCDIR=${PAMCONFIG_SRCDIR} mmake DESTDIR=${BINDIR} install || die | ||
117 | |||
118 | minstalldocs CHANGELOG Copyright README || die | ||
119 | minstallfile doc/specs/\*.raw /usr/share/doc/${PNAME}-${PVER}/spec || die | ||
120 | minstallfile doc/specs/\*.txt /usr/share/doc/${PNAME}-${PVER}/spec || die | ||
121 | minstallfile doc/txts/\* /usr/share/doc/${PNAME}-${PVER}/txt || die | ||
122 | gzip -9r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die | ||
123 | |||
124 | # check for pam_cracklib existence or die | ||
125 | [ -e ${BINDIR}/usr/$(mlibdir)/security/pam_cracklib.so ] || die "pam_cracklib not found, your sys-libs/cracklib installation may be corrupt!" | ||
126 | } |