Magellan Linux

Contents of /branches/R11-stable/core/sudo/sudo-1.8.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17794 - (show annotations) (download)
Wed Jun 26 12:32:26 2013 UTC (10 years, 11 months ago) by niro
File size: 1766 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="sudo"
4 PVER="1.8.7"
5 PBUILD="r1"
6
7 PCAT="app-admin"
8
9 DESCRIPTION="sudo allows to give certain users the ability to run some commands as another user while logging the commands."
10 HOMEPAGE="http://www.sudo.ws/"
11
12 DEPEND=">= sys-libs/pam-1.1"
13
14 SRCFILE="${PNAME}-${PVER}.tar.gz"
15 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
16
17 sminclude mtools
18
19 SRC_URI=(
20 http://www.sudo.ws/${PNAME}/dist/${SRCFILE}
21 mirror://${PNAME}/${SRCFILE}
22 mirror://${PNAME}/sudo.pamd-systemauth
23 mirror://${PNAME}/${PNAME}-1.8.0-allow-wheel.patch
24 mirror://${PNAME}/${PNAME}-1.8.5p2-preserve-magellan-env.patch
25 mirror://${PNAME}/${PNAME}-1.8.5p2-disable-from-ssh-login.patch
26 )
27
28 UP2DATE="updatecmd http://www.sudo.ws/${PNAME}/dist | grep ${PNAME}- | lasttarball gz"
29
30 src_prepare()
31 {
32 munpack ${SRCFILE} || die
33 cd ${SRCDIR}
34
35 # allow the group wheel to run all commands
36 mpatch ${PNAME}-1.8.0-allow-wheel.patch || die
37
38 # preserve some important magellan environment variables
39 mpatch ${PNAME}-1.8.5p2-preserve-magellan-env.patch || die
40
41 # disable sudo run from ssh logon for security reasons
42 mpatch ${PNAME}-1.8.5p2-disable-from-ssh-login.patch || die
43 }
44
45 src_compile()
46 {
47 cd ${SRCDIR}
48
49 mconfigure \
50 --libexecdir=/usr/$(mlibdir)/sudo \
51 --with-all-insults \
52 --disable-path-info \
53 --with-env-editor \
54 --with-pam \
55 || die
56
57 mmake || die
58 }
59
60 src_install()
61 {
62 cd ${SRCDIR}
63 mmake DESTDIR=${BINDIR} install || die
64
65 # keep empty dirs
66 mkeepdir /etc/sudoers.d || die
67
68 # pam related configs
69 minstallpam sudo.pamd-systemauth sudo || die
70
71 # fix permissions - /var and /var/db get 0700 and this breaks the system!
72 mchmod 0755 /var || die
73 mchmod 0755 /var/db || die
74
75 # docs
76 minstalldocs BUGS CHANGES HISTORY LICENSE PORTING \
77 README RUNSON TODO TROUBLESHOOTING UPGRADE \
78 || die
79 }