summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a9b9f8ae4489a3ecb0a5b9914d007139bc36f0d4 (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
45
46
47
48
49
50
51
52
53
54
# Maintainer: ValHue <vhuelamo at gmail dot com>
#
# Contributor: ValHue <vhuelamo at gmail dot com>>
#
_pkgname="getpocket"
pkgname="${_pkgname}"-desktop
pkgver="7.0.12.0"
pkgrel="1"
pkgdesc="Pocket packaged as a desktop application"
url="https://getpocket.com/about"
arch=('x86_64')
license=('unknown')
depends=('alsa-lib' 'gconf' 'gtk2' 'libxss' 'libxtst' 'nss')
makedepends=('nodejs-nativefier')
provides=("${_pkgname}")

_getpocket_desktop="[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Pocket
Comment=Desktop version of Pocket
Exec=getpocket-desktop
StartupWMClass=getpocket-desktop
Icon=pocket
Terminal=false
Type=Application
Categories=Network;
X-Desktop-File-Install-Version=0.22"

build() {
	cd "${srcdir}"
    echo -e "$_getpocket_desktop" | tee getpocket.desktop

	nativefier getpocket.com \
		--name 'getpocket' \
		--disable-context-menu \
		--disable-dev-tools \
		--width 800px \
		--height 600px
}

package() {
	cd "${srcdir}"
	install -D -m 644 *.desktop "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
	install -d "${pkgdir}"/{opt,usr/bin}
	cp -r getpocket-linux-x64 "${pkgdir}/opt/getpocket"

	cd "${pkgdir}"
	chmod 755 opt/getpocket/resources/app
	ln -s ../../opt/getpocket/${_pkgname} usr/bin/${pkgname}
}


# vim:set ts=4 sw=4 ft=sh et syn=sh ft=sh: