Ticket #51158: Portfile.2

File Portfile.2, 3.1 KB (added by RJVB (René Bertin), 8 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 $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           php 1.1
7
8name                arcanist
9subport             libphutil {}
10
11# github.set will override name, so do not count on ${name} as a
12# way to determine which subport we're installing, nowhere.
13
14if {${subport} eq "arcanist"} {
15    github.setup    phacility ${subport} 3b6b523c2b236e3724a1e115f126cb6fd05fa128
16    fetch.type      git
17    version         20170218
18    depends_run-append \
19                    port:libphutil
20    description     Phabricator command-line tool
21    long_description \
22                    Arcanist is the command-line tool for Phabricator (http://phabricator.org). \
23                    It allows you to interact with Phabricator installs to send code for review, \
24                    download patches, transfer files, view status, make API calls, and various other \
25                    things.
26#     checksums       rmd160  3e22952da6203306bdd8b6aeac2081a61cbc898f \
27#                     sha256  2718772f3ff3661642b0a4da72ecc201e2d899451ab2739bb0908697c9604f8c
28    notes-append "${subport} can be updated with `sudo arc upgrade` but this is not MacPorts-supported\
29and may lead to issues when applying subsequent port updates."
30} else {
31    github.setup    phacility ${subport} 13a200ca7621ab2b48a0c395f52f8c4411bbc686
32    fetch.type      git
33    # conduit-5-1116-g13a200c
34    version         5.1116
35    epoch           1
36    description     A collection of utility classes and functions for PHP
37    long_description \
38                    ${description}.
39#     checksums       rmd160  8384bf8bc671348f29f0535244c41188f81b76e6 \
40#                     sha256  3e7ce2b17468a241ee1d40eb15bfbb7704c3f0dae81e16c6be6eb9ea714bbed4
41}
42
43categories          devel
44license             Apache-2
45maintainers         gmail.com:rjvbertin
46supported_archs     noarch
47installs_libs       no
48
49platform darwin {
50    depends_run-append \
51                    port:php[php.suffix_from_branch ${php.latest_stable_branch}] \
52                    port:php[php.suffix_from_branch ${php.latest_stable_branch}]-curl
53}
54
55use_configure       no
56
57build {
58    # remove all but the last commit from the history
59    system -W ${worksrcpath} "${filespath}/git-kill-history"
60}
61
62destroot {
63    xinstall -m 755 -d ${destroot}${prefix}/libexec
64#     system "cp -pR ${worksrcpath} ${destroot}${prefix}/libexec/${subport}"
65    # do a local clone operation which will discard much of the remaining history
66    # but still install a .git directory which arcanist needs for certain of its features.
67    system "git clone --depth 1 file://${worksrcpath} ${destroot}${prefix}/libexec/${subport}"
68    system -W "${destroot}${prefix}/libexec/${subport}" "${filespath}/git-eradicate"
69    file delete -force ${destroot}${prefix}/libexec/${subport}/.git/config
70    xinstall -m 755 ${worksrcpath}/.git/config ${destroot}${prefix}/libexec/${subport}/.git/config
71    if {${subport} eq "arcanist"} {
72        ln -s ${prefix}/libexec/${subport}/bin/arc ${destroot}${prefix}/bin/arc
73    }
74}