diff options
author | taotieren | 2024-04-15 10:25:33 +0800 |
---|---|---|
committer | taotieren | 2024-04-15 10:25:33 +0800 |
commit | b2157c9dca258efa447acd3adf11e8332108c90e (patch) | |
tree | a3f01c09515e7a32d37ad5726552783f4030c870 | |
download | aur-myip-git.tar.gz |
add myip-git
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 56 |
2 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cf11b6696cad --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = myip-git + pkgdesc = Returns your public IP and the public IP to access the extranet. + pkgver = 0.4.6.r0.g0a123b9 + pkgrel = 1 + url = https://github.com/crystal-china/myip + arch = x86_64 + arch = aarch64 + arch = riscv64 + license = MIT + makedepends = cmake + makedepends = git + makedepends = crystal + makedepends = shards + depends = glibc + depends = gc + depends = gcc-libs + depends = libevent + depends = openssl + depends = pcre2 + depends = zlib + optdepends = goldendict: Feature-rich dictionary lookup program supporting multiple dictionary formats + provides = myip + conflicts = myip + source = myip-git::git+https://github.com/crystal-china/myip.git + sha256sums = SKIP + +pkgname = myip-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a8a6e4e2ea57 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: taotieren <admin@taotieren.com> + +pkgname=myip-git +pkgver=0.4.6.r0.g0a123b9 +pkgrel=1 +pkgdesc="Returns your public IP and the public IP to access the extranet." +arch=(x86_64 + aarch64 + riscv64) +url="https://github.com/crystal-china/myip" +license=('MIT') +provides=(${pkgname%-git}) +conflicts=(${pkgname%-git}) +replaces=() +depends=( + glibc + gc + gcc-libs + libevent + openssl + pcre2 + zlib) +makedepends=( + cmake + git + crystal + shards) +optdepends=("goldendict: Feature-rich dictionary lookup program supporting multiple dictionary formats") +backup=() +options=() +install= +source=("${pkgname}::git+${url}.git") +sha256sums=('SKIP') + +prepare() { + git -C "${srcdir}/${pkgname}" clean -dfx +} + +pkgver() { + cd "${srcdir}/${pkgname}" + ( set -o pipefail + git describe --long --tag --abbrev=7 2>/dev/null | sed 's/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" + ) +} + +build() { + cd "${srcdir}/${pkgname}" + export LDFLAGS+=" -Wl,-z,relro,-z,now -Wl,-z,shstk" + make release +} + +package() { + cd "${srcdir}/${pkgname}" + DESTDIR=${pkgdir}/usr make install +} |