aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-09-18 15:23:20 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-09-18 15:23:20 +0000
commit2b429e980e81c31bacbf2f2242a2c8a119a91743 (patch)
tree3609a908901d695bbf2475de532dbb6ab12921a1
parent87fb10a316aaed3a1922708ee72293d3525c7bb4 (diff)
downloadpandoc-2b429e980e81c31bacbf2f2242a2c8a119a91743.tar.gz
Fixed macports Portfile:
+ Do installation manually rather than using Makefile's install-all. (There appears to be a problem with the Makefile's handling of DESTDIR.) + Note that the library must be registered in the activate phase, after the library files have been copied out of the destroot. Cabal generates a 'register.sh' script that will do this. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1028 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--macports/Portfile.in30
1 files changed, 29 insertions, 1 deletions
diff --git a/macports/Portfile.in b/macports/Portfile.in
index 106380c82..24c63dbda 100644
--- a/macports/Portfile.in
+++ b/macports/Portfile.in
@@ -23,4 +23,32 @@ depends_lib port:gmp
use_configure no
build.args PREFIX=${prefix}
build.target build-all
-destroot.target install-all
+
+destroot {
+ cd ${worksrcpath}
+ # This command installs the pandoc executable, the haskell libraries, and
+ # the haddock library documentation:
+ system "./setup copy --destdir=${destroot}"
+ system "strip ${destroot}${prefix}/bin/pandoc"
+ system "./setup register --gen-script"
+ system "./setup unregister --gen-script"
+ 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 \
+ ${destroot}${prefix}/bin
+ xinstall -d ${destroot}${prefix}/share/doc/${name}
+ xinstall -m 644 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
+}
+
+post-activate {
+ # Register the library with the ghc package database:
+ system "${prefix}/libexec/${name}-${version}/register.sh"
+}
+
+#pre-deactivate {
+# system "${prefix}/libexec/${name}-${version}/unregister.sh"
+#}