summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJef Roosens2022-05-22 18:48:51 +0200
committerJef Roosens2022-05-22 18:48:51 +0200
commit08e7f95f339a4816c2db6d32c4e3754a8be472c0 (patch)
tree59a52b4d3de8fbd4602d623c0bdf36e7f72a3e18
parenta628c859cda15a51a273b8e36849876cbeab9cbf (diff)
downloadaur-08e7f95f339a4816c2db6d32c4e3754a8be472c0.tar.gz
Switched to unpacking built deb
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD14
-rw-r--r--cinny-desktop.install13
4 files changed, 27 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 15ce774f9aa1..e980794fafda 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = cinny-desktop
pkgdesc = Cinny is a matrix client focusing primarily on a simple, elegant and secure interface.
pkgver = 2.0.3
- pkgrel = 1
- url = https://github.com/cinnyapp/cinny-desktop
+ pkgrel = 2
+ url = https://cinny.in/
+ install = cinny-desktop.install
arch = x86_64
license = MIT
makedepends = rust
@@ -16,7 +17,6 @@ pkgbase = cinny-desktop
depends = librsvg
depends = libvips
depends = sqlite
- conflicts = cinny-desktop-bin
source = cinny-desktop::https://github.com/cinnyapp/cinny-desktop/releases/download/v2.0.3/cinny-desktop-v2.0.3.zip
sha256sums = c74471769c2d89904b89f6418b396b9897878708393cd0a9a9d35e082c0a7e33
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..c7ea3d325949
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!cinny-desktop.install
diff --git a/PKGBUILD b/PKGBUILD
index 2aaa35539c69..fe4fd2eaeddb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,13 @@
-# vim: ft=bash
# Maintainer: Jef Roosens
pkgbase='cinny-desktop'
pkgname='cinny-desktop'
pkgver='2.0.3'
-pkgrel='1'
+pkgrel='2'
pkgdesc='Cinny is a matrix client focusing primarily on a simple, elegant and secure interface.'
arch=('x86_64')
-url='https://github.com/cinnyapp/cinny-desktop'
+url='https://cinny.in/'
license=('MIT')
# https://tauri.studio/v1/guides/getting-started/prerequisites#1-system-dependencies
@@ -23,10 +22,10 @@ depends=(
'sqlite'
)
makedepends=('rust' 'nodejs' 'npm')
-conflicts=('cinny-desktop-bin')
source=("${pkgname}::https://github.com/cinnyapp/cinny-desktop/releases/download/v${pkgver}/cinny-desktop-v${pkgver}.zip")
sha256sums=('c74471769c2d89904b89f6418b396b9897878708393cd0a9a9d35e082c0a7e33')
+install="${pkgname}.install"
build() {
cd "${pkgname}"
@@ -36,13 +35,10 @@ build() {
cd .. && npm ci
msg2 'Running Tauri build...'
- # We don't actually need the deb, but the build fails if bundles is
- # specified as being empty.
npm run tauri build -- --bundles 'deb'
}
package() {
- install -dm755 "${pkgdir}/usr/bin"
- install -Dm755 "${pkgname}/src-tauri/target/release/cinny" "${pkgdir}/usr/bin/cinny"
- install -Dm 644 "${pkgname}/resources/in.cinny.Cinny.desktop" "${pkgdir}/usr/share/applications/cinny.Cinny.desktop"
+ ar x "${pkgname}/src-tauri/target/release/bundle/deb/cinny_${pkgver}_amd64.deb" 'data.tar.gz'
+ tar xzf 'data.tar.gz' -C "${pkgdir}"
}
diff --git a/cinny-desktop.install b/cinny-desktop.install
new file mode 100644
index 000000000000..c943167e6f69
--- /dev/null
+++ b/cinny-desktop.install
@@ -0,0 +1,13 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f 'usr/share/icons/hicolor'
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f 'usr/share/icons/hicolor'
+ update-desktop-database -q
+}