# $Id$ PNAME="sudo" PVER="1.8.23" PBUILD="r1" PCAT="app-admin" DESCRIPTION="sudo allows to give certain users the ability to run some commands as another user while logging the commands." HOMEPAGE="http://www.sudo.ws/" DEPEND=">= sys-libs/pam-1.1" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( http://www.sudo.ws/${PNAME}/dist/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/sudo.pamd-systemauth mirror://${PNAME}/${PNAME}-1.8.0-allow-wheel.patch mirror://${PNAME}/${PNAME}-1.8.5p2-preserve-magellan-env.patch mirror://${PNAME}/${PNAME}-1.8.7-preserve-magellan-env-proxy.patch mirror://${PNAME}/${PNAME}-1.8.5p2-disable-from-ssh-login.patch ) UP2DATE="updatecmd http://www.sudo.ws/${PNAME}/dist | grep ${PNAME}- | highesttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # allow the group wheel to run all commands mpatch ${PNAME}-1.8.0-allow-wheel.patch || die # preserve some important magellan environment variables mpatch ${PNAME}-1.8.5p2-preserve-magellan-env.patch || die # preserve proxy variables too mpatch ${PNAME}-1.8.7-preserve-magellan-env-proxy.patch || die # disable sudo run from ssh logon for security reasons mpatch ${PNAME}-1.8.5p2-disable-from-ssh-login.patch || die } src_compile() { cd ${SRCDIR} mconfigure \ --libexecdir=/usr/$(mlibdir)/sudo \ --with-all-insults \ --disable-path-info \ --with-env-editor \ --with-pam \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # keep empty dirs mkeepdir /etc/sudoers.d || die # pam related configs minstallpam sudo.pamd-systemauth sudo || die # fix permissions - /var and /var/db get 0700 and this breaks the system! mchmod 0755 /var || die mchmod 0755 /var/db || die # docs minstalldocs BUGS CHANGES HISTORY LICENSE PORTING \ README RUNSON TODO TROUBLESHOOTING UPGRADE \ || die }