diff options
author | xiota | 2023-11-05 09:14:27 -0800 |
---|---|---|
committer | xiota | 2023-11-05 09:16:20 -0800 |
commit | cb0db5a30f1586d8e3f77766e7da5bf0404d825c (patch) | |
tree | b47ad40079880c55e1d99e6ec2fb46026c33befa /PKGBUILD | |
parent | f4d079af4b35648b915233d6317e8f94a4a539e8 (diff) | |
download | aur-xf86-input-libinput-git.tar.gz |
1.4.0.r0
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 112 |
1 files changed, 83 insertions, 29 deletions
@@ -1,44 +1,98 @@ -# Maintainer: Vincent Grande <shoober420@gmail.com> +# Maintainer: +# Contributor: Vincent Grande <shoober420@gmail.com> # Contributor: Det <thatone> +# Contributor: Andreas Radke <andyrtr@archlinux.org> # Contributor: Laurent Carlier <lordheavym@gmail.com> -pkgname=xf86-input-libinput-git -pkgver=0.28.1.1.r250.g4985de5 +_pkgname="xf86-input-libinput" +pkgname="$_pkgname-git" +pkgver=1.4.0.r0.g46af622 pkgrel=1 pkgdesc="Generic input driver for the X.Org server based on libinput" -arch=('x86_64') -license=('custom') url="http://xorg.freedesktop.org/" -depends=('libinput') -makedepends=('xorg-server-devel' 'libxi' 'libx11' 'xorgproto') -optdepends=('xorg-xinput: input configuration for X') -conflicts=('xorg-server<1.19.0' 'X-ABI-XINPUT_VERSION<24' 'X-ABI-XINPUT_VERSION>=25') -provides=('xf86-input-libinput') -conflicts=('xf86-input-libinput') -groups=('xorg-drivers') -source=("git+https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput") -sha512sums=('SKIP') -validpgpkeys=('SKIP') # Peter Hutterer (Who-T) <office@who-t.net> - -pkgver() { - cd xf86-input-libinput - - echo $(git describe --long | cut -d "-" -f4-5 | tr - .).r$(git rev-list HEAD --count).$(git describe --long | cut -d "-" -f6) -} +license=('MIT') +arch=('x86_64') + +depends=( + 'glibc' + 'libinput' +) +makedepends=( + 'X-ABI-XINPUT_VERSION=24.4' + 'libx11' + 'libxi' + 'xorg-server-devel' + 'xorgproto' +) +conflicts=( + 'xorg-server<1.19.0' + 'X-ABI-XINPUT_VERSION<24' + 'X-ABI-XINPUT_VERSION>=25' +) + +if [ x"$pkgname" == x"$_pkgname" ] ; then + # normal package + + _pkgsrc="$_pkgname-${pkgver%%.r*}" + _pkgext="tar.xz" + source+=( + "$_pkgsrc.$_pkgext"::"https://xorg.freedesktop.org/releases/individual/driver/$_pkgsrc.$pkgext"{,.sig} + ) + sha256sums+=( + '3a3d14cd895dc75b59ae2783b888031956a0bac7a1eff16d240dbb9d5df3e398' + 'SKIP' + ) + validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office@who-t.net> + + _config_cmd="configure" + + pkgver() { + echo "${pkgver%%.r*}" + } +else + # git package + url="https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput" + + makedepends+=('git') + + provides=("$_pkgname=${pkgver%%.r*}") + conflicts=("$_pkgname") + + _pkgsrc="$_pkgname" + source+=("$_pkgsrc"::"git+$url.git") + sha256sums+=('SKIP') + + _config_cmd="autogen.sh" + + pkgver() ( + set -o pipefail + + cd "$_pkgsrc" + git describe --long --tags 2>/dev/null \ + | sed -E 's/^xf86-[^0-9]+//;s/([^-]*-g)/r\1/;s/-/./g' \ + || printf "r%s.%s" \ + "$(git rev-list --count HEAD)" \ + "$(git rev-parse --short=7 HEAD)" + ) +fi build() { - cd xf86-input-libinput + local _config_options=( + --prefix=/usr + --disable-static + ) + + cd "$_pkgsrc" + ./"${_config_cmd:?}" "${_config_options[@]}" + + [ -f libtool ] && sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' -i libtool - ./autogen.sh --prefix=/usr \ - --disable-static make } package() { - cd xf86-input-libinput - - make DESTDIR="${pkgdir}" install + cd "$_pkgsrc" + make DESTDIR="${pkgdir:?}" install - install -m755 -d "${pkgdir}/usr/share/licenses/xf86-input-libinput" - install -m644 COPYING "${pkgdir}/usr/share/licenses/xf86-input-libinput/" + install -Dm644 COPYING "${pkgdir:?}/usr/share/licenses/${pkgname}/LICENSE" } |