From 0e2af948ab640cd4865d41951c7b8c2a35437f59 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 4 Apr 2009 23:37:15 -0700 Subject: [PATCH] macports: attempt at something that would 'patch' in the correct SYS..DIR variables --- packaging/macports/Makefile | 23 +++++++++++++++++++++++ packaging/macports/Portfile | 17 +++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 packaging/macports/Makefile diff --git a/packaging/macports/Makefile b/packaging/macports/Makefile new file mode 100644 index 0000000..10d9547 --- /dev/null +++ b/packaging/macports/Makefile @@ -0,0 +1,23 @@ +# use proper system paths for MacPorts instead of Debian's: +post-patch: + @${REINPLACE_CMD} -e 's|/etc/monkeysphere|'$(SYSETCDIR)'|g' \ + ${WRKSRC}/src/share/defaultenv \ + ${WRKSRC}/src/transitions/0.23 \ + ${WRKSRC}/man/man1/monkeysphere.1 \ + ${WRKSRC}/man/man8/monkeysphere-authentication.8 \ + ${WRKSRC}/man/man8/monkeysphere-host.8 \ + ${WRKSRC}/etc/monkeysphere-authentication.conf + @${REINPLACE_CMD} -e 's|/var/lib/monkeysphere|'$(SYSDATADIR)'|g' \ + ${WRKSRC}/src/transitions/0.23 \ + ${WRKSRC}/man/man1/monkeysphere.1 \ + ${WRKSRC}/man/man8/monkeysphere-authentication.8 \ + ${WRKSRC}/man/man8/monkeysphere-host.8 \ + ${WRKSRC}/src/monkeysphere-host \ + ${WRKSRC}/src/monkeysphere-authentication \ + ${WRKSRC}/doc/getting-started-admin.mdwn + @${REINPLACE_CMD} -e 's|/usr/share/monkeysphere|'$(SYSSHAREDIR)'|g' \ + ${WRKSRC}/src/monkeysphere-host \ + ${WRKSRC}/src/monkeysphere-authentication \ + ${WRKSRC}/src/monkeysphere + # and clean up cruft from the sed replacements: + ${FIND} ${WRKSRC} -name '*.bak' -delete diff --git a/packaging/macports/Portfile b/packaging/macports/Portfile index 9680b4e..e6176d0 100644 --- a/packaging/macports/Portfile +++ b/packaging/macports/Portfile @@ -30,6 +30,23 @@ 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 + use_configure no + destroot.destdir DESTDIR=${destroot}${prefix} destroot.args PREFIX= + +# variant to use the port version of bash, which may be much newer +# than the one provided by the system +variant port-bash description {use port version of Bash} { + depends_run-append port:bash +} -- 2.25.1