summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d6973d24a0091d75a80a25d73e5789925d57e845 (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
# Maintainer: PastLeo <chgu82837@gmail.com>
pkgname=xrandr-watch-git
pkgver=r23.56fc8c7
pkgrel=3
pkgdesc="xrandr event watcher"
arch=('x86_64')
url='https://github.com/pastleo/xrandr-watcher'
license=('MIT')
depends=('nodejs')
makedepends=('git' 'make' 'npm')
provides=('xrandr-watch')
conflicts=('xrandr-watch')
source=(
	'git+https://github.com/pastleo/xrandr-watcher.git#branch=src'
	'default-handler-hint.sh'
	'xrandr-watcher.service'
)
md5sums=(
	'SKIP'
	'b9a8f7d7ef2127b0d88974869fd5b2c2'
	'd9029d0359429aa3c54acb7e02d111a1'
)

# 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 clean
	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
}