summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aed24d850f35256da29f2aede8dbcefa4e0eaf05 (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
64
65
66
67
# Maintainer: ghesy <ehsan at disroot dot org>

pkgname=luastatus-luajit-git
pkgver=r773.8d01bdf
pkgrel=2
pkgdesc='luastatus (a status bar content generator) built with luajit for better performance - git version'
url='https://github.com/shdown/luastatus'
arch=('x86_64')
license=('LGPL3')
provides=('luastatus')
conflicts=('luastatus')
depends=('luajit>=2.0.0')
makedepends=(
	'git'
	'cmake'
	'pkg-config'
	'python-docutils'
	'libxcb>=1.10'
	'yajl>=2.0.4'
	'alsa-lib>=1.0.27.2'
	'libpulse>=4.0'
	'libudev.so'
	'libnl>=3.0'
	'glib2>=2.40.2'
	'libx11>=1.6.2'
	'xcb-util>=0.3.8'
	'xcb-util-wm>=0.4.1'
)
optdepends=(
	"luastatus-meta: provides all luastatus dependencies"
	"lua51-luautf8: for general UTF-8 support"
	"libxcb>=1.10: for barlib 'dwm' and plugin 'xtitle'"
	"yajl>=2.0.4: for barlib 'i3'"
	"alsa-lib>=1.0.27.2: for plugin 'alsa'"
	"libpulse>=4.0: for plugin 'pulse'"
	"libudev.so: for plugin 'battery-linux', 'backlight-linux' and 'udev'"
	"libnl>=3.0: for plugin 'network'"
	"glib2>=2.40.2: for plugin 'dbus'"
	"libx11>=1.6.2: for plugin 'xkb'"
	"xcb-util>=0.3.8: for plugin 'xtitle'"
	"xcb-util-wm>=0.4.1: for plugin 'xtitle'"
)
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
	cd 'luastatus'
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd 'luastatus'
	cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib \
		-DWITH_LUA_LIBRARY=luajit -DBUILD_PLUGIN_PULSE=ON \
		-DBUILD_PLUGIN_UNIXSOCK=ON .
	make
}

package() {
	cd 'luastatus'
	make DESTDIR="$pkgdir" install
	install -dm755 "$pkgdir/usr/share/doc/luastatus/"
	install -Dm644 'DOCS/MIGRATION_GUIDE.md' -t "$pkgdir/usr/share/doc/luastatus/" ||:
	cp -r 'examples' -t "$pkgdir/usr/share/doc/luastatus/" ||:
}

# vim:noexpandtab