Username: Password: Remember me
# Contributions from Arch:
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
 
pkgname=libratbag
pkgver=0.13
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=('b0a71851e5781eed789f5ba5f44bc6bc36ec4a7ef77fcc0303976149f3f719c9')
 
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 \
        -Dtests=false
 
  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
}