mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-30 06:36:39 -04:00
Compare commits
No commits in common. "3daad748ae47f19bacbe6efb0215bac3240becbc" and "a0891e9f0403893637563d199fbf3dabbbeca548" have entirely different histories.
3daad748ae
...
a0891e9f04
11
.github/workflows/build.yaml
vendored
11
.github/workflows/build.yaml
vendored
@ -89,20 +89,13 @@ jobs:
|
|||||||
- name: Install RPM package
|
- name: Install RPM package
|
||||||
run: |
|
run: |
|
||||||
cd globalprotect-openconnect-*/
|
cd globalprotect-openconnect-*/
|
||||||
ls -l .build/rpm
|
ls -l .rpm
|
||||||
sudo rpm -i ".build/rpm/globalprotect-openconnect*.$(uname -m).rpm"
|
|
||||||
|
|
||||||
gpclient --version
|
|
||||||
gpservice --version
|
|
||||||
gpauth --version
|
|
||||||
gpgui-helper --version
|
|
||||||
|
|
||||||
- name: Upload RPM package
|
- name: Upload RPM package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-rpm
|
name: artifact-rpm
|
||||||
path: |
|
path: |
|
||||||
globalprotect-openconnect-*/.build/rpm/*.rpm
|
globalprotect-openconnect-*/.rpm/*.rpm
|
||||||
|
|
||||||
# Include arm64 if ref is a tag
|
# Include arm64 if ref is a tag
|
||||||
# setup-matrix:
|
# setup-matrix:
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,4 +6,4 @@
|
|||||||
*.tar.xz
|
*.tar.xz
|
||||||
|
|
||||||
.cargo
|
.cargo
|
||||||
.build
|
.rpm
|
||||||
|
@ -4,7 +4,6 @@ resolver = "2"
|
|||||||
members = ["crates/*", "apps/gpclient", "apps/gpservice", "apps/gpauth", "apps/gpgui-helper/src-tauri"]
|
members = ["crates/*", "apps/gpclient", "apps/gpservice", "apps/gpauth", "apps/gpgui-helper/src-tauri"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
rust-version = "1.70"
|
|
||||||
version = "2.0.0"
|
version = "2.0.0"
|
||||||
authors = ["Kevin Yue <k3vinyue@gmail.com>"]
|
authors = ["Kevin Yue <k3vinyue@gmail.com>"]
|
||||||
homepage = "https://github.com/yuezk/GlobalProtect-openconnect"
|
homepage = "https://github.com/yuezk/GlobalProtect-openconnect"
|
||||||
|
63
Makefile
63
Makefile
@ -38,7 +38,7 @@ tarball: clean clean-tarball build-fe cargo-vendor
|
|||||||
extract-vendor:
|
extract-vendor:
|
||||||
if [ -f vendor.tar.xz ]; then tar -xJf vendor.tar.xz; fi
|
if [ -f vendor.tar.xz ]; then tar -xJf vendor.tar.xz; fi
|
||||||
|
|
||||||
build: build-fe build-rs
|
build: extract-vendor build-fe build-rs gpgui-helper
|
||||||
|
|
||||||
# Install and build the frontend
|
# Install and build the frontend
|
||||||
# If OFFLINE is set to 1, skip it
|
# If OFFLINE is set to 1, skip it
|
||||||
@ -52,13 +52,14 @@ build-fe:
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build-rs: extract-vendor
|
build-rs:
|
||||||
$(CARGO) build $(CARGO_BUILD_ARGS) -p gpauth
|
$(CARGO) build $(CARGO_BUILD_ARGS) -p gpclient -p gpauth -p gpservice
|
||||||
# $(CARGO) build $(CARGO_BUILD_ARGS) -p gpgui-helper --features "tauri/custom-protocol"
|
|
||||||
|
gpgui-helper:
|
||||||
|
$(CARGO) build $(CARGO_BUILD_ARGS) -p gpgui-helper --features "tauri/custom-protocol"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(CARGO) clean
|
$(CARGO) clean
|
||||||
rm -rf .build
|
|
||||||
rm -rf .vendor
|
rm -rf .vendor
|
||||||
rm -rf apps/gpgui-helper/node_modules
|
rm -rf apps/gpgui-helper/node_modules
|
||||||
|
|
||||||
@ -98,21 +99,17 @@ init-debian:
|
|||||||
|
|
||||||
debmake
|
debmake
|
||||||
|
|
||||||
cp -f packaging/deb/control.in debian/control
|
cp -f packaging/deb/control debian/control
|
||||||
cp -f packaging/deb/rules debian/rules
|
cp -f packaging/deb/rules debian/rules
|
||||||
rm -f debian/changelog
|
rm -f debian/changelog
|
||||||
|
|
||||||
deb: init-debian
|
deb: init-debian
|
||||||
sed -i "s/@RUST@//g" debian/control
|
|
||||||
|
|
||||||
dch --create --distribution unstable --package $(PKG_NAME) --newversion $(VERSION)-$(REVISION) "Bugfix and improvements."
|
dch --create --distribution unstable --package $(PKG_NAME) --newversion $(VERSION)-$(REVISION) "Bugfix and improvements."
|
||||||
|
|
||||||
debuild --preserve-env -e PATH -us -uc -b
|
debuild --preserve-env -e PATH -us -uc -b
|
||||||
|
|
||||||
# Usage: make ppa SERIES=focal
|
# Usage: make ppa SERIES=focal
|
||||||
ppa: init-debian
|
ppa: init-debian
|
||||||
sed -i "s/@RUST@/rust-all(>=1.70)/g" debian/control
|
|
||||||
|
|
||||||
$(eval SERIES_VER = $(shell distro-info --series $(SERIES) -r | cut -d' ' -f1))
|
$(eval SERIES_VER = $(shell distro-info --series $(SERIES) -r | cut -d' ' -f1))
|
||||||
@echo "Building for $(SERIES) $(SERIES_VER)"
|
@echo "Building for $(SERIES) $(SERIES_VER)"
|
||||||
|
|
||||||
@ -124,22 +121,22 @@ publish-ppa: ppa
|
|||||||
dput ppa:yuezk/globalprotect-openconnect ../*.changes
|
dput ppa:yuezk/globalprotect-openconnect ../*.changes
|
||||||
|
|
||||||
# Generate RPM sepc file
|
# Generate RPM sepc file
|
||||||
init-rpm:
|
rpm-spec:
|
||||||
rm -rf .build/rpm
|
rm -rf .rpm
|
||||||
mkdir -p .build/rpm
|
mkdir -p .rpm
|
||||||
|
|
||||||
cp packaging/rpm/globalprotect-openconnect.spec.in .build/rpm/globalprotect-openconnect.spec
|
cp packaging/rpm/globalprotect-openconnect.spec.in .rpm/globalprotect-openconnect.spec
|
||||||
cp packaging/rpm/globalprotect-openconnect.changes.in .build/rpm/globalprotect-openconnect.changes
|
cp packaging/rpm/globalprotect-openconnect.changes.in .rpm/globalprotect-openconnect.changes
|
||||||
|
|
||||||
sed -i "s/@VERSION@/$(VERSION)/g" .build/rpm/globalprotect-openconnect.spec
|
sed -i "s/@VERSION@/$(VERSION)/g" .rpm/globalprotect-openconnect.spec
|
||||||
sed -i "s/@REVISION@/$(REVISION)/g" .build/rpm/globalprotect-openconnect.spec
|
sed -i "s/@REVISION@/$(REVISION)/g" .rpm/globalprotect-openconnect.spec
|
||||||
sed -i "s/@DATE@/$(shell date "+%a %b %d %Y")/g" .build/rpm/globalprotect-openconnect.spec
|
sed -i "s/@DATE@/$(shell date "+%a %b %d %Y")/g" .rpm/globalprotect-openconnect.spec
|
||||||
|
|
||||||
sed -i "s/@VERSION@/$(VERSION)/g" .build/rpm/globalprotect-openconnect.changes
|
sed -i "s/@VERSION@/$(VERSION)/g" .rpm/globalprotect-openconnect.changes
|
||||||
sed -i "s/@DATE@/$(shell LC_ALL=en.US date -u "+%a %b %e %T %Z %Y")/g" .build/rpm/globalprotect-openconnect.changes
|
sed -i "s/@DATE@/$(shell LC_ALL=en.US date -u "+%a %b %e %T %Z %Y")/g" .rpm/globalprotect-openconnect.changes
|
||||||
|
|
||||||
# Ensure ../globalprotect-openconnect-*.tar.gz exists.
|
# Ensure ../globalprotect-openconnect-*.tar.gz exists.
|
||||||
rpm: init-rpm
|
rpm: rpm-spec
|
||||||
if [ ! -f ../$(PKG).tar.gz ]; then \
|
if [ ! -f ../$(PKG).tar.gz ]; then \
|
||||||
echo "Missing ../$(PKG).tar.gz"; \
|
echo "Missing ../$(PKG).tar.gz"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
@ -150,30 +147,12 @@ rpm: init-rpm
|
|||||||
|
|
||||||
cp ../$(PKG).tar.gz $(HOME)/rpmbuild/SOURCES/$(PKG_NAME).tar.gz
|
cp ../$(PKG).tar.gz $(HOME)/rpmbuild/SOURCES/$(PKG_NAME).tar.gz
|
||||||
|
|
||||||
rpmbuild -ba .build/rpm/globalprotect-openconnect.spec
|
rpmbuild -ba .rpm/globalprotect-openconnect.spec
|
||||||
|
|
||||||
# Copy RPM package
|
# Copy RPM package
|
||||||
cp $(HOME)/rpmbuild/RPMS/$(shell uname -m)/$(PKG_NAME)*.rpm .build/rpm
|
cp $(HOME)/rpmbuild/RPMS/$(shell uname -m)/$(PKG_NAME)*.rpm .rpm
|
||||||
|
|
||||||
# Copy the SRPM only for x86_64.
|
# Copy the SRPM only for x86_64.
|
||||||
if [ "$(shell uname -m)" = "x86_64" ]; then \
|
if [ "$(shell uname -m)" = "x86_64" ]; then \
|
||||||
cp $(HOME)/rpmbuild/SRPMS/$(PKG_NAME)*.rpm .build/rpm; \
|
cp $(HOME)/rpmbuild/SRPMS/$(PKG_NAME)*.rpm .rpm \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
init-pkgbuild:
|
|
||||||
rm -rf .build/pkgbuild
|
|
||||||
mkdir -p .build/pkgbuild
|
|
||||||
|
|
||||||
if [ ! -f ../$(PKG).tar.gz ]; then \
|
|
||||||
echo "Missing ../$(PKG).tar.gz"; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
cp ../$(PKG).tar.gz .build/pkgbuild
|
|
||||||
|
|
||||||
cp packaging/pkgbuild/PKGBUILD.in .build/pkgbuild/PKGBUILD
|
|
||||||
sed -i "s/@PKG_NAME@/$(PKG_NAME)/g" .build/pkgbuild/PKGBUILD
|
|
||||||
sed -i "s/@VERSION@/$(VERSION)/g" .build/pkgbuild/PKGBUILD
|
|
||||||
sed -i "s/@REVISION@/$(REVISION)/g" .build/pkgbuild/PKGBUILD
|
|
||||||
|
|
||||||
pkgbuild: init-pkgbuild
|
|
||||||
cd .build/pkgbuild && makepkg -s --noconfirm
|
|
||||||
|
@ -3,7 +3,7 @@ Section: net
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Kevin Yue <k3vinyue@gmail.com>
|
Maintainer: Kevin Yue <k3vinyue@gmail.com>
|
||||||
Standards-Version: 4.1.4
|
Standards-Version: 4.1.4
|
||||||
Build-Depends: debhelper (>= 9), pkg-config, jq (>= 1), make (>= 4), openconnect (>= 8.20), libxml2, libsecret-1-0, libayatana-appindicator3-1, libwebkit2gtk-4.0-37, libgtk-3-0, gnome-keyring, @RUST@
|
Build-Depends: debhelper (>= 9), make (>= 4), openconnect (>= 8.20), libxml2, libsecret-1-0, libayatana-appindicator3-1, libwebkit2gtk-4.0-37, libgtk-3-0, gnome-keyring
|
||||||
Homepage: https://github.com/yuezk/GlobalProtect-openconnect
|
Homepage: https://github.com/yuezk/GlobalProtect-openconnect
|
||||||
|
|
||||||
Package: globalprotect-openconnect
|
Package: globalprotect-openconnect
|
@ -1,30 +0,0 @@
|
|||||||
# Maintainer: Keinv Yue <k3vinyue@gmail.com>
|
|
||||||
|
|
||||||
_pkgname=@PKG_NAME@
|
|
||||||
pkgname=${_pkgname}
|
|
||||||
pkgver="@VERSION@"
|
|
||||||
pkgrel=@REVISION@
|
|
||||||
pkgdesc="A GUI for GlobalProtect VPN, based on OpenConnect, supports the SSO authentication method."
|
|
||||||
arch=('x86_64' 'aarch64')
|
|
||||||
url="https://github.com/yuezk/GlobalProtect-openconnect"
|
|
||||||
license=('GPL3')
|
|
||||||
makedepends=('make' 'pkg-config' 'rust' 'cargo' 'jq' 'webkit2gtk' 'curl' 'wget' 'file' 'openssl' 'appmenu-gtk-module' 'gtk3' 'libappindicator-gtk3' 'librsvg' 'libvips' 'libayatana-appindicator' 'openconnect' 'libsecret')
|
|
||||||
depends=('openconnect>=8.20' webkit2gtk libappindicator-gtk3 libayatana-appindicator libsecret libxml2)
|
|
||||||
optdepends=('wmctrl: for window management')
|
|
||||||
|
|
||||||
provides=('globalprotect-openconnect' 'gpclient' 'gpservice' 'gpauth' 'gpgui')
|
|
||||||
|
|
||||||
source=("${_pkgname}-${pkgver}.tar.gz")
|
|
||||||
sha256sums=('SKIP')
|
|
||||||
|
|
||||||
options=('!strip')
|
|
||||||
|
|
||||||
build() {
|
|
||||||
cd "$pkgname-$pkgver"
|
|
||||||
make build OFFLINE=1
|
|
||||||
}
|
|
||||||
|
|
||||||
package() {
|
|
||||||
cd "$pkgname-$pkgver"
|
|
||||||
make install DESTDIR="$pkgdir"
|
|
||||||
}
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: globalprotect-openconnect
|
Name: globalprotect-openconnect
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Release: @REVISION@
|
Release: @REVISION@%{?dist}
|
||||||
Summary: A GlobalProtect VPN client powered by OpenConnect
|
Summary: A GlobalProtect VPN client powered by OpenConnect
|
||||||
Group: Productivity/Networking/PPP
|
Group: Productivity/Networking/PPP
|
||||||
|
|
||||||
@ -9,10 +9,6 @@ URL: https://github.com/yuezk/GlobalProtect-openconnect
|
|||||||
Source: %{name}.tar.gz
|
Source: %{name}.tar.gz
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: rust
|
|
||||||
BuildRequires: cargo
|
|
||||||
BuildRequires: jq
|
|
||||||
BuildRequires: pkg-config
|
|
||||||
BuildRequires: openconnect-devel
|
BuildRequires: openconnect-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: curl
|
BuildRequires: curl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user