# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=xf86-input-libinput
pkgver=%version%
pkgrel=%release%
pkgdesc="Generic input driver for the X.Org server based on libinput"
arch=('x86_64')
license=('custom:MIT')
url="http://xorg.freedesktop.org/"
depends=('libinput' 'glibc')
makedepends=('xorg-server-devel' 'X-ABI-XINPUT_VERSION=24.4' 'libxi' 'libx11' 'xorgproto')
conflicts=('xorg-server<1.19.0' 'X-ABI-XINPUT_VERSION<24' 'X-ABI-XINPUT_VERSION>=25')
groups=('xorg-drivers')
source=(https://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.xz{,.sig})
sha512sums=('b286b5425aeda5cfecd1de7f59663d169b95ffc55474dfbf28c2e13e5221cbeecd472d40b6094c0a937f83db67bf58a7fe0e07d25b6a6945d3fd669e717fc0bf'
            'SKIP')
validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office@who-t.net>
#validpgpkeys=('FD0004A26EADFE43A4C3F249C6F7AE200374452D') # "Povilas Kanapickas <povilas@radix.lt>"

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
