Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12632 - (hide annotations) (download)
Mon Jun 25 13:51:24 2012 UTC (12 years, 3 months ago) by niro
File size: 4002 byte(s)
-fixed sbindir
1 niro 12631 # $Id$
2    
3     PNAME="pam"
4     PVER="1.1.5"
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.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 /usr/lib/cracklib
76     sed -i 's|DICT_DIR_CANDIDATES="|&/lib /usr/lib/cracklib |' configure || die
77     done
78     }
79    
80     src_compile()
81     {
82     export CFLAGS="${CFLAGS} -fPIC"
83    
84     mconfigure \
85     --libdir=/usr/'$(mlibdir)' \
86 niro 12632 --sbindir=/usr/sbin \
87 niro 12631 --docdir=/usr/share/doc/${PNAME}-${PVER} \
88     --enable-securedir=/usr/'$(mlibdir)'/security \
89     --enable-isadir=/usr/'$(mlibdir)'/security \
90     --enable-read-both-confs \
91     || die
92    
93     # python stuff in docs gives sandbox problems
94     all-abis "sed -i 's|modules doc examples|modules|' Makefile" || die
95    
96     mmake -j1 || die
97     }
98    
99     src_install()
100     {
101     # needed directories
102     minstalldir /etc/pam.d || die
103     all-abis minstalldir /usr/'$(mlibdir)' || die
104     minstalldir /usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
105    
106     mmake DESTDIR=${BINDIR} LDCONFIG="" install || die
107    
108     # fix permissions
109     mchmod 4755 /usr/sbin/unix_chkpwd || die
110    
111     # install missing man-pages
112     minstallman doc/man/*.3 || die
113     minstallman doc/man/*.8 || die
114    
115     # needed by pam_console
116     mkeepdir /var/run/console || die
117    
118     # install our pam setup
119     minstalldir /etc/security || die
120     minstallfile -s console.handlers /etc/security/ || die
121     minstallfile -s securetty /etc/ || die
122     # pam_env needs en empty /etc/environment file or it complains
123     memptyfile /etc/environment || die
124     minstalldir /etc/pam.d || die
125     minstallpam system-auth-${PAMD_SYSAUTH_REV} system-auth || die
126     minstallpam system-login || die
127     minstallpam system-local-login || die
128     minstallpam system-remote-login || die
129     minstallpam system-services || die
130     minstallpam other-${PAMD_OTHER_REV} other || die
131     for i in halt reboot poweroff
132     do
133     minstallpam halt-${PAMD_HALT_REV} ${i} || die
134     done
135    
136     minstalldocs CHANGELOG Copyright README || die
137     minstallfile doc/specs/\*.raw /usr/share/doc/${PNAME}-${PVER}/spec || die
138     minstallfile doc/specs/\*.txt /usr/share/doc/${PNAME}-${PVER}/spec || die
139     minstallfile doc/txts/\* /usr/share/doc/${PNAME}-${PVER}/txt || die
140     gzip -9r ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/{spec,txt} || die
141    
142     # check for pam_cracklib existence or die
143     [ -e ${BINDIR}/usr/$(mlibdir)/security/pam_cracklib.so ] || die "pam_cracklib not found, your sys-libs/cracklib installation may be corrupt!"
144     }