diff options
author | IP2Location | 2024-01-18 16:23:25 +0800 |
---|---|---|
committer | IP2Location | 2024-01-18 16:23:25 +0800 |
commit | 4af30b0f94ea201839fd3f0d3bc92189f142381e (patch) | |
tree | b17ccdf0870989b3879c290a13a31db0c1569fb6 | |
download | aur-4af30b0f94ea201839fd3f0d3bc92189f142381e.tar.gz |
New package.
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..27b166d8ecda --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = ip2location-io-cli + pkgdesc = Official Command Line Interface for IP2Loaction.io Geolocation API service + pkgver = 1.1.0 + pkgrel = 1 + url = https://www.ip2location.io + arch = x86_64 + arch = armv7h + arch = aarch64 + license = Apache + makedepends = go + depends = glibc + source = ip2location-io-cli-1.1.0.tar.gz::https://github.com/ip2location/ip2location-io-cli/archive/refs/tags/v1.1.0.tar.gz + sha256sums = 86caf3202b8daea3a58aa3be3caa8514312116fba659d8e9e212e37b651b9f0d + +pkgname = ip2location-io-cli
\ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..4dab8d6386e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e73f5adec931 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: IP2Location <support@ip2location.com> +pkgname=ip2loaction-io-cli +_pkgname=${pkgname%} +pkgver=1.1.0 +pkgrel=1 +pkgdesc="Official Command Line Interface for IP2Loaction.io Geolocation API service" +arch=('x86_64' 'armv7h' 'aarch64') +url="https://www.ip2location.io" +license=('MIT') +depends=('glibc') +makedepends=('go') +source=("$pkgname-$pkgver.tar.gz::https://github.com/ip2location/ip2location-io-cli/archive/refs/tags/$v$pkgver.tar.gz") +sha256sums=('86caf3202b8daea3a58aa3be3caa8514312116fba659d8e9e212e37b651b9f0d') + +prepare() { + cd "cli-${_pkgname}-$pkgver" + export GOPATH="$srcdir/gopath" + + # download dependencies + go mod download -x +} + +build() { + cd "cli-${_pkgname}-$pkgver" + export GOPATH="$srcdir/gopath" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -v -o build "./${_pkgname}" + + # Clean module cache for makepkg -C + go clean -modcache +} + +package() { + cd "cli-${_pkgname}-$pkgver" + install -Dm755 "build/${_pkgname}" -t "$pkgdir/usr/bin/" +}
\ No newline at end of file |