-
Notifications
You must be signed in to change notification settings - Fork 0
/
packaging.just
53 lines (42 loc) · 1.74 KB
/
packaging.just
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
# Compiles and packages deb with release profile
build-deb:
command -v cargo-deb || cargo install cargo-deb
cargo deb
install-deb:
apt install --reinstall ./target/debian/*.deb
# Compiles and packages rpm with release profile
build-rpm: build-release
command -v cargo-generate-rpm || cargo install cargo-generate-rpm
strip -s {{"{{bin-src}}"}}
cargo generate-rpm
install-rpm:
dnf localinstall ./target/generate-rpm/*.rpm
# Compiles and packages PKGBUILD with release profile
build-aur:
command -v cargo-aur || cargo install cargo-aur
cargo aur
install-aur:
makepkg -siD ./target/cargo-aur
# Flatpak recipes
fp-prefix := '/app'
fp-base-dir := absolute_path(clean(rootdir / fp-prefix))
fp-bin-dst := fp-base-dir / 'bin' / name
fp-desktop-dst := fp-base-dir / 'share' / 'applications' / desktop
fp-metainfo-dst := fp-base-dir / 'share' / 'metainfo' / metainfo
fp-icons-dst := fp-base-dir / 'share' / 'icons' / 'hicolor'
update-flatpak:
command -v cargo-flatpak || cargo install --git https://github.com/D-Brox/cargo-flatpak.git
cargo flatpak
# # Replace "<repo>" with the flatpak repo
# publish-flatpak: update-flatpak
# flatpak-builder --repo=<repo> build {{app_id}}.json
install-flatpak: update-flatpak
flatpak-builder --install build {{app_id}}.json
[private]
flatpak-builder:
cargo --offline fetch --manifest-path Cargo.toml --verbose
cargo --offline build --release --verbose
install -Dm0755 {{"{{bin-src}}"}} {{"{{fp-bin-dst}}"}}
install -Dm0644 {{"{{desktop-src}}"}} {{"{{fp-desktop-dst}}"}}
install -Dm0644 {{"{{metainfo-src}}"}} {{"{{fp-metainfo-dst}}"}}
install -Dm0644 "{{"{{icons-src}}"}}/scalable/apps/{{"{{APPID}}"}}.svg" "{{"{{fp-icons-dst}}"}}/scalable/apps/{{"{{APPID}}"}}.svg"