summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 85f50b16891078a0300d33c941d903c870382653 (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
# Maintainer: Alexander Bocken <alexander@bocken.org>
pkgname=bthandler
pkgver=r87.4ed78ac
pkgrel=2
pkgdesc="A shell script to interact with bluetooth devices via dmenu"
arch=(any)
depends=('bluez-utils')
makedepends=('git')
optdepends=(
	'dmenu: display menu'
)
url="https://github.com/AlexBocken/bthandler"
license=('AGPL3')
source=('bthandler::git+https://github.com/AlexBocken/bthandler.git')
md5sums=('SKIP')
pkgver() {
	cd "$srcdir/$pkgname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
	cd "$srcdir/$pkgname"
	mkdir -p /home/${USER}/.config/bt
	cp config /home/${USER}/.config/bt/config
	touch /home/${USER}/.config/bt/blacklist
	touch /home/${USER}/.config/bt/alias
	touch /home/${USER}/.config/bt/paired

	#remove wrong older install location
	rm -f $pkgdir/usr/bin/bt

	install -Dm755 bt $pkgdir/usr/local/bin/bt
	install -Dm644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
}