Ticket #58757: Portfile

File Portfile, 1.8 KB (added by someuser12, 5 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 8; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4
2# vim: set fileencoding=utf-8 tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab filetype=tcl :
3
4PortSystem 1.0
5
6#PortGroup           github 1.0
7
8name                pdftk-java
9set git_project     pdftk
10set git_commit      1aab675b178baf38601f8898ca3530dc222bed97
11set git_date        20190702
12version             ${git_date}
13
14categories          textproc graphics pdf java
15maintainers         nomaintainer
16license             GPL-2
17platforms           darwin
18description         A port of pdftk into java
19long_description    ${description}
20supported_archs     noarch
21
22homepage            https://gitlab.com/pdftk-java/${git_project}
23master_sites        https://gitlab.com/pdftk-java/${git_project}/-/archive/${git_commit}/
24
25checksums           rmd160  02546b6b1553348f4b5b74fd421a8ed2a84bd282 \
26                    sha256  306c73693bc24fa7b6ea32967a7028cb027b4658f4eae96cb3a046c413da07d8 \
27                    size    1360035
28
29depends_build       bin:ant:apache-ant port:bcprov port:commons-lang3
30
31worksrcdir          ${git_project}-${git_commit}
32
33use_configure       no
34
35pre-build {
36    file mkdir ${worksrcpath}/lib
37    system "cd ${worksrcpath}/lib && ln -s ${prefix}/share/java/bcprov/bcprov.jar"
38    system "cd ${worksrcpath}/lib && ln -s ${prefix}/share/java/commons-lang3.jar"
39}
40
41build.cmd           ant
42build.target        jar
43
44destroot {
45    set javadir ${destroot}${prefix}/share/java
46    xinstall -d -m 755 -d ${javadir}/${name}
47    xinstall -m 644 ${worksrcpath}/build/jar/${git_project}.jar ${javadir}/${name}/${git_project}.jar
48
49    # Install the wrapper script
50    xinstall -m 755 ${filespath}/pdftk-java ${destroot}${prefix}/bin/${name}
51    reinplace "s|_PREFIX_|${prefix}|g" ${destroot}${prefix}/bin/${name}
52}
53