Make tarball

This commit is contained in:
Kevin Yue
2024-02-21 22:19:34 +08:00
parent 5404386972
commit cfdba00a01
3 changed files with 298 additions and 261 deletions

View File

@@ -1,3 +1,6 @@
VERSION=$(shell cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
PKG_NAME=globalprotect-openconnect-$(VERSION)
build: build-fe build-rs gpgui-helper
build-fe:
@@ -9,6 +12,14 @@ build-rs:
gpgui-helper:
cargo build --release --frozen -p gpgui-helper --features "tauri/custom-protocol"
tarball: build-fe
rm -rf apps/gpgui-helper/node_modules
mkdir -p .cargo
cargo vendor > .cargo/config.toml
tar --transform 's,^,${PKG_NAME}/,' -cJf ../${PKG_NAME}.tar.xz * .cargo
install:
install -Dm755 target/release/gpclient $(DESTDIR)/usr/bin/gpclient
install -Dm755 target/release/gpauth $(DESTDIR)/usr/bin/gpauth