summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgesh2023-12-22 15:54:46 +0200
committergesh2023-12-22 15:54:46 +0200
commit70388c3937b2d0bac77b6d6f8d4ca93c600e337a (patch)
tree4018c6a2a4faf393b5092902a85e2200eb964ac9
downloadaur-70388c3937b2d0bac77b6d6f8d4ca93c600e337a.tar.gz
Initial commit
-rw-r--r--.SRCINFO14
-rw-r--r--.gitattributes1
-rw-r--r--PKGBUILD45
3 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b514ec3c2782
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = pizauth-git
+ pkgdesc = OAuth2 token requester daemon
+ pkgver = 1.0.3.r0.g973523f
+ pkgrel = 1
+ url = https://github.com/ltratt/pizauth
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = cargo
+ provides = pizauth
+ source = pizauth-git::git+https://github.com/ltratt/pizauth.git
+ sha256sums = SKIP
+
+pkgname = pizauth-git
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000000..08c7cb3413a1
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+.SRCINFO -whitespace
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..afa359f27da1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: gesh <gesh AT gesh DOT uni DOT cx>
+
+pkgname=pizauth-git
+_pkgname="${pkgname%-git}"
+pkgver=1.0.3.r0.g973523f
+pkgrel=1
+pkgdesc="OAuth2 token requester daemon"
+arch=('i686' 'x86_64')
+url="https://github.com/ltratt/${_pkgname}"
+license=('custom')
+provides=("$_pkgname")
+makedepends=(cargo)
+source=("${pkgname}::git+${url}.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags \
+ | sed "s/^$_pkgname-//;"'s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$pkgname"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo update
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$pkgname"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
+}
+
+check() {
+ cd "$pkgname"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
+}
+
+package() {
+ cd "$pkgname"
+ PREFIX="$pkgdir/usr" MAN_PREFIX="$pkgdir/usr/share/man" make install
+}