source: trunk/dports/sysutils/peco/Portfile @ 129506

Last change on this file since 129506 was 129506, checked in by ionic@…, 5 years ago

PortGroup/{github,bitbucket}: rename source archives containing a top level dir of project-name-hash instead of name-version.

This patch enables the post-extract hook for all ports appending some
distfile location to ${master_sites}, as long as the original github or
bitbucket source is left intact within the ${master_sites} list.

Remove workarounds needed in a few ports to achieve exactly this.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 129506 2014-12-15 00:11:38Z ionic@macports.org $
2
3PortSystem      1.0
4PortGroup       github 1.0
5
6github.setup    peco peco 0.2.10 v
7revision        0
8categories      sysutils
9homepage        http://peco.github.io
10description     Simplistic interactive filtering tool
11long_description \
12        peco can be a great tool to filter stuff like logs, process stats, find \
13        files, because unlike grep, you can type as you think and look through  \
14        the current results.
15license         MIT
16
17maintainers     kimuraw openmaintainer
18platforms       darwin
19
20depends_build   port:go
21use_configure   no
22dist_subdir     go
23
24# peco
25checksums       peco-${version}.tar.gz \
26                    md5 82a330e2869dad7bb0bae53f95cceb8b \
27                    sha1 01ec71c1d725487689d4fd3e32e10958bdff33dc \
28                    sha256 4e15ae9733ca6c786ddca5cae57fa921423f8c0a99d71e730af42b6a3c8764ac
29
30# dependencies to build. remember revbump when you change version of dependencies.
31set go-flags.version        1
32set go-runewidth.version    d70c973ddedf458fb28531e3335a972c2cc28b00
33set termbox-go.version      bb19a81afd4bc2729799d1fedb19f7bd7ee284cf
34# dependencies
35master_sites-append https://github.com/jessevdk/go-flags/tarball/v${go-flags.version}:go-flags \
36                    https://github.com/mattn/go-runewidth/tarball/${go-runewidth.version}:go-runewidth \
37                    https://github.com/nsf/termbox-go/tarball/${termbox-go.version}:termbox-go
38distfiles-append    jessevdk-go-flags-v${go-flags.version}.tar.gz:go-flags \
39                    mattn-go-runewidth-${go-runewidth.version}.tar.gz:go-runewidth \
40                    nsf-termbox-go-${termbox-go.version}.tar.gz:termbox-go
41checksums-append    jessevdk-go-flags-v${go-flags.version}.tar.gz \
42                        md5 33244c6469610036f0c38b8c772f7533 \
43                        sha1 0a0878b70fa263efc3fcb330c999138772a43893 \
44                        sha256 e384b7a12c91ad9202e208665cc51c5fbdf1eb21711fd9fce67426abc5adb58f \
45                    mattn-go-runewidth-${go-runewidth.version}.tar.gz \
46                        md5 bef4925c7f295716df921309f82b4394 \
47                        sha1 b9b8b60f15f1298483b07545bc41f9b6e6d2a79f \
48                        sha256 fb03cbe156fc21b974a350ca76afe667e9aa3cab08010cf36a902f32792c8723 \
49                    nsf-termbox-go-${termbox-go.version}.tar.gz \
50                        md5 71def2ea8d475fae61fe35859a545b0c \
51                        sha1 90c8c0876155882da3907190309918e184d7a8f8 \
52                        sha256 638d8798ac7c07f9277298a4cacbc11c62642db73715be6f7a4085ab90efecb8
53
54# setup build sources like this:
55#   workpath/
56#       peco-0.1.12/
57#       gopath/src/github.com/
58#           peco/peco/
59#           jessevdk/go-flags-v/
60#             :
61set gopath      ${workpath}/GOPATH
62post-extract {
63    file mkdir ${gopath}/src/github.com/peco
64    ln -s ${worksrcpath} ${gopath}/src/github.com/peco/peco
65    file mkdir ${gopath}/src/github.com/jessevdk
66    move [glob ${workpath}/jessevdk-go-flags-*] ${gopath}/src/github.com/jessevdk/go-flags
67    file mkdir ${gopath}/src/github.com/mattn
68    move [glob ${workpath}/mattn-go-runewidth-*] ${gopath}/src/github.com/mattn/go-runewidth
69    file mkdir ${gopath}/src/github.com/nsf
70    move [glob ${workpath}/nsf-termbox-go-*] ${gopath}/src/github.com/nsf/termbox-go
71}
72
73build.cmd       go
74build.target    build
75build.args      cmd/peco/peco.go
76build.env       GOPATH="${gopath}"
77
78destroot {
79    xinstall ${worksrcpath}/peco ${destroot}${prefix}/bin
80}
Note: See TracBrowser for help on using the repository browser.