summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWiktor Kwapisiewicz2022-03-29 13:58:34 +0200
committerWiktor Kwapisiewicz2022-03-29 13:58:34 +0200
commit9d5cc9172e599a2c248b19e6711dd1af4cbe210d (patch)
treef87e9319d195836b76691a6365f28c1b53140ded
downloadaur-9d5cc9172e599a2c248b19e6711dd1af4cbe210d.tar.gz
Release OLED notifier
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD38
3 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0c34ba6fc483
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = oled-notifier-git
+ pkgdesc = Provides simple statistics for ODROID-HC4 with OLED device.
+ pkgver = 0.1
+ pkgrel = 1
+ url = https://github.com/wiktor-k/oled-notifier
+ arch = any
+ license = APL
+ makedepends = cargo
+ makedepends = git
+ makedepends = clang
+ provides = oled-notifier
+ conflicts = oled-notifier
+ source = oled-notifier::git+https://github.com/wiktor-k/oled-notifier
+ sha512sums = SKIP
+
+pkgname = oled-notifier-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ee0c8476c4fd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+oled-notifier
+*.zst
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..31a56073dd20
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Wiktor Kwapisiewicz <wiktor@metacode.biz>
+
+pkgname=oled-notifier-git
+pkgver=0.1
+pkgrel=1
+license=('APL')
+url="https://github.com/wiktor-k/oled-notifier"
+# The package can be built on amd64 but will work only on aarch64
+arch=('any')
+makedepends=(cargo git clang)
+source=("oled-notifier::git+https://github.com/wiktor-k/oled-notifier")
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+sha512sums=('SKIP')
+pkgdesc="Provides simple statistics for ODROID-HC4 with OLED device."
+
+build() {
+ cd "${srcdir}/${pkgname%-git}"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"
+ export AR_aarch64_unknown_linux_musl=llvm-ar
+ export CC_aarch64_unknown_linux_musl=clang
+ cargo build --bin main --release --target aarch64-unknown-linux-musl
+
+}
+
+check() {
+ cd "${srcdir}/${pkgname%-git}"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --verbose --lib
+}
+
+package() {
+ cd "${srcdir}/${pkgname%-git}"
+ cp "target/aarch64-unknown-linux-musl/release/main" "target/${pkgname%-git}"
+ install -Dm0755 -t "$pkgdir/usr/bin/" "target/${pkgname%-git}"
+ install -Dm0644 -t "$pkgdir/usr/lib/systemd/system/" "contrib/${pkgname%-git}.service"
+}