Magellan Linux

Contents of /trunk/core/pam/pam-1.1.5-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12753 - (show annotations) (download)
Mon Jul 2 14:37:15 2012 UTC (11 years, 10 months ago) by niro
File size: 4019 byte(s)
-marked unstable
1 # $Id$
2
3 PNAME="pam"
4 PVER="1.1.5"
5 PBUILD="r4"
6
7 PCAT="sys-libs"
8 STATE="unstable"
9
10 DESCRIPTION="Pluggable Authentication Modules."
11 HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
12
13 DEPEND=">= virtual/glibc
14 >= sys-libs/cracklib-2.8
15 >= dev-db/db-5.3"
16
17 SDEPEND=">= sys-dev/autoconf-5
18 >= sys-dev/automake-4
19 >= sys-dev/flex-2.5.35"
20
21 SRCFILE="Linux-PAM-${PVER}.tar.bz2"
22 SRCDIR="${BUILDDIR}/Linux-PAM-${PVER}"
23
24 sminclude mtools multilib
25
26 PAMD_HALT_REV=1.3
27 PAMD_OTHER_REV=1.3
28 PAMD_SYSAUTH_REV=1.3
29
30 SRC_URI=(
31 https://fedorahosted.org/releases/l/i/linux-pam/${SRCFILE}
32 http://www.kernel.org/pub/linux/libs/pam/library/${SRCFILE}
33 http://www.kernel.org/pub/linux/libs/pam/pre/library/${SRCFILE}
34 mirror://${PNAME}/${SRCFILE}
35 mirror://${PNAME}/${PNAME}-1.1.4-pam-console.patch
36 mirror://${PNAME}/halt-${PAMD_HALT_REV}
37 mirror://${PNAME}/other-${PAMD_OTHER_REV}
38 mirror://${PNAME}/system-auth-${PAMD_SYSAUTH_REV}
39 mirror://${PNAME}/system-login
40 mirror://${PNAME}/system-local-login
41 mirror://${PNAME}/system-remote-login
42 mirror://${PNAME}/system-services
43 mirror://${PNAME}/securetty
44 mirror://${PNAME}/console.handlers
45 )
46
47 # dev releases
48 #UP2DATE="updatecmd http://www.kernel.org/pub/linux/libs/pam/pre/library | lasttarball"
49 # stable releases
50 UP2DATE="updatecmd http://www.kernel.org/pub/linux/libs/pam/library | lasttarball"
51
52 # the strip option is not allowed, pam needs libpam.a
53 msetfeature "!strip"
54 CFLAGS="${CFLAGS/-s/}"
55 CXXFLAGS="${CFLAGS}"
56
57 src_prepare()
58 {
59 munpack ${SRCFILE} || die
60
61 # add pam_console module
62 mpatch ${PNAME}-1.1.4-pam-console.patch || die
63
64 # make sure to install readmes from all modules
65 local abi
66 for abi in ${MULTILIB_ABIS}
67 do
68 cd ${SRCDIR}-${abi}
69 install -d doc/txts || die
70 for readme in modules/pam_*/README
71 do
72 cp -f "${readme}" doc/txts/README.$(dirname "${readme}" | \
73 sed -e 's|^modules/||')
74 done
75
76 # search in /usr/lib/cracklib
77 sed -i 's|DICT_DIR_CANDIDATES="|&/lib /usr/lib/cracklib |' configure || die
78 done
79 }
80
81 src_compile()
82 {
83 export CFLAGS="${CFLAGS} -fPIC"
84
85 mconfigure \
86 --libdir=/usr/'$(mlibdir)' \
87 --sbindir=/usr/sbin \
88 --docdir=/usr/share/doc/${PNAME}-${PVER} \
89 --enable-securedir=/usr/'$(mlibdir)'/security \
90 --enable-isadir=/usr/'$(mlibdir)'/security \
91 --enable-read-both-confs \
92 || die
93
94 # python stuff in docs gives sandbox problems
95 all-abis "sed -i 's|modules doc examples|modules|' Makefile" || die
96
97 mmake -j1 || die
98 }
99
100 src_install()
101 {
102 # needed directories
103 minstalldir /etc/pam.d || die
104 all-abis minstalldir /usr/'$(mlibdir)' || die
105 minstalldir /usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
106
107 mmake DESTDIR=${BINDIR} LDCONFIG="" install || die
108
109 # fix permissions
110 mchmod 4755 /usr/sbin/unix_chkpwd || die
111
112 # install missing man-pages
113 minstallman doc/man/*.3 || die
114 minstallman doc/man/*.8 || die
115
116 # needed by pam_console
117 mkeepdir /var/run/console || die
118
119 # install our pam setup
120 minstalldir /etc/security || die
121 minstallfile -s console.handlers /etc/security/ || die
122 minstallfile -s securetty /etc/ || die
123 # pam_env needs en empty /etc/environment file or it complains
124 memptyfile /etc/environment || die
125 minstalldir /etc/pam.d || die
126 minstallpam system-auth-${PAMD_SYSAUTH_REV} system-auth || die
127 minstallpam system-login || die
128 minstallpam system-local-login || die
129 minstallpam system-remote-login || die
130 minstallpam system-services || die
131 minstallpam other-${PAMD_OTHER_REV} other || die
132 for i in halt reboot poweroff
133 do
134 minstallpam halt-${PAMD_HALT_REV} ${i} || die
135 done
136
137 minstalldocs CHANGELOG Copyright README || die
138 minstallfile doc/specs/\*.raw /usr/share/doc/${PNAME}-${PVER}/spec || die
139 minstallfile doc/specs/\*.txt /usr/share/doc/${PNAME}-${PVER}/spec || die
140 minstallfile doc/txts/\* /usr/share/doc/${PNAME}-${PVER}/txt || die
141 gzip -9r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
142
143 # check for pam_cracklib existence or die
144 [ -e ${BINDIR}/usr/$(mlibdir)/security/pam_cracklib.so ] || die "pam_cracklib not found, your sys-libs/cracklib installation may be corrupt!"
145 }