From 5e4a0c8b9d467ad2516771f877547ac17752f7d0 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 6 Oct 2007 16:06:37 +0000 Subject: New MacPorts Portfile template. Installs pandoc programs and libraries. Note that 'make install-all' cannot be used to install the libraries, because registration must be done after the files are copied out of the destroot. So a custom install procedure is included in the Portfile. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1041 788f1e2b-df1e-0410-8736-df70ead52e1b --- macports/Portfile.in | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'macports') diff --git a/macports/Portfile.in b/macports/Portfile.in index 24c63dbda..03c50012c 100644 --- a/macports/Portfile.in +++ b/macports/Portfile.in @@ -25,23 +25,28 @@ build.args PREFIX=${prefix} build.target build-all destroot { - cd ${worksrcpath} - # This command installs the pandoc executable, the haskell libraries, and - # the haddock library documentation: - system "./setup copy --destdir=${destroot}" + # install pandoc executable, libraries, and library documentation: + system "(cd ${worksrcpath}; ./setup copy --destdir=${destroot})" + # strip the pandoc binary: system "strip ${destroot}${prefix}/bin/pandoc" - system "./setup register --gen-script" - system "./setup unregister --gen-script" + # create scripts to register libraries in post-activate phase: + system "(cd ${worksrcpath}; ./setup register --gen-script)" + system "(cd ${worksrcpath}; ./setup unregister --gen-script)" + # install register/unregister scripts: xinstall -d ${destroot}${prefix}/libexec/${name}-${version} - xinstall -m 755 register.sh ${destroot}${prefix}/libexec/${name}-${version} - xinstall -m 755 unregister.sh ${destroot}${prefix}/libexec/${name}-${version} - xinstall -m 755 markdown2pdf html2markdown hsmarkdown \ + xinstall -m 755 ${worksrcpath}/register.sh \ + ${destroot}${prefix}/libexec/${name}-${version} + xinstall -m 755 ${worksrcpath}/unregister.sh \ + ${destroot}${prefix}/libexec/${name}-${version} + # install shell scripts: + xinstall -m 755 -W ${worksrcpath} html2markdown hsmarkdown markdown2pdf \ ${destroot}${prefix}/bin + # install user documentation and man pages: xinstall -d ${destroot}${prefix}/share/doc/${name} - xinstall -m 644 README README.html COPYRIGHT BUGS \ + xinstall -m 644 -W ${worksrcpath} README README.html COPYRIGHT BUGS \ ${destroot}${prefix}/share/doc/${name} - xinstall -m 644 -W man/man1 pandoc.1 hsmarkdown.1 markdown2pdf.1 \ - html2markdown.1 ${destroot}${prefix}/share/man/man1 + xinstall -m 644 -W ${worksrcpath}/man/man1 pandoc.1 hsmarkdown.1 \ + markdown2pdf.1 html2markdown.1 ${destroot}${prefix}/share/man/man1 } post-activate { -- cgit v1.2.3