Contents of /branches/magellan-next/core/shadow/shadow-4.1.4.3-r1.smage2
Parent Directory | Revision Log
Revision 7578 -
(show annotations)
(download)
Thu May 26 21:46:06 2011 UTC (13 years, 4 months ago) by niro
File size: 3839 byte(s)
Thu May 26 21:46:06 2011 UTC (13 years, 4 months ago) by niro
File size: 3839 byte(s)
auto added: ver bump to 4.1.4.3-r1
1 | # $Id$ |
2 | |
3 | PNAME="shadow" |
4 | PVER="4.1.4.3" |
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-4 |
15 | >= sys-libs/pam-1.1.1 |
16 | >= sys-libs/cracklib-2.8" |
17 | |
18 | SDEPEND=">= sys-dev/autoconf-5 |
19 | >= sys-dev/automake-4 |
20 | >= sys-dev/libtool-2.2" |
21 | |
22 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
23 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
24 | |
25 | # no shared libs get installed, is multilib needed anymore? |
26 | sminclude multilib mtools |
27 | |
28 | SRC_URI=( |
29 | ftp://pkg-${PNAME}.alioth.debian.org/pub/pkg-${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/${SRCFILE} |
31 | mirror://${PNAME}/securetty |
32 | mirror://${PNAME}/pamd/chage |
33 | mirror://${PNAME}/pamd/login |
34 | mirror://${PNAME}/pamd/other |
35 | mirror://${PNAME}/pamd/passwd |
36 | mirror://${PNAME}/pamd/su |
37 | mirror://${PNAME}/${PNAME}-4.1.2.1-defaults.patch |
38 | mirror://${PNAME}/${PNAME}-${PVER}-groupmod-username.patch |
39 | ) |
40 | |
41 | UP2DATE="updatecmd ${HOMEPAGE} | grep 'New release' | sed 's/.*: \(.*\).*/\1/;q'" |
42 | |
43 | src_prepare() |
44 | { |
45 | munpack ${SRCFILE} || die |
46 | |
47 | # fixes useradd default settings (create_mail_spool) |
48 | mpatch ${PNAME}-4.1.2.1-defaults.patch || die |
49 | |
50 | # fixes username issues with groupadd if pam is enabled |
51 | # see: http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html |
52 | mpatch ${PNAME}-${PVER}-groupmod-username.patch || die |
53 | |
54 | # do not build 'groups'; coreutils provide a better version |
55 | all-abis "sed -i 's/groups$(EXEEXT) //' src/Makefile.in" || die |
56 | all-abis "sed -i '/groups/d' man/Makefile.in" || die |
57 | } |
58 | |
59 | src_compile() |
60 | { |
61 | # configures shadow with pam |
62 | mconfigure \ |
63 | --enable-shared \ |
64 | --with-libpam \ |
65 | --with-libcrack \ |
66 | --with-libcrypt \ |
67 | --enable-nls \ |
68 | --without-selinux \ |
69 | || die |
70 | |
71 | mmake || die |
72 | } |
73 | |
74 | src_install() |
75 | { |
76 | # needed directories |
77 | minstalldir /etc/{default,skel} || die |
78 | |
79 | # added exec_prefix for better bin location |
80 | mmake DESTDIR=${BINDIR} install || die |
81 | |
82 | minstalletc etc/limits limits || die |
83 | minstalletc etc/login.access login.access || die |
84 | |
85 | # makes recovery easier, when /usr is not mounted :) |
86 | mv -v ${BINDIR}/usr/bin/passwd ${BINDIR}/bin || die |
87 | mlink /bin/passwd /usr/bin || die |
88 | |
89 | # not provided by shadow anymore; install our own now |
90 | minstalletc securetty || die |
91 | |
92 | # install pam related configuration files |
93 | minstallpam chage || die |
94 | minstallpam login || die |
95 | minstallpam other || die |
96 | minstallpam passwd || die |
97 | minstallpam su || die |
98 | minstallpam chage chpasswd || die |
99 | minstallpam chage chfn || die |
100 | minstallpam chage chsh || die |
101 | minstallpam chage newusers || die |
102 | minstallpam chage groupadd || die |
103 | minstallpam chage groupdel || die |
104 | minstallpam chage groupmod || die |
105 | minstallpam chage useradd || die |
106 | minstallpam chage userdel || die |
107 | minstallpam chage usermod || die |
108 | |
109 | # disable these checks as pam controls them now |
110 | sed -e "s/^DIALUPS_CHECK_ENAB/# &/" \ |
111 | -e "s/^LASTLOG_ENAB/# &/" \ |
112 | -e "s/^MAIL_CHECK_ENAB/# &/" \ |
113 | -e "s/^PORTTIME_CHECKS_ENAB/# &/" \ |
114 | -e "s/^CONSOLE/# &/" \ |
115 | -e "s/^MOTD_FILE/# &/" \ |
116 | -e "s/^NOLOGINS_FILE/# &/" \ |
117 | -e "s/^PASS_MIN_LEN/# &/" \ |
118 | -e "s/^SU_WHEEL_ONLY/# &/" \ |
119 | -e "s/^CONSOLE_GROUPS/# &/" \ |
120 | -e "s/^ENVIRON_FILE/# &/" \ |
121 | -e "s/^OBSCURE_CHECKS_ENAB/# &/" \ |
122 | -e "s/^CRACKLIB_DICTPATH/# &/" \ |
123 | -e "s/^PASS_CHANGE_TRIES/# &/" \ |
124 | -e "s/^PASS_ALWAYS_WARN/# &/" \ |
125 | -e "s/^FAILLOG_ENAB/# &/" \ |
126 | -e "s/^QUOTAS_ENAB/# &/" \ |
127 | -e "s/^FTMP_FILE/# &/" \ |
128 | -e "s/^ENV_HZ/# &/" \ |
129 | -e "s/^CHFN_AUTH/# &/" \ |
130 | etc/login.defs > ${BINDIR}/etc/login.defs || die |
131 | |
132 | # fix some pathes in login.defs |
133 | # md5crypt is also controlled by pam ! |
134 | sed -i -e "s/^MD5_CRYPT_ENAB/# &/" \ |
135 | -e 's%/var/spool/mail%/var/mail%' \ |
136 | -e 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' \ |
137 | ${BINDIR}/etc/login.defs || die |
138 | } |
139 | |
140 | postinstall() |
141 | { |
142 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
143 | then |
144 | /usr/sbin/pwconv |
145 | /usr/sbin/grpconv |
146 | fi |
147 | } |