Ticket #44197: Portfile-3.4

File Portfile-3.4, 3.2 KB (added by steve+macports@…, 10 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 77189 2011-03-22 07:30:33Z jmr@macports.org $
3
4PortSystem 1.0
5
6name            launch4j
7version         3.4
8categories      java
9license         BSD
10maintainers     panayotis.com:panayotis
11description     Cross-platform Java executable wrapper
12long_description \
13                Launch4j is a cross-platform tool for wrapping Java \
14                applications distributed as jars in lightweight Windows \
15                native executables. The executable can be configured to \
16                search for a certain JRE version or use a bundled one, \
17                and it's possible to set runtime options, like the \
18                initial/max heap size. The wrapper also provides better \
19                user experience through an application icon, a native \
20                pre-JRE splash screen, a custom process name, and a Java \
21                download page in case the appropriate JRE cannot be found.
22homepage        http://launch4j.sourceforge.net/
23platforms       darwin
24
25master_sites    sourceforge
26distname        launch4j-${version}-macosx-x86
27extract.suffix  .tgz
28checksums       rmd160 3267bb1d24d0d457b2cf06596529565e3c343327 \
29                sha256 4d2c6c2928d2093b4be7d949aecbefe8b09c3660ea1ed400bd24f6f267f4eefe
30worksrcdir      launch4j
31
32use_configure   no
33build           {}
34
35destroot {
36    # set install paths
37    set l4jdir ${prefix}/share/${name}
38    set l4jdoc ${prefix}/share/doc/${name}
39
40    # delete source control files
41    file delete ${worksrcpath}/.gitignore
42    file delete ${worksrcpath}/demo/ConsoleApp/.gitignore
43    file delete ${worksrcpath}/demo/SimpleApp/.gitignore
44
45    # delete build files
46    file delete ${worksrcpath}/.classpath
47    file delete ${worksrcpath}/.project
48    file delete -force ${worksrcpath}/.settings
49    file delete ${worksrcpath}/build.xml
50    file delete ${worksrcpath}/launch4j.jfpr
51
52    # delete source files
53    file delete -force ${worksrcpath}/head_src
54    file delete -force ${worksrcpath}/src
55    file delete -force ${worksrcpath}/sign4j
56
57    # delete windows executable
58    file delete ${worksrcpath}/launch4j.exe
59
60    # set absolute path to jar in wrapper script
61    set jar_relpath {"$(dirname "$0")"/launch4j.jar}
62    set jar_abspath '${l4jdir}/launch4j.jar'
63    reinplace "s|${jar_relpath}|${jar_abspath}|g" ${worksrcpath}/launch4j
64
65    # install documentation
66    xinstall -d -m 755 ${destroot}${l4jdoc}
67    file rename ${worksrcpath}/LICENSE.txt ${destroot}${l4jdoc}
68    file rename ${worksrcpath}/bin/COPYING ${destroot}${l4jdoc}/bin.COPYING
69    file rename ${worksrcpath}/head/LICENSE.txt ${destroot}${l4jdoc}/head.LICENSE.txt
70    file rename ${worksrcpath}/w32api/MinGW.LICENSE.txt ${destroot}${l4jdoc}
71    foreach doc {JGoodies.Forms JGoodies.Looks Nuvola.Icon.Theme XStream ant commons foxtrot} {
72        file rename ${worksrcpath}/lib/${doc}.LICENSE.txt ${destroot}${l4jdoc}
73    }
74    file rename ${worksrcpath}/web ${destroot}${l4jdoc}
75    file rename ${worksrcpath}/demo ${destroot}${l4jdoc}
76
77    # install launch4j
78    file copy ${worksrcpath} ${destroot}${l4jdir}
79    ln -s ${l4jdir}/launch4j ${destroot}${prefix}/bin/${name}
80}