Revision
70317
Author
ryandesign@macports.org
Date
2010-08-05 17:34:02 -0700 (Thu, 05 Aug 2010)

Log Message

openfpc: install a sample configuration file instead of the real thing; add notes pointing users to config file

Modified Paths

Diff

Modified: trunk/dports/security/openfpc/Portfile (70316 => 70317)


--- trunk/dports/security/openfpc/Portfile	2010-08-06 00:31:15 UTC (rev 70316)
+++ trunk/dports/security/openfpc/Portfile	2010-08-06 00:34:02 UTC (rev 70317)
@@ -5,6 +5,7 @@
 
 name                openfpc
 version             0.1a
+revision            1
 categories          security
 platforms           darwin
 maintainers         yahoo.fr:jul_bsd
@@ -46,9 +47,19 @@
 destroot {
     xinstall -m 755 -W ${worksrcpath} ofpc-extract.pl openfpc ${destroot}${prefix}/bin
     xinstall -m 644 -W ${worksrcpath} ofpcParse.pm ${perl5.lib}
-    xinstall -m 644 -W ${worksrcpath} openfpc.conf ${destroot}${prefix}/etc
+    xinstall -m 644 ${worksrcpath}/openfpc.conf ${destroot}${prefix}/etc/openfpc.conf.sample
     
     xinstall -d ${destroot}${prefix}/share/doc/${name}
     xinstall -m 644 -W ${worksrcpath} README \
         ${destroot}${prefix}/share/doc/${name}
 }
+
+post-activate {
+    if {![file exists ${prefix}/etc/openfpc.conf]} {
+        copy ${prefix}/etc/openfpc.conf.sample ${prefix}/etc/openfpc.conf
+    }
+}
+
+notes "
+To configure ${name}, edit ${prefix}/etc/openfpc.conf
+"