[56221] trunk/dports/games/moria/Portfile
aschenke at macports.org
aschenke at macports.org
Tue Aug 25 03:40:13 PDT 2009
Revision: 56221
http://trac.macports.org/changeset/56221
Author: aschenke at macports.org
Date: 2009-08-25 03:40:12 -0700 (Tue, 25 Aug 2009)
Log Message:
-----------
added singleuser variant to support --with-no-root-privileges installs in MacPorts 1.8.0
Modified Paths:
--------------
trunk/dports/games/moria/Portfile
Modified: trunk/dports/games/moria/Portfile
===================================================================
--- trunk/dports/games/moria/Portfile 2009-08-25 10:39:59 UTC (rev 56220)
+++ trunk/dports/games/moria/Portfile 2009-08-25 10:40:12 UTC (rev 56221)
@@ -22,8 +22,12 @@
use_parallel_build yes
+variant singleuser description {Disables system-wide scoreboards and allows local user installation without root privileges} {}
+
configure {
- addgroup games
+ if {![variant_isset singleuser]} {
+ addgroup games
+ }
xinstall -m 644 -W ${worksrcpath}/unix Makefile unix.c ${build.dir}
@@ -34,8 +38,14 @@
}
destroot {
- xinstall -m 775 -g games -d ${destroot}${prefix}/var/games/moria
- xinstall -m 2755 -g games -c ${worksrcpath}/source/moria ${destroot}${prefix}/bin
+ if {![variant_isset singleuser]} {
+ xinstall -m 775 -g games -d ${destroot}${prefix}/var/games/moria
+ xinstall -m 2755 -g games -c ${worksrcpath}/source/moria ${destroot}${prefix}/bin
+ } else {
+ xinstall -m 775 -d ${destroot}${prefix}/var/games/moria
+ xinstall -m 755 -c ${worksrcpath}/source/moria ${destroot}${prefix}/bin
+ }
+
xinstall -m 444 -c ${worksrcpath}/files/hours ${destroot}${prefix}/var/games/moria
xinstall -m 444 -c ${worksrcpath}/files/news ${destroot}${prefix}/var/games/moria
xinstall -m 644 -c ${worksrcpath}/files/origcmds.hlp ${destroot}${prefix}/var/games/moria
@@ -47,6 +57,11 @@
}
post-activate {
- if { [file exists ${prefix}/var/games/moria/scores] == 0 } \
- { xinstall -m 464 -g games -c ${worksrcpath}/files/scores ${prefix}/var/games/moria/scores }
+ if {![file exists ${prefix}/var/games/moria/scores]} {
+ if {![variant_isset singleuser]} {
+ xinstall -m 464 -g games -c ${worksrcpath}/files/scores ${prefix}/var/games/moria/scores
+ } else {
+ xinstall -m 664 -c ${worksrcpath}/files/scores ${prefix}/var/games/moria/scores
+ }
+ }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090825/1b2961e6/attachment.html>
More information about the macports-changes
mailing list