summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Northon2023-09-29 16:16:26 -0400
committerPatrick Northon2023-09-29 16:16:26 -0400
commitcb19c45845866509186982550382eedbaadb4930 (patch)
treebcade0d64e80e2d37d99d861e2fd6d447ea1b7a0
downloadaur-cb19c45845866509186982550382eedbaadb4930.tar.gz
Initial commit.
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD87
3 files changed, 110 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..57e3374726fd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = hacki
+ pkgdesc = A Hacker News reader.
+ pkgver = 1.9.2
+ pkgrel = 1
+ url = https://github.com/Livinglist/Hacki
+ arch = x86_64
+ license = GPL3
+ makedepends = flutter-engine
+ makedepends = git
+ makedepends = yq
+ depends = gtk3
+ depends = gstreamer
+ depends = gst-plugins-base-libs
+ depends = libsecret
+ source = git+https://github.com/Livinglist/Hacki.git#tag=v1.9.2
+ source = flutter::git+https://github.com/flutter/flutter.git
+ source = flutter-engine::git+https://github.com/flutter/engine.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = hacki
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..72e8ffc0db8a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ead9523d2c94
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,87 @@
+# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>
+
+_pkgname='hacki'
+pkgname=${_pkgname}
+_pkgreponame='Hacki'
+pkgver=1.9.2
+pkgrel=1
+pkgdesc='A Hacker News reader.'
+url='https://github.com/Livinglist/Hacki'
+arch=('x86_64')
+license=('GPL3')
+depends=(
+ 'gtk3'
+ 'gstreamer'
+ 'gst-plugins-base-libs'
+ 'libsecret')
+makedepends=('flutter-engine' 'git' 'yq')
+source=(
+ "git+${url}.git#tag=v${pkgver}"
+ "flutter::git+https://github.com/flutter/flutter.git"
+ "flutter-engine::git+https://github.com/flutter/engine.git")
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP')
+
+_srcdir="${_pkgreponame}"
+
+prepare() {
+ source '/opt/flutter-engine/pkgbuild-prepare.sh'
+ cd "${_srcdir}"
+
+ local dartpkg="$(yq -er .name 'pubspec.yaml')"
+ flutter create $flutter_select_engine --project-name="${dartpkg}" --platforms=linux --no-pub --no-overwrite .
+
+ flutter clean $flutter_select_engine
+ flutter pub $flutter_select_engine get
+}
+
+build() {
+ source '/opt/flutter-engine/pkgbuild-build.sh'
+ cd "${_srcdir}"
+
+ flutter build linux --release $flutter_select_engine
+}
+
+package() {
+ # Make opt dir
+ install -dm755 "${pkgdir}/opt/${_pkgname}/"
+
+ # License
+ cd "${_srcdir}"
+ install -Dm644 'LICENSE' -t "${pkgdir}/usr/share/licenses/${_pkgname}"
+
+ # Executable install
+ cd "build/linux/x64/release/bundle"
+ local execfile="$(find . -mindepth 1 -maxdepth 1 -type f -perm /111)"
+ install -Dm755 \
+ "${execfile}" \
+ "${pkgdir}/opt/${_pkgname}/${_pkgname}"
+
+ # Folders install
+ cp -r 'lib/' "${pkgdir}/opt/${_pkgname}/"
+ cp -r 'data/' "${pkgdir}/opt/${_pkgname}/"
+
+ # Symlink executable
+ install -dm755 "${pkgdir}/usr/bin"
+ ln -s \
+ "/opt/${_pkgname}/${_pkgname}" \
+ "${pkgdir}/usr/bin/${_pkgname}"
+
+ # Icon for .desktop
+ install -Dm644 \
+ "${srcdir}/${_srcdir}/build/flutter_assets/assets/images/hacki_icon.png" \
+ "${pkgdir}/usr/share/icons/${_pkgname}.png"
+
+ # .desktop file
+ install -Dm644 <(cat << EOF
+[Desktop Entry]
+Type=Application
+Name=Hacki
+Exec=/usr/bin/${_pkgname}
+Comment=${pkgdesc}
+Categories=Internet
+Icon=${_pkgname}
+EOF
+ ) "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+}