blob: 28a53c90748b63a26ca8dfca415775fa8b6d1935 (
plain)
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
61
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=boxbuddy
_app_id=io.github.dvlv.boxbuddyrs
pkgver=2.4.1
pkgrel=1
pkgdesc="A Graphical Interface for Distrobox"
arch=('x86_64')
url="https://github.com/Dvlv/BoxBuddyRS"
license=('MIT')
depends=('distrobox' 'libadwaita')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('5d6012496eb2ea8541d3acd0c8528cad317f87e187359ac200421ab7291fb017')
prepare() {
cd "BoxBuddyRS-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
# Correct paths
sed -i 's|{data_home}/locale|/usr/share/locale|g' src/utils.rs
sed -i 's|{data_home}/icons|/usr/share/icons|g' src/utils.rs
}
build() {
cd "BoxBuddyRS-$pkgver"
# Use system gettext as gettext-sys crate fails with LTO enabled
export GETTEXT_SYSTEM=true
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd "BoxBuddyRS-$pkgver"
appstreamcli validate --no-net "${_app_id}.metainfo.xml"
desktop-file-validate "${_app_id}.desktop"
}
package() {
cd "BoxBuddyRS-$pkgver"
install -Dm755 "target/release/$pkgname-rs" -t "$pkgdir/usr/bin/"
install -Dm644 "${_app_id}.desktop" -t "$pkgdir/usr/share/applications/"
install -Dm644 "${_app_id}.gschema.xml" -t "$pkgdir/usr/share/glib-2.0/schemas/"
install -Dm644 "${_app_id}.metainfo.xml" -t "$pkgdir/usr/share/metainfo/"
install -Dm644 "icons/${_app_id}.svg" -t \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/"
install -Dm644 icons/build-alt-{symbolic,symbolic-light}.svg -t \
"$pkgdir/usr/share/icons/hicolor/symbolic/apps/"
pushd po
for lang in $(ls -d */); do
install -Dm644 "${lang%%/}/LC_MESSAGES/${pkgname}rs.mo" -t \
"$pkgdir/usr/share/locale/${lang%%/}/LC_MESSAGES/"
done
popd
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
|