-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathPKGBUILD
More file actions
60 lines (52 loc) 路 2.45 KB
/
Copy pathPKGBUILD
File metadata and controls
60 lines (52 loc) 路 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: vaibhav-mattoo <vaibhav.mattoo@gmail.com>
# Contributor: fuckotheclown <fuckotheclown@example.com>
pkgname=bitchat-tui
pkgver=0.1.0
pkgrel=2
pkgdesc="Secure, anonymous, peer-to-peer Bluetooth chat with terminal UI"
arch=('x86_64' 'aarch64' 'armv7h')
url="https://github.com/vaibhav-mattoo/bitchat-tui"
license=('MIT')
depends=('dbus' 'bluez' 'pkgconf')
makedepends=('rust' 'cargo' 'git')
provides=('bitchat-tui')
conflicts=('bitchat-tui')
source=("$pkgname-$pkgver.tar.gz::https://github.com/vaibhav-mattoo/$pkgname/archive/v$pkgver.tar.gz"
"$pkgname-$pkgver.tar.gz::https://github.com/vaibhav-mattoo/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('SKIP' 'SKIP')
validpgpkeys=()
prepare() {
cd "$pkgname-$pkgver"
# Remove the vendored feature to use the system's dbus library
sed -i '/\[target.cfg(target_os = "linux")\].dependencies\]/{n;s/, features = \["vendored"\]//}' Cargo.toml
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
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 --release --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
# Create configuration directory
install -dm 755 "$pkgdir/etc/$pkgname"
# Install systemd user service for auto-start (optional)
install -Dm 644 -t "$pkgdir/usr/lib/systemd/user/" "$srcdir/$pkgname-$pkgver/contrib/systemd/bitchat-tui.service" 2>/dev/null || true
# Install shell completion files if they exist
install -Dm 644 -t "$pkgdir/usr/share/bash-completion/completions/" "$srcdir/$pkgname-$pkgver/contrib/completions/$pkgname.bash" 2>/dev/null || true
install -Dm 644 -t "$pkgdir/usr/share/zsh/site-functions/" "$srcdir/$pkgname-$pkgver/contrib/completions/_$pkgname" 2>/dev/null || true
install -Dm 644 -t "$pkgdir/usr/share/fish/vendor_completions.fish/" "$srcdir/$pkgname-$pkgver/contrib/completions/$pkgname.fish" 2>/dev/null || true
}