improve install script

This commit is contained in:
Kevin Yue 2021-09-19 07:54:15 +08:00
parent 5c8aefa4fc
commit 28d4ac834a
2 changed files with 5 additions and 11 deletions

View File

@ -9,31 +9,25 @@ arch=(x86_64 aarch64)
url="https://github.com/yuezk/${_gitname}" url="https://github.com/yuezk/${_gitname}"
license=('GPL3') license=('GPL3')
depends=('openconnect>=8.0.0' qt5-base qt5-webengine qt5-websockets) depends=('openconnect>=8.0.0' qt5-base qt5-webengine qt5-websockets)
makedepends=() makedepends=(g++ make)
source=( source=(
"${_gitname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz" "${_gitname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
"https://github.com/itay-grudev/SingleApplication/archive/v3.0.19.tar.gz"
"https://github.com/SergiusTheBest/plog/archive/1.1.5.tar.gz"
) )
sha256sums=( sha256sums=(
'{SOURCE_SHA}' '{SOURCE_SHA}'
'9405fd259288b2a862e91e5135bccee936f0438e1b32c13603277132309d15e0'
'6c80b4701183d2415bec927e1f5ca9b1761b3b5c65d3e09fb29c743e016d5609'
); );
prepare() { prepare() {
mv "$srcdir/SingleApplication-3.0.19" -T "$srcdir/${_gitname}-${pkgver}/singleapplication"
mv "$srcdir/plog-1.1.5" -T "$srcdir/${_gitname}-${pkgver}/plog"
} }
build() { build() {
cd "$srcdir/${_gitname}-${pkgver}" cd "$srcdir/${_gitname}-${pkgver}"
qmake CONFIG+=release "${srcdir}/${_gitname}-${pkgver}/GlobalProtect-openconnect.pro" ./cmakew -B build
make MAKEFLAGS=-j$(nproc) ./cmakew --build build
} }
package() { package() {
cd "$srcdir/${_gitname}-${pkgver}" cd "$srcdir/${_gitname}-${pkgver}"
make INSTALL_ROOT="$pkgdir/" install make DESTDIR="$pkgdir/" install -C build
} }

View File

@ -1,7 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
./cmakew -B build ./cmakew -B build
./cmakew --build build MAKEFLAGS=-j$(nproc) ./cmakew --build build
sudo ./cmakew --install build sudo ./cmakew --install build
sudo systemctl daemon-reload sudo systemctl daemon-reload