diff options
author | Integral | 2023-07-13 20:17:03 +0800 |
---|---|---|
committer | Integral | 2023-07-13 20:17:03 +0800 |
commit | 3d9f9678d3f23ca26f9c3b9eff82697ab38e7178 (patch) | |
tree | 5938cc1f41473cd4eb4fb6f26f1057e17f0009ac | |
download | aur-3d9f9678d3f23ca26f9c3b9eff82697ab38e7178.tar.gz |
First commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e13f29d1f545 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = tunet-rust-git + pkgdesc = A Tsinghua University network authentication client for Linux, written in Rust. 清华大学校园网 Rust 客户端 + pkgver = 0.9.0.r3.g520da2d + pkgrel = 1 + url = https://github.com/Berrysoft/tunet-rust + arch = x86_64 + arch = aarch64 + license = MIT + makedepends = git + makedepends = cargo + depends = openssl + depends = freetype2 + depends = hicolor-icon-theme + source = git+https://github.com/Berrysoft/tunet-rust.git + sha512sums = SKIP + +pkgname = tunet-rust-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b27114b61038 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Integral <integral@murena.io> + +pkgname=tunet-rust-git +_pkgname=tunet-rust +pkgver=0.9.0.r3.g520da2d +pkgrel=1 +pkgdesc="A Tsinghua University network authentication client for Linux, written in Rust. 清华大学校园网 Rust 客户端" +url="https://github.com/Berrysoft/tunet-rust" +arch=('x86_64' 'aarch64') +license=('MIT') +depends=('openssl' 'freetype2' 'hicolor-icon-theme') +makedepends=('git' 'cargo') +source=("git+${url}.git") +sha512sums=('SKIP') + +pkgver() { + cd "${_pkgname}/" + ( + set -o pipefail + git describe --tags --long --abbrev=7 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" + ) +} + +build() { + cd "${_pkgname}/" + cargo build --release --workspace --exclude native +} + +package() { + cd "${_pkgname}/" + + # Binaries + pushd "target/release/" + for bin in tunet tunet-gui tunet-cui tunet-service; do + install -Dm755 "${bin}" -t "${pkgdir}/usr/bin/" + done + + popd + # Desktop file + install -Dm644 "tunet/tunet.desktop" -t "${pkgdir}/usr/share/applications/" + + # Icon + install -Dm644 "logo.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/tunet.png" + + # Service + install -Dm644 "tunet-service/tunet@.service" -t "${pkgdir}/usr/lib/systemd/system/" + + # License + install -Dm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}/" +} |