forked from ChimeraOS/chimeraos
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
honjow
committed
Nov 8, 2024
1 parent
825a178
commit 2e99cbc
Showing
4 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Maintainer: Ilya Zlobintsev <[email protected]> | ||
pkgname=('lact-libadwaita') | ||
pkgbase=lact | ||
pkgver=0.5.6 | ||
pkgrel=1 | ||
pkgdesc="AMDGPU Controller application" | ||
arch=('x86_64' 'aarch64') | ||
url="https://github.com/ilya-zlobintsev/LACT" | ||
license=('MIT') | ||
depends=('hwdata' 'gtk4') | ||
makedepends=('blueprint-compiler' 'cargo' 'clang' 'libadwaita' 'git') | ||
install="$pkgbase.install" | ||
source=("git+https://github.com/ilya-zlobintsev/LACT.git#tag=v$pkgver") | ||
# Since the source is a git repository tag and not an archive, there's no single file with a checksum to check | ||
sha256sums=('9440a4d94f95d0a62124d635855817ea95fc8a5d2a70f2e52cb166364e1e630f') | ||
|
||
prepare() { | ||
cd "LACT" | ||
export CARGO_HOME="$srcdir/cargo-home" | ||
export RUSTUP_TOOLCHAIN=stable | ||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu" | ||
} | ||
|
||
build() { | ||
cd "LACT" | ||
export CARGO_HOME="$srcdir/cargo-home" | ||
export RUSTUP_TOOLCHAIN=stable | ||
export CARGO_TARGET_DIR=target | ||
|
||
# Libadwaita | ||
cargo build -p "$pkgbase" --frozen --release --features=adw | ||
mv "target/release/$pkgbase" "target/release/$pkgbase-adw" | ||
|
||
# Gtk 4 | ||
cargo build -p "$pkgbase" --frozen --release | ||
} | ||
|
||
check() { | ||
cd "LACT" | ||
export CARGO_HOME="$srcdir/cargo-home" | ||
export RUSTUP_TOOLCHAIN=stable | ||
cargo test --frozen --no-default-features -p lact | ||
} | ||
|
||
package_lact() { | ||
cd "LACT" | ||
make PREFIX=/usr DESTDIR="$pkgdir/" install | ||
|
||
install -Dvm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgbase/" | ||
} | ||
|
||
package_lact-libadwaita() { | ||
pkgdesc+=" (libadwaita edition)" | ||
provides=("$pkgbase") | ||
conflicts=("$pkgbase") | ||
depends+=('libadwaita') | ||
|
||
cd "LACT" | ||
make PREFIX=/usr DESTDIR="$pkgdir/" install | ||
|
||
install -Dvm755 "target/release/$pkgbase-adw" "$pkgdir/usr/bin/$pkgbase" | ||
install -Dvm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgbase/" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Name=LACT | ||
Description=AMDGPU Control Application | ||
Exec=lact-gui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
post_install() { | ||
echo ":: To be able to change settings in LACT, you need to enable the lactd service:" | ||
echo " sudo systemctl enable --now lactd" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=AMDGPU Control Daemon | ||
After=multi-user.target | ||
|
||
[Service] | ||
ExecStartPre=/usr/bin/sleep 2 | ||
ExecStart=/usr/bin/lact-daemon | ||
|
||
[Install] | ||
WantedBy=graphical.target |