aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/peco/Makefile
blob: 6167c899a9798f970ac7beb4203898d9f3d008b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Created by: Akinori MUSHA aka knu <knu@FreeBSD.org>
# $FreeBSD$

PORTNAME=   peco
PORTVERSION=    0.4.4
DISTVERSIONPREFIX=  v
CATEGORIES= textproc
MASTER_SITES=   LOCAL/knu

MAINTAINER= knu@FreeBSD.org
COMMENT=    Simplistic interactive filtering tool

LICENSE=    MIT

USES=       go

WRKSRC_SUBDIR=  ${GO_PKG_SUBDIR}
WRKSRC_GITDIR=  ${WRKSRC:S|/${WRKSRC_SUBDIR}$$||}
GO_PKG_GITURL=  https://github.com/${PORTNAME}/${PORTNAME}
GO_PKG_SUBDIR=  cmd/peco
GO_PKGNAME= ${GO_PKG_GITURL:S|^https://||}/${GO_PKG_SUBDIR}
PLIST_FILES=    bin/peco
UPLOAD_FILE=    ${_DISTDIR:S|/$||}/${DISTFILES:Mpeco-*.tar.gz}

post-extract:
    @${MKDIR} ${GO_WRKSRC:H:H:H}
    @${LN} -sf ${WRKSRC:H:H} ${GO_WRKSRC:H:H}

maintainer-fetch:
    @${MAKE} clean
    @${MKDIR} ${WRKSRC_GITDIR}
    @git clone ${GO_PKG_GITURL} \
        --branch v${DISTVERSION} --depth 1 ${WRKSRC_GITDIR}
    @cd ${WRKSRC_GITDIR} && glide install
    @${TAR} zcf ${UPLOAD_FILE} \
        -C ${WRKSRC_GITDIR}/.. --exclude .git ${DISTNAME}
    @${MAKE} makesum
    @${MAKE} clean

${UPLOAD_FILE}: maintainer-fetch

maintainer-distfile: ${UPLOAD_FILE}
    @rsync -aP ${UPLOAD_FILE} freefall.freebsd.org:public_distfiles/

.include <bsd.port.mk>