[misc] update the build script

This commit is contained in:
Kevin Yue 2022-05-09 22:40:00 +08:00
parent ff58258d5c
commit e3aba11506
2 changed files with 41 additions and 1 deletions

40
packaging/aur/PKGBUILD.in Normal file
View File

@ -0,0 +1,40 @@
# Maintainer: Keinv Yue <yuezk001@gmail.com>
_pkgver="{VERSION}"
_commit="{COMMIT}"
pkgname=globalprotect-openconnect-git
pkgver=${_pkgver}
pkgrel=1
pkgdesc="A GlobalProtect VPN client (GUI) for Linux based on Openconnect and built with Qt5, supports SAML auth mode. (development version)"
arch=(x86_64 aarch64)
url="https://github.com/yuezk/GlobalProtect-openconnect"
license=('GPL3')
backup=(
etc/gpservice/gp.conf
)
install=gp.install
depends=('openconnect>=8.0.0' qt5-base qt5-webengine qt5-websockets)
makedepends=(git cmake)
conflicts=('globalprotect-openconnect')
provides=('globalprotect-openconnect' 'gpclient' 'gpservice')
source=(git+https://github.com/yuezk/GlobalProtect-openconnect#commit=${_commit})
sha256sums=('SKIP')
prepare() {
cd GlobalProtect-openconnect
echo "${_pkgver}" > VERSION
}
build() {
cd GlobalProtect-openconnect
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE=-s
make -j$(nproc) -C build
}
package() {
cd GlobalProtect-openconnect
make DESTDIR="$pkgdir/" install -C build
}

View File

@ -35,7 +35,7 @@ function update_rpm_changelog() {
function generate_pkgbuild() { function generate_pkgbuild() {
local commit_id="$(git rev-parse HEAD)" local commit_id="$(git rev-parse HEAD)"
local version="$(cat VERSION)" local version="$(cat VERSION)"
sed -i"" -e "s/{COMMIT}/${commit_id}/" -e "s/{VERSION}/${version}/" packaging/aur/PKGBUILD sed -e "s/{COMMIT}/${commit_id}/" -e "s/{VERSION}/${version}/" packaging/aur/PKGBUILD.in > packaging/aur/PKGBUILD
} }
# Update rpm version # Update rpm version