initial commit
This commit is contained in:
commit
d7d1caee37
9 changed files with 598 additions and 0 deletions
77
PKGBUILD
Normal file
77
PKGBUILD
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
# Maintainer: Christian Schendel <doppelhelix@gmail.com>
|
||||
# Contributor: psi4j <116757358+psi4j@users.noreply.github.com>
|
||||
|
||||
pkgname=sunsetr
|
||||
pkgver=0.11.1
|
||||
pkgrel=1
|
||||
pkgdesc="Automatic blue light filter for Hyprland, Niri, and everything Wayland"
|
||||
arch=(x86_64)
|
||||
url="https://github.com/psi4j/sunsetr"
|
||||
license=(
|
||||
'MIT'
|
||||
)
|
||||
depends=(
|
||||
gcc-libs
|
||||
glibc
|
||||
wayland
|
||||
)
|
||||
makedepends=(
|
||||
cargo
|
||||
git
|
||||
rust
|
||||
)
|
||||
conflicts=(
|
||||
'sunsetr-bin'
|
||||
'sunsetr-git'
|
||||
)
|
||||
source=(
|
||||
"$pkgname-$pkgver::git+$url.git#tag=v$pkgver"
|
||||
)
|
||||
b2sums=('a74e5b619379cca4535406feae46ce243aac944b45379edbcda250d576a1a357e6d932f71a79371aaef916ba36b52ee95f34773f724399fd42fd602f157282e7')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release --all-features
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
# Install the binary
|
||||
install -Dm755 "target/release/${pkgname}" \
|
||||
"${pkgdir}/usr/bin/${pkgname}"
|
||||
|
||||
# Install the license file
|
||||
install -Dm644 "LICENSE" \
|
||||
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
|
||||
# Install the systemd user service file
|
||||
install -Dm644 "${pkgname}.service" \
|
||||
"${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
|
||||
|
||||
# Install README
|
||||
install -Dm644 "README.md" \
|
||||
"${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
echo ":: Sleep/resume detection is handled automatically via D-Bus"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
# Clean up old sleep hook from previous versions (< 0.8.0)
|
||||
if [ -f "/usr/lib/systemd/system-sleep/${pkgname}-resume" ]; then
|
||||
echo ":: Removing deprecated sleep hook (sleep/resume now handled via D-Bus)"
|
||||
rm -f "/usr/lib/systemd/system-sleep/${pkgname}-resume"
|
||||
fi
|
||||
}
|
||||
|
||||
# vim:set ts=4 sw=4 et:
|
||||
Loading…
Add table
Add a link
Reference in a new issue