# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 143281 2015-12-09 21:18:02Z cal@macports.org $ PortSystem 1.0 name sudo epoch 1 version 1.8.14p3 revision 1 categories sysutils security license ISC maintainers gmail.com:youvegotmoxie description Allow users to run programs as other users, eg, root long_description \ Sudo is a program designed to allow a sysadmin to give limited root \ privileges to users and log root activity. The basic philosophy is to \ give as few privileges as possible but still allow people to get their \ work done. platforms darwin homepage http://www.sudo.ws/sudo/ master_sites ${homepage}dist/ \ ${homepage}dist/OLD/ checksums rmd160 209554c44467da8ebeeecc2134edbf42fce2244e \ sha256 a8a697cbb113859058944850d098464618254804cf97961dee926429f00a1237 patchfiles patch-sudoers.in.diff configure.args --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man \ --sysconfdir=${prefix}/etc \ --with-env-editor \ --with-tty-tickets \ --with-ignore-dot \ --with-rundir=${prefix}/var/run/sudo \ --with-password-timeout=0 \ --with-pam pre-destroot { if { [getuid] != 0 } { ui_msg "------------------------------------------------------------" ui_msg "Installing sudo as non-root doesn't really do anything" ui_msg "useful, so be sure to install sudo as root" ui_msg "------------------------------------------------------------" } } post-destroot { move ${destroot}${prefix}/etc/sudoers ${destroot}${prefix}/etc/sudoers.dist xinstall -d -m 0755 ${destroot}${prefix}/var/run/sudo } destroot.keepdirs ${destroot}${prefix}/var/run/sudo post-activate { if {![file exists ${prefix}/etc/sudoers]} { copy ${prefix}/etc/sudoers.dist ${prefix}/etc/sudoers } } notes " To complete the installation, run: \t${prefix}/bin/sudo ${prefix}/sbin/visudo Edit as necessary. (See the sudoers manpage for additional information.) " variant insults description {It can only be attributed to human error.} { configure.args-append --with-insults --with-all-insults } variant openldap description {Add ldap support via OpenLDAP.} { depends_lib-append port:openldap configure.args-append --with-ldap post-destroot { xinstall -d ${destroot}${prefix}/etc/openldap/schema xinstall -m 0644 ${worksrcpath}/schema.OpenLDAP \ ${destroot}${prefix}/etc/openldap/schema/sudo.schema } } livecheck.type regex livecheck.url [lindex ${master_sites} 0] livecheck.regex >${name}-(\[0-9.p\]+)${extract.suffix}<