summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f1bf2d2de80b6abb0eeb1dede3312195fffedf36 (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
# Maintainer:
# Contributor: Mark Wagie <mark dot wagie at tutanota dot com>
# Contributor: FabioLolix <fabio dot loli at disroot dot org>
# Contributor: Conor Anderson <conor at conr dot ca>
pkgname=lighttable-git
pkgver=0.8.1.r114.g3760844
pkgrel=1
pkgdesc="Next generation code editor and IDE with instant feedback."
arch=('i686' 'x86_64')
url="http://lighttable.com"
license=('MIT')
depends=('gconf' 'gtk3' 'nss' 'libxss' 'java-runtime')
makedepends=('git' 'npm' 'leiningen')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}" "${pkgname%-git}-bin")
source=("${pkgname%-git}::git+https://github.com/LightTable/LightTable.git"
        "${pkgname%-git}.desktop")
sha256sums=('SKIP'
            '0b86a091507d4f85e7c113807d8524a03e4ce70e763c70239e35974c3e2fb587')

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

prepare() {
	cd "$srcdir/${pkgname%-git}"

	# Use temporary npm cache
	mkdir -p npm-cache
	sed -i 's|npm install|npm install --cache ../../npm-cache|g' script/build.sh
}

build() {
	cd "$srcdir/${pkgname%-git}"
	script/build.sh
}

package() {
	cd "$srcdir/${pkgname%-git}"

	# Place main files
	install -d "$pkgdir/opt/${pkgname%-git}"
	cp -a "builds/${pkgname%-git}-0.9.0-linux"/* "$pkgdir/opt/${pkgname%-git}"

	# Link to binary
	install -d "$pkgdir/usr/bin"
	ln -s "/opt/${pkgname%-git}/LightTable" "$pkgdir/usr/bin/${pkgname%-git}"

	# Install desktop file
	install -Dm644 "$srcdir/${pkgname%-git}.desktop" -t "$pkgdir/usr/share/applications"

	# Install icon
	install -Dm644 deploy/core/img/lticon.png "$pkgdir/usr/share/pixmaps/${pkgname%-git}.png"

	# Install license in proper location
	install -dm644 "$pkgdir/usr/share/licenses/${pkgname%-git}"
	mv "$pkgdir/opt/${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
}