aboutsummaryrefslogtreecommitdiff
path: root/textproc/peco/Makefile
blob: 3382f6115ff612dc2624651d862ea0f90b14095b (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
PORTNAME=	peco
PORTVERSION=	0.4.4
DISTVERSIONPREFIX=	v
PORTREVISION=	9
CATEGORIES=	textproc
MASTER_SITES=	LOCAL/knu

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Simplistic interactive filtering tool
WWW=		https://github.com/peco/peco

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>