aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-24 16:20:47 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-24 16:20:47 -0300
commit88c066ff18638844cebc166eca9caba425950c4d (patch)
treee8ba06a6c3312f372318b0fac65856c66bd739c9
parentdfd227e89fab0089e9555bb9927a42684fe0860c (diff)
downloadpfsense-packages-88c066ff18638844cebc166eca9caba425950c4d.tar.gz
pfsense-packages-88c066ff18638844cebc166eca9caba425950c4d.tar.bz2
pfsense-packages-88c066ff18638844cebc166eca9caba425950c4d.zip
Sanitize mailscanner version, add port_category, run_depends and fix pbi detection
-rw-r--r--config/mailscanner/mailscanner.inc15
-rw-r--r--pkg_config.10.xml4
2 files changed, 13 insertions, 6 deletions
diff --git a/config/mailscanner/mailscanner.inc b/config/mailscanner/mailscanner.inc
index 8418c85c..62905091 100644
--- a/config/mailscanner/mailscanner.inc
+++ b/config/mailscanner/mailscanner.inc
@@ -33,11 +33,16 @@ require_once("globals.inc");
#require("guiconfig.inc");
$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
-define('MAILSCANNER_PREFIX', '/usr/pbi/mailscanner-' . php_uname("m"));
-if ($pf_version == "2.1")
- define('MAILSCANNER_LOCALBASE', MAILSCANNER_PREFIX);
-else
- define('MAILSCANNER_LOCALBASE', MAILSCANNER_PREFIX . '/local');
+if ($pf_version == "2.1" || $pf_version == "2.2") {
+ define('MAILSCANNER_PREFIX', '/usr/pbi/mailscanner-' . php_uname("m"));
+ if ($pf_version == "2.1")
+ define('MAILSCANNER_LOCALBASE', MAILSCANNER_PREFIX);
+ else
+ define('MAILSCANNER_LOCALBASE', MAILSCANNER_PREFIX . '/local');
+} else {
+ define('MAILSCANNER_PREFIX', '/usr/local');
+ define('MAILSCANNER_LOCALBASE', '/usr/local');
+}
$uname=posix_uname();
if ($uname['machine']=='amd64')
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 828eb9d4..a4b170ad 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -509,10 +509,12 @@
<config_file>https://packages.pfsense.org/packages/config/mailscanner/mailscanner.xml</config_file>
<pkginfolink>https://forum.pfsense.org/index.php/topic,43687.0.html</pkginfolink>
<depends_on_package_pbi>mailscanner-4.84.6-##ARCH##.pbi</depends_on_package_pbi>
- <version>4.84.6 pkg v.0.2.12</version>
+ <version>0.2.12</version>
<status>beta</status>
<required_version>2.2</required_version>
<configurationfile>mailscanner.xml</configurationfile>
+ <port_category>mail</port_category>
+ <run_depends>bin/cdcc:mail/dcc-dccd bin/pyzor:mail/pyzor bin/spfquery.pl:mail/p5-Mail-SPF bin/ip2cc:net/p5-IP-Country sbin/mailscanner:mail/mailscanner</run_depends>
<build_pbi>
<ports_before>mail/pyzor mail/p5-Mail-SPF net/p5-IP-Country mail/dcc-dccd</ports_before>
<port>mail/mailscanner</port>