summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2024-05-14 17:25:27 -0600
committerMark Wagie2024-05-14 17:25:27 -0600
commit5ba8cf53a22ca2512cb042ffb7569dd32d39667f (patch)
tree013cba7f5bdb5f62a25cf6d7b16114780a43ae43
parent12350edc138ae0a1ce0a0e3875a179be9d11481c (diff)
downloadaur-5ba8cf53a22ca2512cb042ffb7569dd32d39667f.tar.gz
use fvm to build
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD38
2 files changed, 26 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6e6399e66de..6213840388b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = yubico-authenticator
pkgdesc = Yubico Authenticator for Desktop
pkgver = 7.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Yubico/yubioath-flutter
arch = x86_64
arch = aarch64
@@ -9,6 +9,7 @@ pkgbase = yubico-authenticator
makedepends = chrpath
makedepends = clang
makedepends = cmake
+ makedepends = fvm
makedepends = git
makedepends = ninja
makedepends = python-build
@@ -25,9 +26,7 @@ pkgbase = yubico-authenticator
depends = python-zxing-cpp
depends = yubikey-manager
source = git+https://github.com/Yubico/yubioath-flutter.git#tag=7.0.0?signed
- source = flutter-3.19.6.tar.xz::https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.19.6-stable.tar.xz
validpgpkeys = 20EE325B86A81BCBD3E56798F04367096FBA95E8
sha256sums = e728ae5c5e94f7ed9b92a76e1e5dc91a6e4775da265b51379f027bf47f6bf84d
- sha256sums = db6742a20626d0d2a089eb41ad61b9b2138b996679911e9c8268c1f896191f97
pkgname = yubico-authenticator
diff --git a/PKGBUILD b/PKGBUILD
index 94ab14139e1e..2e39cb988303 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,7 @@ pkgname=yubico-authenticator
_app_id=com.yubico.yubioath
pkgdesc="Yubico Authenticator for Desktop"
pkgver=7.0.0
-pkgrel=1
-_flutter_ver=3.19.6
+pkgrel=2
arch=('x86_64' 'aarch64')
url="https://github.com/Yubico/yubioath-flutter"
license=('Apache-2.0')
@@ -23,6 +22,7 @@ makedepends=(
'chrpath'
'clang'
'cmake'
+ 'fvm'
'git'
'ninja'
'python-build'
@@ -30,14 +30,28 @@ makedepends=(
'python-poetry-core'
'python-wheel'
)
-source=("git+https://github.com/Yubico/yubioath-flutter.git#tag=$pkgver?signed"
- "flutter-${_flutter_ver}.tar.xz::https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${_flutter_ver/.hotfix/+hotfix}-stable.tar.xz")
-sha256sums=('e728ae5c5e94f7ed9b92a76e1e5dc91a6e4775da265b51379f027bf47f6bf84d'
- 'db6742a20626d0d2a089eb41ad61b9b2138b996679911e9c8268c1f896191f97')
+source=("git+https://github.com/Yubico/yubioath-flutter.git#tag=$pkgver?signed")
+sha256sums=('e728ae5c5e94f7ed9b92a76e1e5dc91a6e4775da265b51379f027bf47f6bf84d')
validpgpkeys=('20EE325B86A81BCBD3E56798F04367096FBA95E8') # Dain Nilsson <dain@yubico.com>
prepare() {
cd yubioath-flutter
+ export FVM_CACHE_PATH="$srcdir/fvm"
+ fvm install stable
+ fvm global stable
+
+ # Disable analytics and enable linux desktop
+ fvm flutter --no-version-check config --no-analytics
+ fvm flutter --no-version-check config --enable-linux-desktop
+
+ # Because yubico_authenticator depends on flutter_localizations from sdk
+ # which depends on intl 0.19.0, intl 0.19.0 is required.
+ # So, because yubico_authenticator depends on intl ^0.18.1, version solving failed.
+ fvm flutter pub add intl:^0.19.0
+
+ # Pull dependencies within prepare, allowing for offline builds later on
+ fvm flutter --no-version-check pub get
+
desktop-file-edit --set-key=Exec --set-value="authenticator" --set-icon="${_app_id}" \
resources/linux/linux_support/com.yubico.authenticator.desktop
@@ -52,18 +66,14 @@ build() {
GIT_DIR='.' python -m build --wheel --no-isolation
popd
- export FLUTTER_HOME="$srcdir/flutter"
- export PATH="${FLUTTER_HOME}/bin:${PATH}"
- flutter --disable-analytics
- flutter pub get
- flutter build linux
+ export FVM_CACHE_PATH="$srcdir/fvm"
+ fvm flutter --no-version-check build linux
}
check() {
cd yubioath-flutter
- export FLUTTER_HOME="$srcdir/flutter"
- export PATH="${FLUTTER_HOME}/bin:${PATH}"
- flutter test
+ export FVM_CACHE_PATH="$srcdir/fvm"
+ fvm flutter --no-version-check test
}
package() {