summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aa4f34e7ae1ab2ee085f3b9c708cc4be80f6da0c (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
35
36
37
38
39
40
41
42
43
44
# Maintainer: Facundo Olasagarre <facundo.vasco@gmail.com>

pkgname=atani
pkgver=14.39.0
pkgrel=1
pkgdesc="The all-in-one crypto platform you’ve been dreaming about. Exchanges, wallets and taxes under one roof"
arch=('x86_64')
url="https://atani.com/"
license=('unknown')
depends=('nss' 'gtk3')
makedepends=('squashfs-tools')
provides=('atani')
conflicts=('atani-snap')
replaces=('atani-snap')
_snapid="fRYdkXBDVAKnSXTJG5xa4PwBR4RqGDkV"
_snaprev="193"
install=$pkgname.install
source=("https://api.snapcraft.io/api/v1/snaps/download/${_snapid}_${_snaprev}.snap")
md5sums=('SKIP')
#sha384sums=('2f69cc4963e935a89d54a62dfe452f5bcc9c027d6480dc4e4b561bccd04f0104a745389b552712c64f82068b6a766ee4')

prepare() {
	echo "Extracting snap"
	#Extract snap file
	unsquashfs -q -f -d "${srcdir}/${pkgname}" "${_snapid}_${_snaprev}.snap"
}

package() {
	# Install files
	install -d "${pkgdir}/opt/${pkgname}"
	cp -r "${srcdir}/${pkgname}/." "${pkgdir}/opt/${pkgname}"

	# Desktop Entry
	sed -i 's|${SNAP}/meta/gui/icon.png|atani|g' "${pkgdir}/opt/${pkgname}/meta/gui/atani.desktop"
	install -Dm644 "${pkgdir}/opt/${pkgname}/meta/gui/atani.desktop" -t "${pkgdir}/usr/share/applications"
	install -Dm644 "${pkgdir}/opt/${pkgname}/meta/gui/icon.png" "${pkgdir}/usr/share/pixmaps/atani.png"

	# Clean up unnecessary files
	rm -rf "${pkgdir}/opt/${pkgname}"/{data-dir,gnome-platform,lib,meta,scripts,usr,*.sh}

	# Symlink binary to /usr/bin
	install -d "${pkgdir}/usr/bin"
	ln -sf "/opt/${pkgname}/atani" "${pkgdir}/usr/bin"
}