summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoffeebar2023-04-03 22:28:51 +0300
committercoffeebar2023-04-03 22:28:51 +0300
commit00780359048fa41a65d71d1652331376c318a865 (patch)
treefb354801c036d46e142dfe4a0157c72b9313975e
downloadaur-00780359048fa41a65d71d1652331376c318a865.tar.gz
init
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD38
2 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3c20a9317285
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = hyprland-monitor-attached
+ pkgdesc = Run bash script when you attach the monitor on Hyprland
+ pkgver = 0.1
+ pkgrel = 1
+ url = https://github.com/coffebar/hyprland-monitor-attached
+ arch = x86_64
+ license = MIT
+ makedepends = cargo
+ source = git+https://github.com/coffebar/hyprland-monitor-attached#commit=d7f539e
+ sha256sums = SKIP
+
+pkgname = hyprland-monitor-attached
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e1025dfad3cd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: coffebar i8ehkvien@mozmail.com
+
+pkgname=hyprland-monitor-attached
+pkgver=0.1
+pkgrel=1
+pkgdesc='Run bash script when you attach the monitor on Hyprland'
+arch=('x86_64')
+url="https://github.com/coffebar/$pkgname"
+license=('MIT')
+makedepends=(cargo)
+depends=()
+_commit=d7f539e
+source=("git+$url#commit=$_commit")
+sha256sums=('SKIP')
+
+pkgver(){
+ cd "$pkgname"
+ git describe --tags | sed 's/^v//;s/-/+/g'
+}
+
+prepare() {
+ cd "$pkgname"
+ export RUSTUP_TOOLCHAIN=stable
+ test -f /usr/bin/rustup && /usr/bin/rustup update --no-self-update $RUSTUP_TOOLCHAIN
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$pkgname"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release
+}
+
+package() {
+ cd "$pkgname"
+ install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
+}