summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d31e6e185e27256ec357f9ba4de5f5adfac788d9 (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
# Maintainer: Sven Klomp <mail at klomp dot eu>

pkgname=mopidy-tpa2016d2-git
_gitname=mopidy-tpa2016d2
pkgver=0.0.1
pkgrel=1
pkgdesc="Mopidy extension for controlling volume using an external tpa2016d2 amplifier"
arch=('any')
url="https://github.com/klomp/mopidi-tpa2016d2"
license=('APACHE')
depends=('python2' 'i2c-tools' 'mopidy>=0.19')
makedepends=('python2' 'git')
conflicts=('mopidy-tpa2016d2')
provides=('mopidy-tpa2016d2')
source=("git+https://github.com/avanc/mopidy-tpa2016d2.git"
        "i2c.rules")
md5sums=('SKIP'
         'fb0e3ffcaa8841f352d9435978ec792d')

package() {
  cd "$_gitname"
  python2 setup.py install --prefix=/usr --root="$pkgdir/" --optimize=1
  install -Dm644 "$srcdir/$_gitname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  install -Dm644 "$srcdir/i2c.rules" "$pkgdir/etc/udev/rules.d/i2c.rules"
}

post_install() {
	getent group i2c &>/dev/null || groupadd -r i2c >/dev/null
	usermod -aG i2c mopidy
	true
}

# vim:set ts=2 sw=2 et: