[39213] trunk/dports/perl/p5-mail-spamassassin/Portfile

simon at macports.org simon at macports.org
Tue Aug 12 10:14:40 PDT 2008


Revision: 39213
          http://trac.macosforge.org/projects/macports/changeset/39213
Author:   simon at macports.org
Date:     2008-08-12 10:14:40 -0700 (Tue, 12 Aug 2008)
Log Message:
-----------
perl/p5-mail-spamassassin: Prevent overwriting of configuration files.

Modified Paths:
--------------
    trunk/dports/perl/p5-mail-spamassassin/Portfile

Modified: trunk/dports/perl/p5-mail-spamassassin/Portfile
===================================================================
--- trunk/dports/perl/p5-mail-spamassassin/Portfile	2008-08-12 16:41:23 UTC (rev 39212)
+++ trunk/dports/perl/p5-mail-spamassassin/Portfile	2008-08-12 17:14:40 UTC (rev 39213)
@@ -44,6 +44,34 @@
                         LOCALSTATEDIR=${prefix}/var/spamassassin \
                         CONFDIR=${prefix}/etc/mail/spamassassin
 
+destroot.target-append      conf__install data__install
+
+# All configuration files for spamassassin.
+set conf_files      {init.pre local.cf v310.pre v312.pre v320.pre}
+
+post-destroot {
+    set etc ${destroot}${prefix}/etc/mail/spamassassin
+    foreach file ${conf_files} {
+        file rename ${etc}/${file} ${etc}/${file}.sample
+    }
+}
+
+post-install {
+    ui_msg "****************************************************************"
+    ui_msg "*                                                              *"
+    ui_msg "* If you run spamassassin for the first time, then you must    *"
+    ui_msg "* rename the following configuration files by removing the     *"
+    ui_msg "* .sample extension:                                           *"
+    ui_msg "*                                                              *"
+    ui_msg "* cd ${prefix}/etc/mail/spamassassin                          *"
+    foreach file ${conf_files} {
+        ui_msg "* mv ${file}.sample ${file}                                  *"
+    }
+    ui_msg "*                                                              *"
+    ui_msg "****************************************************************"
+}
+
+
 variant razor {
     depends_lib-append      port:p5-razor-agents
     configure.args-append   RUN_RAZOR_TESTS=yes
@@ -58,5 +86,3 @@
 variant bayes {
     depends_lib-append      port:p5-db_file
 }
-
-destroot.target-append      conf__install data__install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080812/4659ef75/attachment.html 


More information about the macports-changes mailing list