summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 219b2e1e41eaaba6431a6fb8f8b19ec154cc6fa4 (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
# Maintainer: Rsplwe <i@rsplwe.com>
# Contributor: witt <1989161762 at qq dot com>

pkgname=snipaste
pkgver=2.10.6
pkgrel=1
pkgdesc="Snip & Paste!"
arch=('x86_64')
url="https://www.snipaste.com"
license=('custom')
options=(!strip)
depends=()
makedepends=()
source_x86_64=(
	"$pkgname-$pkgver.AppImage::https://download.snipaste.com/archives/Snipaste-$pkgver-x86_64.AppImage"
)
sha256sums_x86_64=('9643f760de1935bb4cd9b79010858fc4113a2574e84415b8f1000c2f0fd30734')

noextract=("$pkgname-$pkgver.AppImage")

prepare () {
	chmod +x "$pkgname-$pkgver.AppImage"
	./$pkgname-$pkgver.AppImage --appimage-extract > /dev/null
}

package() {
	install -d "${pkgdir}/opt/${pkgname}"
	cp -a ./squashfs-root/usr/. "${pkgdir}/opt/$pkgname"

	chmod 755 "$pkgdir/opt/$pkgname/bin/Snipaste"
	chmod 755 "$pkgdir/opt/$pkgname/bin/wlhelper"

	install -d "$pkgdir"/usr/bin
	ln -s "/opt/$pkgname/bin/Snipaste" "$pkgdir"/usr/bin/Snipaste
	ln -s "/opt/$pkgname/bin/wlhelper" "$pkgdir"/usr/bin/wlhelper

	install -d "$pkgdir/usr/share/applications"
	ln -s "/opt/$pkgname/share/applications/Snipaste.desktop" "$pkgdir/usr/share/applications/Snipaste.desktop"

	install -d "$pkgdir"/usr/share/icons
	cp -a ./squashfs-root/usr/share/icons/. "$pkgdir/usr/share/icons"
}