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

ryandesign at macports.org ryandesign at macports.org
Sun Jan 13 03:10:52 PST 2008


Revision: 32779
          http://trac.macosforge.org/projects/macports/changeset/32779
Author:   ryandesign at macports.org
Date:     2008-01-13 03:10:50 -0800 (Sun, 13 Jan 2008)

Log Message:
-----------
assp: no longer use the deprecated 'cd' command

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

Modified: trunk/dports/mail/assp/Portfile
===================================================================
--- trunk/dports/mail/assp/Portfile	2008-01-13 11:04:07 UTC (rev 32778)
+++ trunk/dports/mail/assp/Portfile	2008-01-13 11:10:50 UTC (rev 32779)
@@ -30,32 +30,30 @@
 set assp_base	${prefix}/var/assp
 
 pre-patch {
-	cd ${worksrcpath}
-	file rename "ASSP Documentation.htm" "ASSPDocumentation.htm"
-	file rename "Regular Expression Tutorial.htm" RegularExpressionTutorial.htm
-	foreach file [glob *.pl *.sh *.htm *.txt rc/*.dat] {
+	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
 	}
 }
 patchfiles		patch-assp.pl
 
 configure {
-	cd ${worksrcpath}
 	reinplace "s%^#!.*perl%#![binaryInPath perl]%" \
-		assp.pl \
-		move2num.pl \
-		rebuildspamdb.pl \
-		repair.pl \
-		stat.pl
+		${worksrcpath}/assp.pl \
+		${worksrcpath}/move2num.pl \
+		${worksrcpath}/rebuildspamdb.pl \
+		${worksrcpath}/repair.pl \
+		${worksrcpath}/stat.pl
 	reinplace "s%/usr/local/assp%${assp_base}%" \
-		ASSPDocumentation.htm \
-		stats.sh \
-		assp.pl \
-		rc/assp.dat \
-		rc/start.dat \
-		rc/stop.dat
+		${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}%" \
-		ASSPDocumentation.htm
+		${worksrcpath}/ASSPDocumentation.htm
 }
 
 build {}
@@ -66,30 +64,22 @@
 	adduser assp gid=${gid} realname=ASSP\ Proxy home=${prefix}/var/assp
 }
 destroot {
-	cd ${worksrcpath}
-
 	xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
-	xinstall -m 0755 rc/assp.dat ${destroot}${prefix}/etc/rc.d/assp.sh
+	xinstall -m 0755 -W ${worksrcpath} rc/assp.dat ${destroot}${prefix}/etc/rc.d/assp.sh
 
 	xinstall -o assp -g assp -d -m 0755 ${destroot}${assp_base}
 	xinstall -o assp -g assp -m 0640 ${filespath}/assp.cfg.in \
 		${destroot}${assp_base}/assp.cfg-dist
 	reinplace "s%__BASE%${assp_base}%" ${destroot}${assp_base}/assp.cfg-dist
-	xinstall -o assp -g assp -m 0755 rc/start.dat ${destroot}${assp_base}/start
-	xinstall -o assp -g assp -m 0755 rc/stop.dat ${destroot}${assp_base}/stop
-	foreach file {freshclam.sh stats.sh} {
-		xinstall -o assp -g assp -m 0755 $file ${destroot}${assp_base}
-	}
-	foreach file {assp.pl move2num.pl rebuildspamdb.pl repair.pl stat.pl} {
-		xinstall -o assp -g assp -m 0755 $file ${destroot}${assp_base}
-	}
-	foreach file {notspamreport.txt spamreport.txt whitereport.txt} {
-		xinstall -o assp -g assp -m 0644 $file ${destroot}${assp_base}
-	}
+	xinstall -o assp -g assp -m 0755 -W ${worksrcpath} rc/start.dat ${destroot}${assp_base}/start
+	xinstall -o assp -g assp -m 0755 -W ${worksrcpath} rc/stop.dat ${destroot}${assp_base}/stop
+	xinstall -o assp -g assp -m 0755 -W ${worksrcpath} freshclam.sh stats.sh ${destroot}${assp_base}
+	xinstall -o assp -g assp -m 0755 -W ${worksrcpath} assp.pl move2num.pl rebuildspamdb.pl repair.pl stat.pl ${destroot}${assp_base}
+	xinstall -o assp -g assp -m 0644 -W ${worksrcpath} notspamreport.txt spamreport.txt whitereport.txt ${destroot}${assp_base}
 
 	xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
-	xinstall -m 0644 changelog.txt ${destroot}${prefix}/share/doc/${name}
-	foreach file [glob *.htm] {
+	xinstall -m 0644 -W ${worksrcpath} changelog.txt ${destroot}${prefix}/share/doc/${name}
+	foreach file [glob -directory ${worksrcpath} *.htm] {
 		xinstall -m 0644 $file ${destroot}${prefix}/share/doc/${name}
 	}
 }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080113/cb4d57eb/attachment.html


More information about the macports-changes mailing list