summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPetr Špaček2023-08-25 21:56:04 +0200
committerPetr Špaček2023-08-25 22:23:31 +0200
commitc92703a2f03da6717ed3965bb4da05ee264ba488 (patch)
tree2db50817313d4f9dc89ad2bbc9740346209e8f65 /PKGBUILD
downloadaur-c92703a2f03da6717ed3965bb4da05ee264ba488.tar.gz
Upstream AppImage content moved to /opt/ubpm
Upstream is not interested in proper Linux packaging, see https://codeberg.org/LazyT/ubpm/issues/45 As workaround, redirect whole AppImage file structure into /opt/ubpm, and disable SSL library & desktop integration build steps. For unknown reason I could not get .desktop files to install into /opt, so instead of proper .desktop files etc. just create link from /usr/bin/ubpm to /opt/ubpm/usr/bin/ubpm and be done with it.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..414fe4d0f86c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Petr Spacek <arch@petr.spackovi.net>
+pkgname='ubpm-git'
+pkgver=1.8.0.r6.f0deede
+pkgrel=1
+pkgdesc="Universal Blood Pressure Manager"
+arch=(x86_64)
+url="https://codeberg.org/LazyT/ubpm"
+license=('GPL3')
+makedepends=('git' 'qt6-base' 'qt6-charts' 'qt6-serialport' 'qt6-connectivity')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+options=('debug')
+source=('git+https://codeberg.org/LazyT/ubpm.git' 'install-to-opt.patch')
+sha256sums=('SKIP' '3162370edbc613a54bb25a89ac6f51d2ab68aa1bb927453257e385390e750de5')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "%s" "$(git describe --tags --long | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}"
+ # hack to workaround https://codeberg.org/LazyT/ubpm/issues/45
+ patch --directory="${srcdir}//${pkgname%-git}" --forward --strip=1 --input="${srcdir}/install-to-opt.patch"
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}/sources"
+ qmake6
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}/sources"
+ make INSTALL_ROOT="$pkgdir/" install
+ mkdir -p "$pkgdir/usr/bin"
+ ln -s -v "/opt/ubpm/usr/bin/ubpm" "$pkgdir/usr/bin/ubpm"
+}