source: trunk/dports/sysutils/sudo/Portfile

Last change on this file was 153820, checked in by mps@…, 11 months ago

sudo: update to version 1.8.18p1.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1# -*- 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
2# $Id: Portfile 153820 2016-10-12 10:55:03Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                sudo
7epoch               1
8version             1.8.18p1
9categories          sysutils security
10license             ISC
11maintainers         gmail.com:youvegotmoxie mps
12
13description         Allow users to run programs as other users, eg, root
14long_description \
15    Sudo is a program designed to allow a sysadmin to give limited root \
16    privileges to users and log root activity.  The basic philosophy is to \
17    give as few privileges as possible but still allow people to get their \
18    work done.
19
20platforms           darwin
21
22homepage            http://www.sudo.ws/sudo/
23master_sites        ${homepage}dist/ \
24                    ${homepage}dist/OLD/
25
26checksums           rmd160  11f20b310db26207c1d892cd73be582799df8bcf \
27                    sha256  e5a0471c721281a693025bbde33ebd9d3db43245d83ab8516bbfc23980379434
28
29patchfiles          patch-sudoers.in.diff
30
31configure.args      --infodir=${prefix}/share/info \
32                    --mandir=${prefix}/share/man \
33                    --sysconfdir=${prefix}/etc \
34                    --with-env-editor \
35                    --with-tty-tickets \
36                    --with-ignore-dot \
37                    --with-rundir=${prefix}/var/run/sudo \
38                    --with-password-timeout=0 \
39                    --with-pam
40
41pre-destroot {
42    if { [getuid] != 0 } {
43        ui_msg "------------------------------------------------------------"
44        ui_msg "Installing sudo as non-root doesn't really do anything"
45        ui_msg "useful, so be sure to install sudo as root"
46        ui_msg "------------------------------------------------------------"
47    }
48}
49
50post-destroot {
51    move ${destroot}${prefix}/etc/sudoers ${destroot}${prefix}/etc/sudoers.dist
52    xinstall -d -m 0755 ${destroot}${prefix}/var/run/sudo
53}
54destroot.keepdirs ${destroot}${prefix}/var/run/sudo
55
56post-activate {
57    if {![file exists ${prefix}/etc/sudoers]} {
58        copy ${prefix}/etc/sudoers.dist ${prefix}/etc/sudoers
59    }
60}
61
62notes "
63To complete the installation, run:
64
65\t${prefix}/bin/sudo ${prefix}/sbin/visudo
66
67Edit as necessary. (See the sudoers manpage for additional information.)
68"
69
70variant insults description {It can only be attributed to human error.} {
71    configure.args-append   --with-insults --with-all-insults
72}
73
74variant openldap description {Add ldap support via OpenLDAP.} {
75    depends_lib-append      port:openldap
76
77    configure.args-append   --with-ldap
78
79    post-destroot {
80        xinstall -d ${destroot}${prefix}/etc/openldap/schema
81        xinstall -m 0644 ${worksrcpath}/schema.OpenLDAP \
82            ${destroot}${prefix}/etc/openldap/schema/sudo.schema
83    }
84}
85
86livecheck.type  regex
87livecheck.url   [lindex ${master_sites} 0]
88livecheck.regex >${name}-(\[0-9.p\]+)${extract.suffix}<
Note: See TracBrowser for help on using the repository browser.