/[gentoo-x86]/sys-apps/shadow/shadow-4.0.3.ebuild
Gentoo

Contents of /sys-apps/shadow/shadow-4.0.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (show annotations) (download)
Sun Dec 15 10:44:23 2002 UTC (17 years, 6 months ago) by bjb
Branch: MAIN
CVS Tags: GENTOO_1_4_SNAP_2003010800
Changes since 1.15: +2 -2 lines
During removal of sparc64 keywords from the ebuilds a bad sed introduced problematic KEYWORDS line that contained an illegal character before the alpha keyword. Fixed.

1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.3.ebuild,v 1.15 2002/12/09 04:37:26 manson Exp $
4
5 IUSE=""
6
7 inherit libtool
8
9 S="${WORKDIR}/${P}"
10 HOMEPAGE="http://shadow.pld.org.pl/"
11 DESCRIPTION="Utilities to deal with user accounts"
12 SRC_URI="ftp://ftp.pld.org.pl/software/shadow/${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="x86 sparc alpha"
17
18 DEPEND=">=sys-libs/pam-0.75-r4
19 >=sys-libs/cracklib-2.7-r3
20 sys-devel/gettext"
21
22 RDEPEND=">=sys-libs/pam-0.75-r4
23 >=sys-libs/cracklib-2.7-r3"
24
25
26 pkg_preinst() {
27 rm -f ${ROOT}/etc/pam.d/system-auth.new
28 }
29
30 src_compile() {
31 elibtoolize
32
33 local myconf=""
34 use nls || myconf="${myconf} --disable-nls"
35
36 ./configure --disable-desrpc \
37 --with-libcrypt \
38 --with-libcrack \
39 --with-libpam \
40 --enable-shared=no \
41 --enable-static=yes \
42 --host=${CHOST} \
43 ${myconf} || die "bad configure"
44
45 # Parallel make fails sometimes
46 make || die "compile problem"
47 }
48
49 src_install() {
50 dodir /etc/default /etc/skel
51
52 make prefix=${D}/usr \
53 exec_prefix=${D} \
54 mandir=${D}/usr/share/man \
55 install || die "install problem"
56
57 #do not install this login, but rather the one from
58 #util-linux, as this one have a serious root exploit
59 #with pam_limits in use.
60 rm ${D}/bin/login
61
62 mv ${D}/lib ${D}/usr
63 dosed "s:/lib':/usr/lib':g" /usr/lib/libshadow.la
64 dosed "s:/lib/:/usr/lib/:g" /usr/lib/libshadow.la
65 dosed "s:/lib':/usr/lib':g" /usr/lib/libmisc.la
66 dosed "s:/lib/:/usr/lib/:g" /usr/lib/libmisc.la
67 dosym /usr/bin/newgrp /usr/bin/sg
68 dosym /usr/sbin/useradd /usr/sbin/adduser
69 dosym /usr/sbin/vipw /usr/sbin/vigr
70 # remove dead links
71 rm -f ${D}/bin/{sg,vipw}
72
73 insinto /etc
74 # Using a securetty with devfs device names added
75 # (compat names kept for non-devfs compatibility)
76 insopts -m0600 ; doins ${FILESDIR}/securetty
77 insopts -m0600 ; doins ${S}/etc/login.access
78 insopts -m0644 ; doins ${S}/etc/limits
79
80 # needed for 'adduser -D'
81 keepdir /etc/default
82
83 # From sys-apps/pam-login now
84 # insopts -m0644 ; doins ${FILESDIR}/login.defs
85 insinto /etc/pam.d ; insopts -m0644
86 cd ${FILESDIR}/pam.d
87 doins *
88 newins system-auth system-auth.new
89 newins shadow chage
90 newins shadow chsh
91 newins shadow chfn
92 newins shadow useradd
93 newins shadow groupadd
94 cd ${S}
95
96 # the manpage install is beyond my comprehension, and also broken.
97 # just do it over.
98 rm -rf ${D}/usr/share/man/*
99 for q in man/*.[0-9]
100 do
101 local dir="${D}/usr/share/man/man${q##*.}"
102 mkdir -p $dir
103 cp $q $dir
104 done
105
106 #dont install the manpage, since we dont use
107 #login with shadow
108 rm ${D}/usr/share/man/man1/login.*
109
110 cd ${S}/doc
111 dodoc ANNOUNCE INSTALL LICENSE README WISHLIST
112 docinto txt
113 dodoc HOWTO LSM README.* *.txt
114
115 # Fix sparc serial console
116 if [ "${ARCH}" == "sparc" -o "${ARCH}" == "" ]; then
117 cd ${D}/etc
118 cp securetty securetty.orig
119 # ttyS0 and its devfsd counterpart (Sparc serial port "A")
120 sed -e 's:\(vc/1\)$:tts/0\n\1:' \
121 -e 's:\(tty1\)$:ttyS0\n\1:' \
122 securetty.orig > securetty || die
123 rm securetty.orig
124 fi
125 }
126
127 pkg_postinst() {
128 ewarn "Due to a security issue, ${ROOT}etc/pam.d/system-auth "
129 ewarn "is being updated automatically. Your old "
130 ewarn "system-auth will be backed up as:"
131 ewarn "${ROOT}etc/pam.d/system-auth.bak"
132 echo
133
134 local CHECK1=`md5sum ${ROOT}/etc/pam.d/system-auth | cut -d ' ' -f 1`
135 local CHECK2=`md5sum ${ROOT}/etc/pam.d/system-auth.new | cut -d ' ' -f 1`
136
137 if [ "$CHECK1" != "$CHECK2" ];
138 then
139 cp -a ${ROOT}/etc/pam.d/system-auth \
140 ${ROOT}/etc/pam.d/system-auth.bak;
141 mv -f ${ROOT}/etc/pam.d/system-auth.new \
142 ${ROOT}/etc/pam.d/system-auth
143 else
144 rm -f ${ROOT}/etc/pam.d/system-auth.new
145 fi
146 }
147

  ViewVC Help
Powered by ViewVC 1.1.20