summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNbiba Bedis2021-10-15 20:10:44 +0100
committerNbiba Bedis2021-10-15 20:21:46 +0100
commit87a8e4a9dd071524024850ed0c4d060b6729433c (patch)
treeeff2c61d018f846fbfdf842d1dacb17fdb1aa617
downloadaur-87a8e4a9dd071524024850ed0c4d060b6729433c.tar.gz
shortwave-bin-hack
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD45
-rw-r--r--fix_flatpak.rsbin0 -> 1612 bytes
-rw-r--r--shortwave2
5 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d43bce435de8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = shortwave-bin-hack
+ pkgdesc = Find and listen to internet radio stations.
+ pkgver = f6e31bf9
+ pkgrel = 1
+ url = https://gitlab.gnome.org/World/Shortwave/
+ arch = any
+ license = GPL
+ makedepends = wget
+ makedepends = rustup
+ makedepends = ostree
+ makedepends = glib2
+ depends = gst-plugins-bad
+ depends = libadwaita
+ depends = libsoup
+ source = https://gitlab.gnome.org/World/Shortwave/-/jobs/1557054/artifacts/download?file_type=archive
+ source = fix_flatpak.rs
+ source = shortwave
+ sha256sums = 5b72f434160dce871c902218e8bfd3053ce54a028ec9b2a725356c8326e7d8d8
+ sha256sums = f51670378a964043ad835ee0c6fba088056c111762831e320fbfe5093a307aae
+ sha256sums = bdd3140b737646d38e801d7cfa2092e47126b968e32ffe32250c9046ddc76a6a
+
+pkgname = shortwave-bin-hack
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..866c6342481d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+download?file_type=archive
+pkg/
+shortwave-bin-f6e31bf9-1-any.pkg.tar.xz
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3ff6033285b7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: sigmacool
+
+pkgname=shortwave-bin-hack
+pkgver=f6e31bf9
+pkgrel=1
+pkgdesc="Find and listen to internet radio stations."
+arch=(any)
+url="https://gitlab.gnome.org/World/Shortwave/"
+license=(GPL)
+makedepends=(wget rustup ostree glib2)
+depends=('gst-plugins-bad' 'libadwaita' 'libsoup')
+source=("$url-/jobs/1557054/artifacts/download?file_type=archive" "fix_flatpak.rs" "shortwave")
+sha256sums=('5b72f434160dce871c902218e8bfd3053ce54a028ec9b2a725356c8326e7d8d8'
+ 'f51670378a964043ad835ee0c6fba088056c111762831e320fbfe5093a307aae'
+ 'bdd3140b737646d38e801d7cfa2092e47126b968e32ffe32250c9046ddc76a6a')
+
+prepare() {
+ # Build flatpak-fix dylib
+ rustc --crate-type dylib fix_flatpak.rs
+}
+
+package() {
+ # Extract flatpak
+ ostree init --repo=shortwave_repo
+ ostree --repo=shortwave_repo config set core.min-free-space-percent 0
+ ostree static-delta apply-offline --repo=shortwave_repo shortwave-dev.flatpak
+ ostree --repo=shortwave_repo checkout -U c6d9bca966412dc84cf01f6bbceffb7964b401e880d4387599db32111dd4c3c6 shortwave_build
+
+
+ # Entry point
+ install -Dm755 "$srcdir/shortwave_build/files/bin/shortwave" "$pkgdir/usr/share/shortwave/shortwave"
+
+ # Extra (desktop,icons)
+ rm -rf "$srcdir/shortwave_build/export/share/dbus-1"
+ sed -i "s/DBusActivatable=true//" "$srcdir/shortwave_build/export/share/applications/de.haeckerfelix.Shortwave.Devel.desktop"
+ cp -r "$srcdir/shortwave_build/export/share/" "$pkgdir/usr/"
+
+ # Actual program
+ install -m755 "$srcdir/shortwave_build/files/share/shortwave/de.haeckerfelix.Shortwave.Devel.gresource" "$pkgdir/usr/share/shortwave/"
+ install -m755 "$srcdir/libfix_flatpak.so" "$pkgdir/usr/share/shortwave/"
+ install -Dm755 "$srcdir/shortwave" "$pkgdir/usr/bin/shortwave"
+
+ # Gschema
+ install -Dm755 "$srcdir/shortwave_build/files/share/glib-2.0/schemas/de.haeckerfelix.Shortwave.gschema.xml" "$pkgdir/usr/share/glib-2.0/schemas/de.haeckerfelix.Shortwave.gschema.xml"
+}
diff --git a/fix_flatpak.rs b/fix_flatpak.rs
new file mode 100644
index 000000000000..dc8d10a8357b
--- /dev/null
+++ b/fix_flatpak.rs
Binary files differ
diff --git a/shortwave b/shortwave
new file mode 100644
index 000000000000..e75994960590
--- /dev/null
+++ b/shortwave
@@ -0,0 +1,2 @@
+#!/bin/bash
+LD_PRELOAD=/usr/share/shortwave/libfix_flatpak.so /usr/share/shortwave/shortwave