Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11765 - (show annotations) (download)
Thu Apr 5 12:17:23 2012 UTC (12 years, 1 month ago) by niro
File size: 4502 byte(s)
auto added: ver bump to 1.1.5-r3
1 # $Id$
2
3 PNAME="pam"
4 PVER="1.1.5"
5 PBUILD="r3"
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.8
14 >= dev-db/db-5.3"
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 sminclude mtools multilib
24
25 PAMD_HALT_REV=1.3
26 PAMD_OTHER_REV=1.3
27 PAMD_SYSAUTH_REV=1.3
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}/halt-${PAMD_HALT_REV}
36 mirror://${PNAME}/other-${PAMD_OTHER_REV}
37 mirror://${PNAME}/system-auth-${PAMD_SYSAUTH_REV}
38 mirror://${PNAME}/system-login
39 mirror://${PNAME}/system-local-login
40 mirror://${PNAME}/system-remote-login
41 mirror://${PNAME}/system-services
42 mirror://${PNAME}/securetty
43 mirror://${PNAME}/console.handlers
44 )
45
46 # dev releases
47 #UP2DATE="updatecmd http://www.kernel.org/pub/linux/libs/pam/pre/library | lasttarball"
48 # stable releases
49 UP2DATE="updatecmd http://www.kernel.org/pub/linux/libs/pam/library | lasttarball"
50
51 # the strip option is not allowed, pam needs libpam.a
52 msetfeature "!strip"
53 CFLAGS="${CFLAGS/-s/}"
54 CXXFLAGS="${CFLAGS}"
55
56 src_prepare()
57 {
58 munpack ${SRCFILE} || die
59
60 # add pam_console module
61 mpatch ${PNAME}-1.1.4-pam-console.patch || die
62
63 # make sure to install readmes from all modules
64 local abi
65 for abi in ${MULTILIB_ABIS}
66 do
67 cd ${SRCDIR}-${abi}
68 install -d doc/txts || die
69 for readme in modules/pam_*/README
70 do
71 cp -f "${readme}" doc/txts/README.$(dirname "${readme}" | \
72 sed -e 's|^modules/||')
73 done
74
75 # search in /lib/cracklib
76 sed -i 's|DICT_DIR_CANDIDATES="|&/lib /lib/cracklib |' configure || die
77 done
78 }
79
80 src_compile()
81 {
82 export CFLAGS="${CFLAGS} -fPIC"
83
84 mconfigure \
85 --libdir=/'$(mlibdir)' \
86 --docdir=/usr/share/doc/${PNAME}-${PVER} \
87 --enable-securedir=/'$(mlibdir)'/security \
88 --enable-isadir=/'$(mlibdir)'/security \
89 --enable-read-both-confs \
90 || die
91
92 # python stuff in docs gives sandbox problems
93 all-abis "sed -i 's|modules doc examples|modules|' Makefile" || die
94
95 mmake -j1 || die
96 }
97
98 src_install()
99 {
100 # needed directories
101 minstalldir /etc/pam.d || die
102 all-abis minstalldir /usr/'$(mlibdir)' || die
103 minstalldir /usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
104
105 mmake DESTDIR=${BINDIR} LDCONFIG="" install || die
106
107 local i ilver
108 for i in libpam libpam_misc libpamc
109 do
110 # get internal lib version
111 ilver="$(readlink ${BINDIR}/$(mlibdir)/${i}.so | sed s:${i}.so.::)"
112
113 # fixing symlinks in /usr/lib
114 all-abis rm -f ${BINDIR}/usr/'$(mlibdir)'/${i}.so || die
115 all-abis mlink ../../'$(mlibdir)'/${i}.so.${ilver} /usr/'$(mlibdir)'/${i}.so || die
116
117 # fixing symlinks in /lib
118 all-abis rm -f ${BINDIR}/'$(mlibdir)'/${i}.so || die
119 all-abis mlink ${i}.so.${ilver} /'$(mlibdir)'/${i}.so || die
120 all-abis mlink ${i}.so.${ilver} /'$(mlibdir)'/${i}.so.0 || die
121 done
122
123 # fix permissions
124 mchmod 4755 /sbin/unix_chkpwd || die
125
126 # install missing man-pages
127 minstallman doc/man/*.3 || die
128 minstallman doc/man/*.8 || die
129
130 # needed by pam_console
131 mkeepdir /var/run/console || die
132
133 # install our pam setup
134 minstalldir /etc/security || die
135 minstallfile -s console.handlers /etc/security/ || die
136 minstallfile -s securetty /etc/ || die
137 # pam_env needs en empty /etc/environment file or it complains
138 memptyfile /etc/environment || die
139 minstalldir /etc/pam.d || die
140 minstallpam system-auth-${PAMD_SYSAUTH_REV} system-auth || die
141 minstallpam system-login || die
142 minstallpam system-local-login || die
143 minstallpam system-remote-login || die
144 minstallpam system-services || die
145 minstallpam other-${PAMD_OTHER_REV} other || die
146 for i in halt reboot poweroff
147 do
148 minstallpam halt-${PAMD_HALT_REV} ${i} || die
149 done
150
151 minstalldocs CHANGELOG Copyright README || die
152 minstallfile doc/specs/\*.raw /usr/share/doc/${PNAME}-${PVER}/spec || die
153 minstallfile doc/specs/\*.txt /usr/share/doc/${PNAME}-${PVER}/spec || die
154 minstallfile doc/txts/\* /usr/share/doc/${PNAME}-${PVER}/txt || die
155 gzip -9r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
156
157 # check for pam_cracklib existence or die
158 [ -e ${BINDIR}/$(mlibdir)/security/pam_cracklib.so ] || die "pam_cracklib not found, your sys-libs/cracklib installation may be corrupt!"
159 }