Ticket #25658: Portfile

File Portfile, 1.8 KB (added by lists@…, 14 years ago)

sbt Portfile

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$
3
4PortSystem                      1.0
5
6# Note the googlecode project full name.
7set project_name "simple-build-tool"
8
9name                    sbt
10version                 0.7.4
11
12categories              devel java
13maintainers             jon.buffington.name:me
14platforms               darwin
15
16description             Simple build tool (sbt) is designed to simplify building Scala projects.
17
18long_description        Simple build tool (sbt) is provides unintrusive and easy to set up for simple \
19                                        Scala projects. All configuration, customization, and extension are done in Scala. \
20                                        Sbt supports continuous compilation and testing with triggered execution in \
21                                        mixed Scala/Java projects.
22
23homepage                        http://code.google.com/p/${project_name}/
24
25master_sites            googlecode:${project_name}
26
27checksums               md5     8903fb141037056a497925f3efdb9edf \
28                        sha1    2b7cfadf05b3b26285bb2038145479741268d334 \
29                        rmd160  19c39da679d05b600fde06acf9acf657a7701f93
30
31depends_build           bin:java:kaffe
32
33distname                        ${name}-launch-${version}
34
35# Name the wrapper shell script.
36set wrapper "sbt.sh"
37
38extract.suffix          .jar
39extract.mkdir           yes
40pre-extract {
41        file copy ${filespath}/${wrapper} ${worksrcpath}
42}
43
44set jarname ${distname}${extract.suffix}
45
46configure {
47        reinplace "s|__SBT_LAUNCHER_PATH__|${prefix}/share/${name}/${jarname}|g" ${worksrcpath}/${wrapper}
48}
49
50use_configure           no
51universal_variant       no
52build               {}
53
54destroot {
55        set sbtdir "${destroot}${prefix}/share/${name}"
56
57        xinstall -m 755 -d ${sbtdir}
58        xinstall -m 644 ${distpath}/${jarname} ${sbtdir}/
59        xinstall -m 755 ${worksrcpath}/${wrapper} ${sbtdir}/${name}
60
61        # Symlink sbt into the bin directory.
62        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/${name}/${name}"
63}