Line 0
Link Here
|
|
|
1 |
# $FreeBSD$ |
2 |
|
3 |
PORTNAME= mtg |
4 |
DISTVERSION= 0.15.1 |
5 |
CATEGORIES= net |
6 |
|
7 |
MAINTAINER= onlinehead@gmail.com |
8 |
COMMENT= Golang implementation of MTProto proxy server for Telegram |
9 |
|
10 |
LICENSE= MIT |
11 |
LICENSE_FILE= ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/LICENSE |
12 |
|
13 |
BUILD_DEPENDS= git:devel/git |
14 |
|
15 |
USES= go |
16 |
|
17 |
GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} |
18 |
|
19 |
USE_GITHUB= yes |
20 |
GH_ACCOUNT= 9seconds |
21 |
GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME} |
22 |
|
23 |
MAKE_ENV+= GO111MODULE=on |
24 |
USE_RC_SUBR= mtg |
25 |
|
26 |
post-patch: |
27 |
@${MKDIR} ${WRKSRC}/src/golang.org |
28 |
|
29 |
do-build: |
30 |
@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}; \ |
31 |
${SETENV} ${MAKE_ENV} ${BUILD_ENV} GO111MODULE=on go build -ldflags \ |
32 |
"-s -w -X 'main.version=v${DISTVERSION}'" -o mtg; |
33 |
|
34 |
do-install: |
35 |
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${GH_PROJECT}/mtg ${STAGEDIR}${PREFIX}/bin/mtg |
36 |
|
37 |
.include <bsd.port.mk> |