| 25 | build.target build-all |
| 26 | |
| 27 | destroot { |
| 28 | # install pandoc executable, libraries, and library documentation: |
| 29 | system "(cd ${worksrcpath}; ./setup copy --destdir=${destroot})" |
| 30 | # strip the pandoc binary: |
| 31 | system "strip ${destroot}${prefix}/bin/pandoc" |
| 32 | # create scripts to register libraries in post-activate phase: |
| 33 | system "(cd ${worksrcpath}; ./setup register --gen-script)" |
| 34 | system "(cd ${worksrcpath}; ./setup unregister --gen-script)" |
| 35 | # install register/unregister scripts: |
| 36 | xinstall -d ${destroot}${prefix}/libexec/${name}-${version} |
| 37 | xinstall -m 755 ${worksrcpath}/register.sh \ |
| 38 | ${destroot}${prefix}/libexec/${name}-${version} |
| 39 | xinstall -m 755 ${worksrcpath}/unregister.sh \ |
| 40 | ${destroot}${prefix}/libexec/${name}-${version} |
| 41 | # install shell scripts: |
| 42 | xinstall -m 755 -W ${worksrcpath} html2markdown hsmarkdown markdown2pdf \ |
| 43 | ${destroot}${prefix}/bin |
| 44 | # install user documentation and man pages: |
| 45 | xinstall -d ${destroot}${prefix}/share/doc/${name} |
| 46 | xinstall -m 644 -W ${worksrcpath} README README.html COPYRIGHT BUGS \ |
| 47 | ${destroot}${prefix}/share/doc/${name} |
| 48 | xinstall -m 644 -W ${worksrcpath}/man/man1 pandoc.1 hsmarkdown.1 \ |
| 49 | markdown2pdf.1 html2markdown.1 ${destroot}${prefix}/share/man/man1 |
| 50 | } |
| 51 | |
| 52 | post-activate { |
| 53 | # Register the library with the ghc package database: |
| 54 | system "${prefix}/libexec/${name}-${version}/register.sh" |
| 55 | } |
| 56 | |
| 57 | #pre-deactivate { |
| 58 | # system "${prefix}/libexec/${name}-${version}/unregister.sh" |
| 59 | #} |