[arch-commits] Commit in v2ray-geoip/repos (community-any community-any/PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sun Jun 16 08:59:07 UTC 2019


    Date: Sunday, June 16, 2019 @ 08:59:06
  Author: felixonmars
Revision: 481820

archrelease: copy trunk to community-any

Added:
  v2ray-geoip/repos/community-any/
  v2ray-geoip/repos/community-any/PKGBUILD
    (from rev 481819, v2ray-geoip/trunk/PKGBUILD)

----------+
 PKGBUILD |   32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Copied: v2ray-geoip/repos/community-any/PKGBUILD (from rev 481819, v2ray-geoip/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2019-06-16 08:59:06 UTC (rev 481820)
@@ -0,0 +1,32 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=v2ray-geoip
+pkgver=20190611
+pkgrel=1
+pkgdesc="GeoIP List for V2Ray"
+arch=('any')
+url="https://github.com/v2ray/geoip"
+license=('MIT')
+makedepends=('go-pie' 'git')
+source=("GeoLite2-Country-CSV-$pkgver.zip::https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip")
+sha512sums=('fb921d27152c3544e0e8a8a78349370b63d059bfb33653209c7332bb1ad3da175b7bdffc3b5c94a924d799af9a8b54cd815ddcb96c853881b0569c944642cfda')
+
+prepare() {
+  mkdir .gopath
+  export GOPATH="$srcdir/.gopath"
+
+  go get github.com/v2ray/geoip
+
+  mv "$srcdir"/GeoLite2-Country-CSV_$pkgver .gopath/geoip
+}
+
+build() {
+  cd .gopath
+  bin/geoip --country=./geoip/GeoLite2-Country-Locations-en.csv --ipv4=./geoip/GeoLite2-Country-Blocks-IPv4.csv --ipv6=./geoip/GeoLite2-Country-Blocks-IPv6.csv
+}
+
+package() {
+  cd .gopath
+  install -Dm755 geoip.dat "$pkgdir"/etc/v2ray/geoip.dat
+  install -Dm644 "$GOPATH"/src/github.com/v2ray/geoip/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}


More information about the arch-commits mailing list