Username: Password: Remember me
# Contributions from Arch:
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
 
pkgname=libratbag
pkgver=0.11
pkgrel=1
pkgdesc='A DBus daemon to configure gaming mice'
arch=('x86_64')
url='https://github.com/libratbag/libratbag'
license=('MIT')
depends=('glib2' 'libevdev' 'libudev.so' 'libunistring' 'json-glib' 'python3' 'python3-evdev')
makedepends=('meson' 'swig' 'git' 'python3-sphinx' 'python3-sphinx_rtd_theme')
optdepends=('linux: Linux 5.2 is required for Logitech wireless devices')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('aa0bb012c2f581ee35ec023d516d23eb22d38f16092e7de44bd8481df953408d')
 
prepare() {
  sed -i 's|sphinx-build3|sphinx-build|' $pkgname-$pkgver/doc/meson.build
}
 
build() {
  mkdir -p $pkgname-$pkgver/build
  cd $pkgname-$pkgver/build
 
  chakra-meson .. \
  	-Dsystemd-unit-dir=/usr/lib/systemd/system \
  	-Ddocumentation=true
 
  ninja
}
 
package() {
  cd $pkgname-$pkgver/build
 
  DESTDIR="$pkgdir" ninja install
 
  # Install documentation
  install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
  cp -r -a --no-preserve=ownership doc/html "$pkgdir"/usr/share/doc/$pkgname
 
  # Install license
  install -Dm 644 ../COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}