summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d3f5086d16a29a22834cafdc79ed22ae3e1bbd4b (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
# Maintainer: PastLeo <chgu82837@gmail.com>
pkgname=xrandr-watch-git
pkgver=r3.6aa95bb
pkgrel=1
pkgdesc="xrandr event watcher"
arch=('x86_64')
url='https://github.com/pastleo/xrandr-watcher'
license=('MIT')
depends=('nodejs')
makedepends=('git' 'make')
provides=('xrandr-watch')
conflicts=('xrandr-watch')
source=(
	'git://github.com/pastleo/xrandr-watcher.git#branch=master'
	'default-handler-hint.sh'
	'xrandr-watcher.service'
)
md5sums=(
	'SKIP'
	'55e84a48456024d6d61313bdb15daaee'
	'1547e19adcbf94d91109e99dab57a464'
)

# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.

pkgver() {
	cd "$srcdir/xrandr-watcher"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/xrandr-watcher"
	make

	cd "$srcdir"
	cp xrandr-watcher/example-handler.sh ./xrandr-watcher-handler-example
	cat default-handler-hint.sh >> ./xrandr-watcher-handler-example

}

package() {
	cd "$srcdir"
	install -Dm755 xrandr-watcher/xrandr-watcher "$pkgdir"/usr/bin/xrandr-watcher
	install -Dm755 xrandr-watcher-handler-example "$pkgdir"/usr/bin/xrandr-watcher-handler-example
	install -Dm644 xrandr-watcher.service "$pkgdir"/usr/lib/systemd/user/xrandr-watcher.service
}