diff options
author | Patrick Northon | 2024-09-06 00:50:10 -0400 |
---|---|---|
committer | Patrick Northon | 2024-09-06 00:50:10 -0400 |
commit | cfc53c414e1d42a211f752dadbd6c4f51ecb8c3c (patch) | |
tree | f26c07ca7475e0ac2a2f7c6dd8f11f2fa6c7d27d | |
parent | ef6e0a4338a1579f661f3ae6366f09dda70df8fd (diff) | |
download | aur-cfc53c414e1d42a211f752dadbd6c4f51ecb8c3c.tar.gz |
Bump version and revamp to use fvm.
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 54 |
2 files changed, 27 insertions, 42 deletions
@@ -1,25 +1,18 @@ pkgbase = hacki pkgdesc = A Hacker News reader. - pkgver = 2.9.0 + pkgver = 2.9.1 pkgrel = 1 url = https://github.com/Livinglist/Hacki arch = x86_64 license = GPL3 - makedepends = flutter-engine + makedepends = fvm makedepends = git - makedepends = yq makedepends = patchelf depends = gtk3 depends = gstreamer depends = gst-plugins-base-libs depends = libsecret - source = git+https://github.com/Livinglist/Hacki.git#tag=v2.9.0 - source = flutter::git+https://github.com/flutter/flutter.git - source = flutter-engine::git+https://github.com/flutter/engine.git - source = git+https://chromium.googlesource.com/chromium/tools/depot_tools.git - sha256sums = 27a4fe0fb5c67dfe5e43630461c2ff7150fa68e0ab108a3a08db4943069408ca - sha256sums = SKIP - sha256sums = SKIP - sha256sums = SKIP + source = git+https://github.com/Livinglist/Hacki.git#tag=v2.9.1 + sha256sums = 01f1ea5f4a3dbc9506d67f4b5289e1e56f144a1ce9939a28674386b29983aff1 pkgname = hacki @@ -1,9 +1,11 @@ # Maintainer: Patrick Northon <northon_patrick3@yahoo.ca> +: ${_install_path:=opt} + _pkgname='hacki' pkgname=${_pkgname} _pkgreponame='Hacki' -pkgver=2.9.0 +pkgver=2.9.1 pkgrel=1 pkgdesc='A Hacker News reader.' url='https://github.com/Livinglist/Hacki' @@ -14,41 +16,31 @@ depends=( 'gstreamer' 'gst-plugins-base-libs' 'libsecret') -makedepends=('flutter-engine' 'git' 'yq' 'patchelf') -source=( - "git+${url}.git#tag=v${pkgver}" - 'flutter::git+https://github.com/flutter/flutter.git' - 'flutter-engine::git+https://github.com/flutter/engine.git' - 'git+https://chromium.googlesource.com/chromium/tools/depot_tools.git') -sha256sums=('27a4fe0fb5c67dfe5e43630461c2ff7150fa68e0ab108a3a08db4943069408ca' - 'SKIP' - 'SKIP' - 'SKIP') +makedepends=('fvm' 'git' 'patchelf') +source=("git+${url}.git#tag=v${pkgver}") +sha256sums=('01f1ea5f4a3dbc9506d67f4b5289e1e56f144a1ce9939a28674386b29983aff1') _srcdir="${_pkgreponame}" -_engine_version=3.24.0 - -prepare() { - cd "${_srcdir}" - source '/opt/flutter-engine/pkgbuild-prepare.sh' -} +_engine_version=3.24.2 build() { + export FVM_CACHE_PATH="$SRCDEST/fvm-cache" + cd "${_srcdir}" - source '/opt/flutter-engine/pkgbuild-build.sh' + fvm install "$_engine_version" + fvm use -f "$_engine_version" - local dartpkg="$(yq -er .name 'pubspec.yaml')" - flutter create --project-name="${dartpkg}" --platforms=linux --no-pub --no-overwrite . + fvm flutter create --project-name='hacki' --platforms='linux' --no-pub --no-overwrite . - flutter clean - flutter pub get + fvm flutter --disable-analytics - flutter build linux --release + fvm flutter --no-version-check pub get + fvm flutter build linux --release } package() { - # Make opt dir - install -dm755 "${pkgdir}/opt/${_pkgname}/" + # Make install dir + install -dm755 "${pkgdir}/${_install_path}/${_pkgname}/" # License cd "${_srcdir}" @@ -59,15 +51,15 @@ package() { local execfile="$(find . -mindepth 1 -maxdepth 1 -type f -perm /111)" install -Dm755 \ "${execfile}" \ - "${pkgdir}/opt/${_pkgname}/${_pkgname}" + "${pkgdir}/${_install_path}/${_pkgname}/${_pkgname}" # Folders install - cp -r 'lib/' "${pkgdir}/opt/${_pkgname}/" - cp -r 'data/' "${pkgdir}/opt/${_pkgname}/" + cp -r 'lib/' "${pkgdir}/${_install_path}/${_pkgname}/" + cp -r 'data/' "${pkgdir}/${_install_path}/${_pkgname}/" # Fix runpath - patchelf --set-rpath '$ORIGIN/lib' "$pkgdir/opt/$_pkgname/${execfile}" - for i in "$pkgdir/opt/$_pkgname/lib"/*.so; do + patchelf --set-rpath '$ORIGIN/lib' "$pkgdir/${_install_path}/$_pkgname/${execfile}" + for i in "$pkgdir/${_install_path}/$_pkgname/lib"/*.so; do [ -z "$(patchelf --print-rpath "$i")" ] && continue patchelf --set-rpath '$ORIGIN' "$i" done @@ -75,7 +67,7 @@ package() { # Symlink executable install -dm755 "${pkgdir}/usr/bin" ln -s \ - "/opt/${_pkgname}/${_pkgname}" \ + "/${_install_path}/${_pkgname}/${_pkgname}" \ "${pkgdir}/usr/bin/${_pkgname}" # Icon for .desktop |