Magellan Linux

Contents of /trunk/core/shadow/shadow-4.1.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
File size: 4242 byte(s)
import repo
1 # $Header: /magellan-cvs/smage/shadow/shadow-4.1.0-r1.smage2,v 1.2 2008/02/10 11:28:22 niro Exp $
2
3 PNAME="shadow"
4 PVER="4.1.0"
5 PBUILD="r1"
6
7 PCATEGORIE="sys-apps"
8 STATE="unstable"
9
10 DESCRIPTION="Utilities to deal with user accounts, with pam support."
11 HOMEPAGE="http://pkg-shadow.alioth.debian.org/"
12
13 DEPEND=">= virtual/glibc
14 >= app-shells/bash-3
15 >= sys-libs/pam-0.99
16 >= sys-libs/cracklib-2.8"
17
18 SDEPEND=">= sys-dev/autoconf-4
19 >= sys-dev/automake-3
20 >= sys-dev/libtool-1.5"
21
22 SRCFILE="${PNAME}-${PVER}.tar.bz2"
23 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
24
25 sminclude multilib mtools
26
27 SRC_URI=(
28 ftp://pkg-${PNAME}.alioth.debian.org/pub/pkg-${PNAME}/${SRCFILE}
29 mirror://${PNAME}/${SRCFILE}
30 mirror://${PNAME}/securetty
31 mirror://${PNAME}/pamd/chage
32 mirror://${PNAME}/pamd/login
33 mirror://${PNAME}/pamd/other
34 mirror://${PNAME}/pamd/passwd
35 mirror://${PNAME}/pamd/su
36 mirror://${PNAME}/${PNAME}-${PVER}-defaults.patch
37 )
38
39 UP2DATE="updatecmd ${HOMEPAGE} | grep 'New release' | sed 's/.*: \(.*\).*/\1/;q'"
40
41 src_prepare()
42 {
43 munpack ${SRCFILE} || die
44
45 # fixes useradd default settings (home gid etc)
46 # since shadow-4.1.0 we have mail_spool_createn disabled too
47 mpatch ${PNAME}-${PVER}-defaults.patch || die
48
49 local abi
50 for abi in ${MULTILIB_ABIS}
51 do
52 cd ${SRCDIR}-${abi}
53 # do not build 'groups'; coreutils provide a better version
54 sed -i 's/groups$(EXEEXT) //' src/Makefile.in || die
55 sed -i '/groups/d' man/Makefile.in || die
56
57 if [[ ${abi} = m64 ]]; then
58 sed -i configure \
59 -e 's@\(^sys_lib_search_path_spec=\).*@\1"/lib64 /usr/lib64 /usr/local/lib64"@g' \
60 -e 's@\(^sys_lib_dlsearch_path_spec=\).*@\1"/lib64 /usr/lib64 /usr/local/lib64"@g' \
61 || die
62 fi
63 done
64 }
65
66 src_compile()
67 {
68 # configures shadow with pam
69 all-abis mconfigure \
70 --enable-shared \
71 --with-libpam \
72 --with-libcrack \
73 --with-libcrypt \
74 --enable-nls \
75 --without-selinux \
76 || die
77
78 mmake || die
79 }
80
81 src_install()
82 {
83 # needed directories
84 minstalldir /etc/{default,skel} || die
85
86 all-abis minstalldir /'$(mlibdir)' || die
87
88 # added exec_prefix for better bin location
89 all-abis make DESTDIR=${BINDIR} install || die
90
91 # move libs to a proper location
92 all-abis mv ${BINDIR}/usr/'$(mlibdir)'/libshadow.so.0* ${BINDIR}/'$(mlibdir)' || die
93 all-abis mlink ../../'$(mlibdir)'/libshadow.so.0 /usr/'$(mlibdir)'/libshadow.so || die
94
95 minstalletc etc/limits limits || die
96 minstalletc etc/login.access login.access || die
97
98 # makes recovery easier, when /usr is not mounted :)
99 mv -v ${BINDIR}/usr/bin/passwd ${BINDIR}/bin || die
100 mlink /bin/passwd /usr/bin || die
101
102 # not provided by shadow anymore; install our own now
103 minstalletc securetty || die
104
105 # install pam related configuration files
106 minstallpam chage || die
107 minstallpam login || die
108 minstallpam other || die
109 minstallpam passwd || die
110 minstallpam su || die
111 minstallpam chage chpasswd || die
112 minstallpam chage chfn || die
113 minstallpam chage chsh || die
114 minstallpam chage newusers || die
115 minstallpam chage groupadd || die
116 minstallpam chage groupdel || die
117 minstallpam chage groupmod || die
118 minstallpam chage useradd || die
119 minstallpam chage userdel || die
120 minstallpam chage usermod || die
121
122 # disable these checks as pam controls them now
123 sed -e "s/^DIALUPS_CHECK_ENAB/# &/" \
124 -e "s/^LASTLOG_ENAB/# &/" \
125 -e "s/^MAIL_CHECK_ENAB/# &/" \
126 -e "s/^PORTTIME_CHECKS_ENAB/# &/" \
127 -e "s/^CONSOLE/# &/" \
128 -e "s/^MOTD_FILE/# &/" \
129 -e "s/^NOLOGINS_FILE/# &/" \
130 -e "s/^PASS_MIN_LEN/# &/" \
131 -e "s/^SU_WHEEL_ONLY/# &/" \
132 -e "s/^CONSOLE_GROUPS/# &/" \
133 -e "s/^ENVIRON_FILE/# &/" \
134 -e "s/^OBSCURE_CHECKS_ENAB/# &/" \
135 -e "s/^CRACKLIB_DICTPATH/# &/" \
136 -e "s/^PASS_CHANGE_TRIES/# &/" \
137 -e "s/^PASS_ALWAYS_WARN/# &/" \
138 -e "s/^FAILLOG_ENAB/# &/" \
139 -e "s/^QUOTAS_ENAB/# &/" \
140 -e "s/^FTMP_FILE/# &/" \
141 -e "s/^ENV_HZ/# &/" \
142 -e "s/^CHFN_AUTH/# &/" \
143 etc/login.defs > ${BINDIR}/etc/login.defs || die
144
145 # fix some pathes in login.defs
146 # md5crypt is also controlled by pam !
147 sed -i -e "s/^MD5_CRYPT_ENAB/# &/" \
148 -e 's%/var/spool/mail%/var/mail%' \
149 -e 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' \
150 ${BINDIR}/etc/login.defs || die
151 }
152
153 postinstall()
154 {
155 if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
156 then
157 /usr/sbin/pwconv
158 /usr/sbin/grpconv
159 fi
160 }

Properties

Name Value
svn:keywords Id