Skip to content

Commit d1daa1a

Browse files
committed
add packaging bits
1 parent 49608e0 commit d1daa1a

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/target
2+
/src/target
3+
/ayaled*.pkg.tar.zst
4+
/pkg

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[package]
22
name = "ayaled"
3+
authors = [ "Maya Matuszczyk <maccraft123mc@gmail.com>" ]
34
version = "0.1.0"
45
edition = "2021"
56

PKGBUILD

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Maintainer: Maya Matuszczyk <maccraft123mc@gmail.com>
2+
pkgname=ayaled
3+
pkgver=0.1.0
4+
pkgrel=1
5+
makedepends=('rust' 'cargo')
6+
arch=('x86_64')
7+
8+
prepare() {
9+
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
10+
}
11+
12+
build() {
13+
export RUSTUP_TOOLCHAIN=stable
14+
export CARGO_TARGET_DIR=target
15+
cargo build --frozen --release --all-features
16+
}
17+
18+
check() {
19+
export RUSTUP_TOOLCHAIN=stable
20+
cargo test --frozen --all-features
21+
}
22+
23+
package() {
24+
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
25+
mkdir -p "$pkgdir/etc/systemd/system"
26+
install -m755 "$srcdir/ayaled.service" "$pkgdir/etc/systemd/system/ayaled.service"
27+
}

src/ayaled.service

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Unit]
2+
Description=Aya Neo LED manager
3+
4+
[Service]
5+
ExecStart=/usr/bin/ayaled
6+
7+
[Install]
8+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)