add new util script to update the macports Portfile
[monkeysphere.git] / packaging / macports / Portfile
index e6176d0d313309f221b0c163a310180708910903..fd2eafe72af225879834d77367b4a05e344208e3 100644 (file)
@@ -3,7 +3,7 @@
 
 PortSystem          1.0
 name                monkeysphere
 
 PortSystem          1.0
 name                monkeysphere
-version             0.24
+version             0.25
 categories          net security
 maintainers         nomaintainer
 description         use the OpenPGP web of trust to verify ssh connections
 categories          net security
 maintainers         nomaintainer
 description         use the OpenPGP web of trust to verify ssh connections
@@ -20,8 +20,9 @@ platforms           darwin
 
 depends_run         bin:ssh:openssh \
                     port:gnupg \
 
 depends_run         bin:ssh:openssh \
                     port:gnupg \
-                    port:perl5.10 \
-                    port:p5-crypt-rsa \
+                    port:perl5 \
+                    port:p5-crypt-openssl-rsa \
+                    port:p5-crypt-openssl-bignum \
                     port:p5-digest-sha1 \
                     port:procmail
 
                     port:p5-digest-sha1 \
                     port:procmail
 
@@ -29,19 +30,40 @@ master_sites        http://archive.monkeysphere.info/debian/pool/monkeysphere/m/
 distname            ${name}_${version}
 extract.suffix      .orig.tar.gz
 worksrcdir          ${name}-${version}
 distname            ${name}_${version}
 extract.suffix      .orig.tar.gz
 worksrcdir          ${name}-${version}
-checksums           md5 8590532f4702fa44027a6a583657c9ef
-
-patch.dir           ${worksrcpath}
-patch.cmd           make
-patch.args          -f Makefile \
-                    WRKSRC=${worksrcpath} \
-                    SYSETCDIR=${destroot}${prefix}/etc/monkeysphere \
-                    SYSDATADIR=${destroot}${prefix}/var/db/monkeysphere \
-                    SYSSHAREDIR=${destroot}${prefix}/share/monkeysphere \
-                    post-patch
+checksums           md5 3ac1918eee99725869e65f3f5a24fe17
 
 use_configure       no
 
 
 use_configure       no
 
+post-build {
+    # update paths to SYS*DIRs
+    exec sed -i .tmp -e "s|/etc/monkeysphere|${prefix}/etc/monkeysphere|g" \
+        ${worksrcpath}/src/share/defaultenv \
+        ${worksrcpath}/src/transitions/0.23 \
+        ${worksrcpath}/man/man1/monkeysphere.1 \
+        ${worksrcpath}/man/man8/monkeysphere-authentication.8 \
+        ${worksrcpath}/man/man8/monkeysphere-host.8 \
+        ${worksrcpath}/etc/monkeysphere-authentication.conf
+    exec sed -i .tmp -e "s|/var/lib/monkeysphere|${prefix}/var/db/monkeysphere|g" \
+        ${worksrcpath}/src/transitions/0.23 \
+        ${worksrcpath}/man/man1/monkeysphere.1 \
+        ${worksrcpath}/man/man8/monkeysphere-authentication.8 \
+        ${worksrcpath}/man/man8/monkeysphere-host.8 \
+        ${worksrcpath}/src/monkeysphere-host \
+        ${worksrcpath}/src/monkeysphere-authentication \
+        ${worksrcpath}/doc/getting-started-admin.mdwn
+    exec sed -i .tmp -e "s|/usr/share/monkeysphere|${prefix}/share/monkeysphere|g" \
+        ${worksrcpath}/src/monkeysphere-host \
+        ${worksrcpath}/src/monkeysphere-authentication \
+        ${worksrcpath}/src/monkeysphere
+
+    # fix perl shebang line to point to macports perl install
+    exec sed -i .tmp -e "s|^#!/usr/bin/perl -T$|#!/opt/local/bin/perl -T|" \
+        ${worksrcpath}/src/share/keytrans
+
+    # remove leftover sed cruft
+    exec find ${worksrcpath} -name *.tmp -delete
+}
+
 destroot.destdir    DESTDIR=${destroot}${prefix}
 destroot.args       PREFIX=
 
 destroot.destdir    DESTDIR=${destroot}${prefix}
 destroot.args       PREFIX=