Magellan Linux

Contents of /branches/R11-stable/core/pam/pam-1.1.6-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19597 - (show annotations) (download)
Mon Oct 7 08:23:37 2013 UTC (10 years, 6 months ago) by niro
File size: 3414 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="pam"
4 PVER="1.1.6"
5 PBUILD="r4"
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
43 # the strip option is not allowed, pam needs libpam.a
44 msetfeature "!strip"
45 CFLAGS="${CFLAGS/-s/}"
46 CXXFLAGS="${CFLAGS}"
47
48 src_prepare()
49 {
50 munpack ${SRCFILE} || die
51 SRCDIR=${PAMCONFIG_SRCDIR} munpack ${PAMCONFIG_SRCFILE} || die
52
53 # add pam_console module (Np1 is required!)
54 mpatch -Np1 ${PNAME}-1.1.4-pam-console.patch || die
55
56 # make sure to install readmes from all modules
57 local abi
58 for abi in ${MULTILIB_ABIS}
59 do
60 cd ${SRCDIR}-${abi}
61 install -d doc/txts || die
62 for readme in modules/pam_*/README
63 do
64 cp -f "${readme}" doc/txts/README.$(dirname "${readme}" | \
65 sed -e 's|^modules/||')
66 done
67
68 # search in /usr/lib/cracklib
69 sed -i 's|DICT_DIR_CANDIDATES="|&/lib /usr/lib/cracklib |' configure || die
70 done
71 }
72
73 src_compile()
74 {
75 export CFLAGS="${CFLAGS} -fPIC"
76
77 mconfigure \
78 --libdir=/usr/'$(mlibdir)' \
79 --sbindir=/usr/sbin \
80 --docdir=/usr/share/doc/${PNAME}-${PVER} \
81 --enable-securedir=/usr/'$(mlibdir)'/security \
82 --enable-isadir=/usr/'$(mlibdir)'/security \
83 --enable-read-both-confs \
84 || die
85
86 # python stuff in docs gives sandbox problems
87 all-abis "sed -i 's|modules doc examples|modules|' Makefile" || die
88
89 mmake -j1 || die
90 }
91
92 src_install()
93 {
94 # needed directories
95 minstalldir /etc/pam.d || die
96 all-abis minstalldir /usr/'$(mlibdir)' || die
97 minstalldir /usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
98
99 mmake DESTDIR=${BINDIR} LDCONFIG="" install || die
100
101 # fix permissions
102 mchmod 4755 /usr/sbin/unix_chkpwd || die
103
104 # install missing man-pages
105 minstallman doc/man/*.3 || die
106 minstallman doc/man/*.8 || die
107
108 # missing empty dirs
109 mkeepdir /etc/security/console.perms.d || die
110 mkeepdir /etc/security/namespace.d || die
111 mkeepdir /etc/security/limits.d || die
112
113 # install our pam setup
114 SRCDIR=${PAMCONFIG_SRCDIR} mmake DESTDIR=${BINDIR} install || die
115
116 minstalldocs CHANGELOG Copyright README || die
117 minstallfile doc/specs/\*.raw /usr/share/doc/${PNAME}-${PVER}/spec || die
118 minstallfile doc/specs/\*.txt /usr/share/doc/${PNAME}-${PVER}/spec || die
119 minstallfile doc/txts/\* /usr/share/doc/${PNAME}-${PVER}/txt || die
120 gzip -9r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
121
122 # check for pam_cracklib existence or die
123 [ -e ${BINDIR}/usr/$(mlibdir)/security/pam_cracklib.so ] || die "pam_cracklib not found, your sys-libs/cracklib installation may be corrupt!"
124 }