summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: da1807152faa30149aa166ff103bdaea6be7a0f5 (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
55
56
57
58
59
60
61
62
63
# Maintainer: Morgana <morganamilo@gmail.com>

pkgname=superproductivity-git
_pkgname=superProductivity
_reponame=super-productivity
_binname=superproductivity
pkgver=1.9.1.r0.g4bfc52a
pkgrel=1
pkgdesc='To Do List / Time Tracker with Jira Integration.'
arch=('x86_64')
url="http://super-productivity.com/"
license=('MIT')
depends=('gtk2' 'libxss' 'gconf' 'nss' 'nspr' 'libnotify' 'libappindicator'
'libxtst' 'alsa-lib' 'xprintidle')
makedepends=('npm' 'gulp' 'bower' 'yarn' 'chromium' 'libicns' 'graphicsmagick' 'python3')
provides=('superproductivity')
conflicts=('superproductivity')
source=("git+https://github.com/johannesjo/${_reponame}#branch=develop")
md5sums=('SKIP')

build() {
	cd ${srcdir}/${_reponame}
	npm install
	bower install
	CHROME_BIN=/usr/bin/chromium npm run dist -- -l deb

	#use the deb because it contains icon files and a .desktop file
	_pkgver=`git describe --abbrev=0 --tags | sed 's/^.//'`
	cd "${srcdir}/${_reponame}/dist/"
	ar -x superProductivity_${_pkgver}_amd64.deb
	tar -xf "data.tar.xz"
}



package() {
	cd ${srcdir}/${_reponame}
	install -d "${pkgdir}/opt/${_pkgname}"
	cp -a "${srcdir}/${_reponame}/dist/opt/${_pkgname}/." "${pkgdir}/opt/${_pkgname}"

	chmod 755 "${pkgdir}/opt/${_pkgname}/${_binname}"

	install -d "${pkgdir}/usr/share/applications"
	install -Dm644 "${srcdir}/${_reponame}/dist/usr/share/applications/${_binname}.desktop" "${pkgdir}/usr/share/applications"

	install -d "${pkgdir}/usr/bin"
	ln -s "/opt/${_pkgname}/${_binname}" "${pkgdir}/usr/bin/${_binname}"

	for size in 16 24 32 48 64 96 128 256; do
		install -Dm644 "${srcdir}/${_reponame}/dist/usr/share/icons/hicolor/${size}x${size}/apps/${_binname}.png" "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${_binname}.png"
    	done

	install -Dm644 "${srcdir}/${_reponame}/LICENSE" "${pkgdir}/usr/share/licenses/${_binname}/LICENSE"


}

pkgver() {
	cd ${srcdir}/${_reponame}
	git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}