mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-17 13:46:27 -05:00
fix: update Rust version handling in PPA build scripts
This commit is contained in:
4 files changed
+14
-5
No files matched your search
@@ -82,8 +82,8 @@ jobs:
|
||||
sed -i "s/@BUILD_GUI_HELPER@/1/g" .build/debian/rules
|
||||
|
||||
# Update the control file with the correct Rust version
|
||||
# sed -i "s/rust-[0-9.]\+-all/rust-${{ inputs.rust }}-all/g" .build/debian/control
|
||||
# sed -i "s/rust-[0-9.]\+/rust-${{ inputs.rust }}/g" .build/debian/rules
|
||||
sed -i "s/@RUST_VERSION@/${{ inputs.rust }}/g" .build/debian/control
|
||||
sed -i "s/@RUST_VERSION@/${{ inputs.rust }}/g" .build/debian/rules
|
||||
sed -i "s/DISABLE_RUST_TOOLCHAIN = 0/DISABLE_RUST_TOOLCHAIN = 1/g" .build/debian/rules
|
||||
|
||||
- name: Publish to PPA
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
INCLUDE_GUI ?= 0
|
||||
CARGO ?= cargo
|
||||
DISABLE_RUST_TOOLCHAIN ?= 0
|
||||
RUST_VERSION ?= 1.89
|
||||
IGNORE_RUST_VERSION ?= 0
|
||||
|
||||
VERSION = $(shell grep '^version' Cargo.toml | head -1 | sed 's/version *= *"\(.*\)"/\1/')
|
||||
REVISION ?= 1
|
||||
@@ -38,6 +40,10 @@ ifeq ($(OFFLINE), 1)
|
||||
CARGO_BUILD_ARGS += --frozen
|
||||
endif
|
||||
|
||||
ifeq ($(IGNORE_RUST_VERSION), 1)
|
||||
CARGO_BUILD_ARGS += --ignore-rust-version
|
||||
endif
|
||||
|
||||
default: build
|
||||
|
||||
version:
|
||||
@@ -170,7 +176,7 @@ init-debian: clean-debian tarball
|
||||
cp -f packaging/deb/postrm .build/deb/$(PKG)/debian/postrm
|
||||
cp -f packaging/deb/compat .build/deb/$(PKG)/debian/compat
|
||||
|
||||
sed -i "s/@BUILD_GUI_HELPER@/$(BUILD_GUI_HELPER)/g" .build/deb/$(PKG)/debian/rules
|
||||
sed -i "s/@RUST_VERSION@/$(RUST_VERSION)/g" .build/deb/$(PKG)/debian/control
|
||||
|
||||
# Remove the GUI dependencies if BUILD_GUI_HELPER is set to 0
|
||||
if [ $(BUILD_GUI_HELPER) -eq 0 ]; then \
|
||||
@@ -180,6 +186,9 @@ init-debian: clean-debian tarball
|
||||
sed -i "/libwebkit2gtk-4.1-dev/d" .build/deb/$(PKG)/debian/control; \
|
||||
fi
|
||||
|
||||
sed -i "s/@BUILD_GUI_HELPER@/$(BUILD_GUI_HELPER)/g" .build/deb/$(PKG)/debian/rules
|
||||
sed -i "s/@RUST_VERSION@/$(RUST_VERSION)/g" .build/deb/$(PKG)/debian/rules
|
||||
|
||||
rm -f .build/deb/$(PKG)/debian/changelog
|
||||
|
||||
deb: init-debian
|
||||
|
||||
@@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 9),
|
||||
gnome-keyring,
|
||||
libwebkit2gtk-4.1-dev,
|
||||
libopenconnect-dev (>= 8.20),
|
||||
rust-1.85-all
|
||||
rust-@RUST_VERSION@-all
|
||||
Homepage: https://github.com/yuezk/GlobalProtect-openconnect
|
||||
|
||||
Package: globalprotect-openconnect
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
export BUILD_GUI_HELPER = @BUILD_GUI_HELPER@
|
||||
export DISABLE_RUST_TOOLCHAIN = 0
|
||||
|
||||
export PATH := /usr/lib/rust-1.85/bin:$(PATH)
|
||||
export PATH := /usr/lib/rust-@RUST_VERSION@/bin:$(PATH)
|
||||
|
||||
%:
|
||||
which cargo
|
||||
|
||||
Reference in new issue
Block a user