aboutsummaryrefslogtreecommitdiff
path: root/net/geoipupdate/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'net/geoipupdate/Makefile')
-rw-r--r--net/geoipupdate/Makefile44
1 files changed, 33 insertions, 11 deletions
diff --git a/net/geoipupdate/Makefile b/net/geoipupdate/Makefile
index 7bf0c63844ce..d7b6645aede3 100644
--- a/net/geoipupdate/Makefile
+++ b/net/geoipupdate/Makefile
@@ -2,26 +2,48 @@
# $FreeBSD$
PORTNAME= geoipupdate
-PORTVERSION= 3.1.1
+PORTVERSION= 4.0.0
+DISTVERSIONPREFIX= v
CATEGORIES= net geography
-MASTER_SITES= https://github.com/maxmind/geoipupdate/releases/download/v${PORTVERSION}/
MAINTAINER= adamw@FreeBSD.org
-COMMENT= Fetch the latest copies of the paid GeoIP2 databases
+COMMENT= Fetch the latest copies of the GeoIP2 databases
-LICENSE= GPLv2
-LICENSE_FILE= ${WRKSRC}/LICENSE
+LICENSE= APACHE20 MIT
+LICENSE_COMB= dual
+LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE
+LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT
-LIB_DEPENDS= libcurl.so:ftp/curl
+BUILD_DEPENDS= go:lang/go
+RUN_DEPENDS= ca_root_nss>=3:security/ca_root_nss
-USES= libtool localbase pathfix
-GNU_CONFIGURE= yes
+USES= gmake
+USE_GITHUB= yes
+GH_ACCOUNT= maxmind
+
+MAKE_ENV+= GOPATH=${WRKSRC}
OPTIONS_DEFINE= DOCS
-post-install:
+PLIST_FILES= bin/geoipupdate \
+ '@sample etc/GeoIP.conf.sample' \
+ '@dir share/GeoIP'
+PORTDOCS= GeoIP.conf.md geoipupdate.md
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/Makefile
+
+do-build:
+ ${MV} ${WRKSRC}/vendor ${WRKSRC}/src
+ ${DO_MAKE_BUILD} -C ${WRKSRC}
+
+do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/GeoIP
- ${MV} ${STAGEDIR}${DOCSDIR}/GeoIP.conf.default \
- ${STAGEDIR}${PREFIX}/etc/GeoIP.conf.sample
+ ${INSTALL_PROGRAM} ${WRKSRC}/build/geoipupdate ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/build/GeoIP.conf ${STAGEDIR}${PREFIX}/etc/GeoIP.conf.sample
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/build && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>