[129114] trunk/dports/mail/assp/Portfile

jmr at macports.org jmr at macports.org
Fri Dec 5 14:24:29 PST 2014


Revision: 129114
          https://trac.macports.org/changeset/129114
Author:   jmr at macports.org
Date:     2014-12-05 14:24:29 -0800 (Fri, 05 Dec 2014)
Log Message:
-----------
assp: use add_users, use extract.mkdir, use C locale to prevent reinplace failure, mark noarch

Modified Paths:
--------------
    trunk/dports/mail/assp/Portfile

Modified: trunk/dports/mail/assp/Portfile
===================================================================
--- trunk/dports/mail/assp/Portfile	2014-12-05 22:04:37 UTC (rev 129113)
+++ trunk/dports/mail/assp/Portfile	2014-12-05 22:24:29 UTC (rev 129114)
@@ -1,5 +1,6 @@
 # -*- 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
 # $Id$
+
 PortSystem		1.0
 
 name			assp
@@ -17,17 +18,17 @@
 					for each site?s mail patterns. This free, \
 					easy-to-use tool works with any mail transport and \
 					achieves these goals requiring no operator \
-					intervention after the initial setup phase. 
+					intervention after the initial setup phase.
 homepage		http://assp.sourceforge.net/
 master_sites	sourceforge
 use_zip			yes
 checksums		md5 55be31bab3efacc6bd964adf8cd25c83
 platforms		darwin
+supported_archs	noarch
 
-depends_run		path:bin/perl:perl5
+depends_run		port:perl5
 
-pre-extract		{ file mkdir ${worksrcpath} }
-extract.dir		${worksrcpath}
+extract.mkdir	yes
 
 set assp_base	${prefix}/var/assp
 
@@ -35,36 +36,33 @@
 	file rename "${worksrcpath}/ASSP Documentation.htm" ${worksrcpath}/ASSPDocumentation.htm
 	file rename "${worksrcpath}/Regular Expression Tutorial.htm" ${worksrcpath}/RegularExpressionTutorial.htm
 	foreach file [glob -directory ${worksrcpath} *.pl *.sh *.htm *.txt rc/*.dat] {
-		reinplace "s%\r%%" $file
+		reinplace -locale C "s%\r%%" $file
 	}
 }
 patchfiles		patch-assp.pl.diff
 
 configure {
-	reinplace "s%^#!.*perl%#![binaryInPath perl]%" \
+	reinplace "s%^#!.*perl%#!${prefix}/bin/perl%" \
 		${worksrcpath}/assp.pl \
 		${worksrcpath}/move2num.pl \
 		${worksrcpath}/rebuildspamdb.pl \
 		${worksrcpath}/repair.pl \
 		${worksrcpath}/stat.pl
-	reinplace "s%/usr/local/assp%${assp_base}%" \
+	reinplace -locale C "s%/usr/local/assp%${assp_base}%" \
 		${worksrcpath}/ASSPDocumentation.htm \
 		${worksrcpath}/stats.sh \
 		${worksrcpath}/assp.pl \
 		${worksrcpath}/rc/assp.dat \
 		${worksrcpath}/rc/start.dat \
 		${worksrcpath}/rc/stop.dat
-	reinplace "s%/usr/local%${prefix}%" \
+	reinplace -locale C "s%/usr/local%${prefix}%" \
 		${worksrcpath}/ASSPDocumentation.htm
 }
 
 build {}
 
-pre-destroot {
-	addgroup assp
-	set gid [existsgroup assp]
-	adduser assp gid=${gid} realname=ASSP\ Proxy home=${prefix}/var/assp
-}
+add_users assp group=assp realname=ASSP\ Proxy home=${prefix}/var/assp
+
 destroot {
 	xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
 	xinstall -m 0755 -W ${worksrcpath} rc/assp.dat ${destroot}${prefix}/etc/rc.d/assp.sh
@@ -86,12 +84,6 @@
 	}
 }
 
-pre-install {
-	addgroup assp
-	set gid [existsgroup assp]
-	adduser assp gid=${gid} realname=ASSP\ Proxy home=${prefix}/var/assp
-}
-
 post-activate {
 	if {![file exists ${assp_base}/assp.cfg]} {
 		xinstall -o assp -g assp -m 0640 ${assp_base}/assp.cfg-dist \
@@ -122,4 +114,3 @@
 "
 	}
 }
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141205/ec6f63c3/attachment.html>


More information about the macports-changes mailing list