# $Id$ PNAME="sudo" PVER="1.8.3p1" PBUILD="r1" PCATEGORIE="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=">= virtual/glibc" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" MCORE_ONLY_KEEP="etc/sudoers etc/sudoers.d usr/bin/sudo usr/$(mlibdir)/sudo/*.so" sminclude mtools mcore-split SRC_URI=( http://www.sudo.ws/${PNAME}/dist/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/sudo.pamd mirror://${PNAME}/${PNAME}-1.8.0-allow-wheel.patch ) UP2DATE="updatecmd http://www.sudo.ws/${PNAME}/dist | grep ${PNAME}- | lasttarball 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 } src_compile() { cd ${SRCDIR} mconfigure \ --libexecdir=/usr/$(mlibdir)/sudo \ --with-all-insults \ --disable-path-info \ --with-env-editor \ --without-pam \ || die mmake || die } mcore_generic_src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || 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 # mcore-specific # include configs from /etc/sudoers.d minstalldir /etc/sudoers.d || die # must be 0755!! mchmod 0755 /etc/sudoers.d || die mcinjectfile users_reboot.sudo /etc/sudoers.d/10_users_reboot || die mchmod 0440 /etc/sudoers.d/10_users_reboot || die } preinstall() { add_conf_prot_mask /etc/sudoers /etc/sudoers.d }