mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-29 14:16:26 -04:00
Compare commits
8 Commits
a0891e9f04
...
3daad748ae
Author | SHA1 | Date | |
---|---|---|---|
|
3daad748ae | ||
|
5bca84c9cf | ||
|
3a6eca2ed2 | ||
|
141d66cbde | ||
|
f44cd85971 | ||
|
55b119d0f2 | ||
|
df1bcd6571 | ||
|
a19789f1e3 |
11
.github/workflows/build.yaml
vendored
11
.github/workflows/build.yaml
vendored
@ -89,13 +89,20 @@ jobs:
|
|||||||
- name: Install RPM package
|
- name: Install RPM package
|
||||||
run: |
|
run: |
|
||||||
cd globalprotect-openconnect-*/
|
cd globalprotect-openconnect-*/
|
||||||
ls -l .rpm
|
ls -l .build/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-*/.rpm/*.rpm
|
globalprotect-openconnect-*/.build/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
|
||||||
.rpm
|
.build
|
||||||
|
@ -4,6 +4,7 @@ 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: extract-vendor build-fe build-rs gpgui-helper
|
build: build-fe build-rs
|
||||||
|
|
||||||
# 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,14 +52,13 @@ build-fe:
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build-rs:
|
build-rs: extract-vendor
|
||||||
$(CARGO) build $(CARGO_BUILD_ARGS) -p gpclient -p gpauth -p gpservice
|
$(CARGO) build $(CARGO_BUILD_ARGS) -p gpauth
|
||||||
|
# $(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
|
||||||
|
|
||||||
@ -99,17 +98,21 @@ init-debian:
|
|||||||
|
|
||||||
debmake
|
debmake
|
||||||
|
|
||||||
cp -f packaging/deb/control debian/control
|
cp -f packaging/deb/control.in 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)"
|
||||||
|
|
||||||
@ -121,22 +124,22 @@ publish-ppa: ppa
|
|||||||
dput ppa:yuezk/globalprotect-openconnect ../*.changes
|
dput ppa:yuezk/globalprotect-openconnect ../*.changes
|
||||||
|
|
||||||
# Generate RPM sepc file
|
# Generate RPM sepc file
|
||||||
rpm-spec:
|
init-rpm:
|
||||||
rm -rf .rpm
|
rm -rf .build/rpm
|
||||||
mkdir -p .rpm
|
mkdir -p .build/rpm
|
||||||
|
|
||||||
cp packaging/rpm/globalprotect-openconnect.spec.in .rpm/globalprotect-openconnect.spec
|
cp packaging/rpm/globalprotect-openconnect.spec.in .build/rpm/globalprotect-openconnect.spec
|
||||||
cp packaging/rpm/globalprotect-openconnect.changes.in .rpm/globalprotect-openconnect.changes
|
cp packaging/rpm/globalprotect-openconnect.changes.in .build/rpm/globalprotect-openconnect.changes
|
||||||
|
|
||||||
sed -i "s/@VERSION@/$(VERSION)/g" .rpm/globalprotect-openconnect.spec
|
sed -i "s/@VERSION@/$(VERSION)/g" .build/rpm/globalprotect-openconnect.spec
|
||||||
sed -i "s/@REVISION@/$(REVISION)/g" .rpm/globalprotect-openconnect.spec
|
sed -i "s/@REVISION@/$(REVISION)/g" .build/rpm/globalprotect-openconnect.spec
|
||||||
sed -i "s/@DATE@/$(shell date "+%a %b %d %Y")/g" .rpm/globalprotect-openconnect.spec
|
sed -i "s/@DATE@/$(shell date "+%a %b %d %Y")/g" .build/rpm/globalprotect-openconnect.spec
|
||||||
|
|
||||||
sed -i "s/@VERSION@/$(VERSION)/g" .rpm/globalprotect-openconnect.changes
|
sed -i "s/@VERSION@/$(VERSION)/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
|
sed -i "s/@DATE@/$(shell LC_ALL=en.US date -u "+%a %b %e %T %Z %Y")/g" .build/rpm/globalprotect-openconnect.changes
|
||||||
|
|
||||||
# Ensure ../globalprotect-openconnect-*.tar.gz exists.
|
# Ensure ../globalprotect-openconnect-*.tar.gz exists.
|
||||||
rpm: rpm-spec
|
rpm: init-rpm
|
||||||
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; \
|
||||||
@ -147,12 +150,30 @@ rpm: rpm-spec
|
|||||||
|
|
||||||
cp ../$(PKG).tar.gz $(HOME)/rpmbuild/SOURCES/$(PKG_NAME).tar.gz
|
cp ../$(PKG).tar.gz $(HOME)/rpmbuild/SOURCES/$(PKG_NAME).tar.gz
|
||||||
|
|
||||||
rpmbuild -ba .rpm/globalprotect-openconnect.spec
|
rpmbuild -ba .build/rpm/globalprotect-openconnect.spec
|
||||||
|
|
||||||
# Copy RPM package
|
# Copy RPM package
|
||||||
cp $(HOME)/rpmbuild/RPMS/$(shell uname -m)/$(PKG_NAME)*.rpm .rpm
|
cp $(HOME)/rpmbuild/RPMS/$(shell uname -m)/$(PKG_NAME)*.rpm .build/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 .rpm \
|
cp $(HOME)/rpmbuild/SRPMS/$(PKG_NAME)*.rpm .build/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), make (>= 4), openconnect (>= 8.20), libxml2, libsecret-1-0, libayatana-appindicator3-1, libwebkit2gtk-4.0-37, libgtk-3-0, gnome-keyring
|
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@
|
||||||
Homepage: https://github.com/yuezk/GlobalProtect-openconnect
|
Homepage: https://github.com/yuezk/GlobalProtect-openconnect
|
||||||
|
|
||||||
Package: globalprotect-openconnect
|
Package: globalprotect-openconnect
|
30
packaging/pkgbuild/PKGBUILD.in
Normal file
30
packaging/pkgbuild/PKGBUILD.in
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# 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@%{?dist}
|
Release: @REVISION@
|
||||||
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,6 +9,10 @@ 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