diff --git a/.gitignore b/.gitignore index 11ecce8..ab7e1e8 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,4 @@ target # Added by cargo -/target -./PKGBUILD +/target \ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 97725a6..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,121 +0,0 @@ -# Maintainer: Sankalp Tharu -pkgname=lapctl -pkgver=0.3.0 -pkgrel=1 -pkgdesc="Control Linux laptop hardware (Graphics, Battery, Power, Cooling, Display) with Rust" -arch=('x86_64' 'aarch64') -url="https://github.com/S4NKALP/lapctl" -license=('MIT') -depends=('systemd-libs' 'dbus' 'wayland') -makedepends=('rust' 'cargo' 'wayland-protocols') -optdepends=( - 'xorg-xrandr: for GPU switching on X11' - 'nvidia-settings: for NVIDIA GPU management on X11' -) -source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz") -sha256sums=('fda8c8dd9a170cbd54b549a57194dc36f1cdff7387cb85f70d1c1ae55c315259') - -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 -} - -check() { - cd "${pkgname}-${pkgver}" - export RUSTUP_TOOLCHAIN=stable - cargo test --frozen --all-features -} - -package() { - cd "${pkgname}-${pkgver}" - - # Binary - install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" - - # D-Bus Policy - install -Dm644 /dev/stdin "${pkgdir}/etc/dbus-1/system.d/org.lapctl.conf" < - - - - - - - - - - - - - - - -EOF - - # Systemd Service - install -Dm644 /dev/stdin "${pkgdir}/usr/lib/systemd/system/lapctld.service" < - - - lapctl - https://github.com/S4NKALP/lapctl - - Elevated execution for lapctl - Authentication is required to perform privileged lapctl operations - - auth_admin - auth_admin - yes - - /usr/bin/lapctl - false - - -EOF - - # Polkit Rules - install -Dm644 /dev/stdin "${pkgdir}/usr/share/polkit-1/rules.d/10-lapctl.rules" <