aboutsummaryrefslogtreecommitdiffstats
path: root/www/gitlab-pages/Makefile
blob: 046dda419b9bc26a1aa0ec775acac32cab4dd7fe (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
# $FreeBSD$

PORTNAME=   gitlab-pages
PORTVERSION=    1.1.0
CATEGORIES= www

MAINTAINER= swills@FreeBSD.org
COMMENT=    Official GitLab Pages daemon

LICENSE=    MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE

BUILD_DEPENDS=  go:lang/go

USE_GITLAB= yes
GL_ACCOUNT= gitlab-org
# Find the here: https://gitlab.com/gitlab-org/gitlab-pages/tags
GL_COMMIT=  5cffa83537890540d74664a43e828cd81a164980

PLIST_FILES=    bin/gitlab-pages

USE_RC_SUBR=    gitlab_pages

USERS=      gitlab-pages
GROUPS=     gitlab-pages

post-patch:
    @${MV} ${WRKSRC}/vendor ${WRKSRC}/src
    @${MKDIR} ${WRKSRC}/src/gitlab.com/gitlab-org
    @${LN} -s ${WRKSRC} ${WRKSRC}/src/gitlab.com/gitlab-org/gitlab-pages

do-build:
    cd ${WRKSRC} && ${SETENV} GOCACHE=${WRKSRC}/go CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 \
        GOPATH=${WRKSRC} GOCACHE=off \
        go build -o gitlab-pages \
        --ldflags="-X main.VERSION=${PORTVERSION} -X main.REVISION=${GITHASH}"

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/gitlab-pages ${STAGEDIR}${PREFIX}/bin/gitlab-pages

.include <bsd.port.mk>