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

Contents of /sys-apps/shadow/shadow-4.0.2-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Mon Dec 9 04:37:26 2002 UTC (17 years, 7 months ago) by manson
Branch: MAIN
CVS Tags: GENTOO_1_4_SNAP_2003010800
Changes since 1.9: +2 -2 lines
12-08-02 Keyword change remove sparc64 Rodney Rees manson@gentoo.org

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.2-r5.ebuild,v 1.9 2002/10/24 23:23:45 blizzy Exp $
4
5 IUSE=""
6
7 inherit libtool
8
9 S="${WORKDIR}/${P}"
10 DESCRIPTION="Utilities to deal with user accounts"
11 SRC_URI="ftp://ftp.pld.org.pl/software/shadow/${P}.tar.gz"
12 HOMEPAGE="http://shadow.pld.org.pl/"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="x86 ppc sparc "
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 # From sys-apps/pam-login now
80 # insopts -m0644 ; doins ${FILESDIR}/login.defs
81 insinto /etc/pam.d ; insopts -m0644
82 cd ${FILESDIR}/pam.d
83 doins *
84 newins system-auth system-auth.new
85 newins shadow chage
86 newins shadow chsh
87 newins shadow chfn
88 newins shadow useradd
89 newins shadow groupadd
90 cd ${S}
91
92 # the manpage install is beyond my comprehension, and also broken.
93 # just do it over.
94 rm -rf ${D}/usr/share/man/*
95 for q in man/*.[0-9]
96 do
97 local dir="${D}/usr/share/man/man${q##*.}"
98 mkdir -p $dir
99 cp $q $dir
100 done
101
102 #dont install the manpage, since we dont use
103 #login with shadow
104 rm ${D}/usr/share/man/man1/login.*
105
106 cd ${S}/doc
107 dodoc ANNOUNCE INSTALL LICENSE README WISHLIST
108 docinto txt
109 dodoc HOWTO LSM README.* *.txt
110 }
111
112 pkg_postinst() {
113 ewarn "Due to a security issue, ${ROOT}etc/pam.d/system-auth "
114 ewarn "is being updated automatically. Your old "
115 ewarn "system-auth will be backed up as:"
116 ewarn "${ROOT}etc/pam.d/system-auth.bak"
117 echo
118
119 local CHECK1=`md5sum ${ROOT}/etc/pam.d/system-auth | cut -d ' ' -f 1`
120 local CHECK2=`md5sum ${ROOT}/etc/pam.d/system-auth.new | cut -d ' ' -f 1`
121
122 if [ "$CHECK1" != "$CHECK2" ];
123 then
124 cp -a ${ROOT}/etc/pam.d/system-auth \
125 ${ROOT}/etc/pam.d/system-auth.bak;
126 mv -f ${ROOT}/etc/pam.d/system-auth.new \
127 ${ROOT}/etc/pam.d/system-auth
128 else
129 rm -f ${ROOT}/etc/pam.d/system-auth.new
130 fi
131 }
132

  ViewVC Help
Powered by ViewVC 1.1.20