Magellan Linux

Annotation of /smage/branches/alx-0_6_0/core/sudo/sudo-1.8.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3409 - (hide annotations) (download)
Wed Apr 4 08:42:38 2012 UTC (12 years, 2 months ago) by niro
File size: 1739 byte(s)
-added /sbin/poweroff to user allowed programs to fix FS#18
1 niro 3409 # $Id$
2    
3     PNAME="sudo"
4     PVER="1.8.0"
5     PBUILD="r2"
6    
7     PCATEGORIE="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=">= virtual/glibc"
13    
14     SRCFILE="${PNAME}-${PVER}.tar.gz"
15     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
16    
17     REMOVE_DEPRECATED_MAGE_TARGETS=1
18     ALX_ONLY_KEEP="etc/sudoers etc/sudoers.d usr/bin/sudo usr/$(mlibdir)/sudo/*.so"
19     sminclude mtools alx-split
20    
21     SRC_URI=(
22     http://www.sudo.ws/${PNAME}/dist/${SRCFILE}
23     mirror://${PNAME}/${SRCFILE}
24     mirror://${PNAME}/sudo.pamd
25     mirror://${PNAME}/${PNAME}-1.8.0-allow-wheel.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    
39     src_compile()
40     {
41     cd ${SRCDIR}
42    
43     mconfigure \
44     --libexecdir=/usr/$(mlibdir)/sudo \
45     --with-all-insults \
46     --disable-path-info \
47     --with-env-editor \
48     --without-pam \
49     || die
50    
51     mmake || die
52     }
53    
54     alx_generic_src_install()
55     {
56     cd ${SRCDIR}
57    
58     mmake DESTDIR=${BINDIR} install || die
59     # fix permissions - /var and /var/db get 0700 and this breaks the system!
60     mchmod 0755 /var || die
61     mchmod 0755 /var/db || die
62    
63     # docs
64     minstalldocs BUGS CHANGES HISTORY LICENSE PORTING \
65     README RUNSON TODO TROUBLESHOOTING UPGRADE \
66     || die
67    
68     # alx-specific
69     # include configs from /etc/sudoers.d
70     minstalldir /etc/sudoers.d || die
71     # must be 0755!!
72     mchmod 0755 /etc/sudoers.d || die
73     mcinjectfile users_reboot.sudo /etc/sudoers.d/10_users_reboot || die
74     mchmod 0440 /etc/sudoers.d/10_users_reboot || die
75     }
76    
77     preinstall()
78     {
79     add_conf_prot_mask /etc/sudoers /etc/sudoers.d
80     }