summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0ba55a61b6a5e3237cf5a17f00a09902b50835e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Vladislav Titov <vtitov at gmx dot com>
_pkgname=acreom
pkgname=acreom-bin
pkgver=1.15.12
_appimage=acreom-$pkgver.AppImage
pkgrel=1
pkgdesc="A powerful knowledge base integrated with time management running on local markdown files"
arch=('x86_64')
url="https://github.com/Acreom/releases"
license=('custom:Commercial')
provides=("acreom=${pkgver}")
conflicts=('acreom')
options+=('!strip')
source=("$url/releases/download/v$pkgver/$_appimage")
noextract=($_appimage)
sha256sums=('04f433ef7f7abf675c1c85d6aff7844f09d66d86e60eb63694abbc9112a32e76')

prepare() {
	chmod +x ${_appimage}
	./$_appimage --appimage-extract $_pkgname.desktop
	./$_appimage --appimage-extract usr/share/icons/hicolor/0x0/apps/$_pkgname.png
	chmod -R a-x+rX squashfs-root/usr
}

package() {
	install -Dm755 "$srcdir/$_appimage" "$pkgdir/opt/$_pkgname/$_appimage"
	install -dm755 "$pkgdir/usr/bin"
	ln -s "/opt/$_pkgname/$_appimage" "$pkgdir/usr/bin/$_pkgname"

	sed -i "s|Exec=AppRun --no-sandbox %U|Exec=/usr/bin/$_pkgname --no-sandbox %U|" "$srcdir/squashfs-root/$_pkgname.desktop"
	install -Dm644 "$srcdir/squashfs-root/$_pkgname.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop"

	install -Dm644 "$srcdir/squashfs-root/usr/share/icons/hicolor/0x0/apps/$_pkgname.png" "$pkgdir/usr/share/pixmaps/$_pkgname.png"
}