summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9fa0e6a4242b25be03453b4134ee9c0a83ab7f0c (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: martiuk <me at martinke dot mp>

_pkgname=xorgproto
pkgname="$_pkgname-explicit-sync-git"
pkgver=2023.2.8.r2754.g1c8128d
pkgrel=1
pkgdesc='combined X.Org X11 Protocol headers with explicit sync support (git version)'
arch=('any')
url="https://xorg.freedesktop.org/"
license=('custom')
makedepends=(
	'git'
	'meson'
	'xorg-util-macros'
)
checkdepends=('python-libevdev')
provides=('xorgproto')
conflicts=('xorgproto')
source=(
	"$_pkgname::git+https://gitlab.freedesktop.org/xorg/proto/xorgproto.git"
	"https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/59.patch"
)
sha512sums=('SKIP' 'SKIP')

pkgver() {
  cd "$_pkgname"
  echo $(git describe --long | cut -d "-" -f2-3 | tr - .).r$(git rev-list HEAD --count).$(git describe --long | cut -d "-" -f4)
}

prepare() {
  mkdir -p build
  cd "$_pkgname"
	patch -Np1 -i "${srcdir}/59.patch"
}

build() {
  arch-meson "$_pkgname" build
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" ninja -C build install

  # missing docs
  install -m755 -d "${pkgdir}/usr/share/doc/${_pkgname}"
  install -m644 "$_pkgname"/PM_spec "${pkgdir}/usr/share/doc/${_pkgname}/"

  # licenses
  install -m755 -d "${pkgdir}/usr/share/licenses/${_pkgname}"
  install -m644 "$_pkgname"/COPYING* "${pkgdir}/usr/share/licenses/${_pkgname}/"
  # remove licences of legacy stuff we don't ship anymore
  rm -f "${pkgdir}"/usr/share/licenses/${_pkgname}/COPYING-{evieproto,fontcacheproto,lg3dproto,printproto,xcalibrateproto,xf86rushproto}

  # cleanup
  rm -f "${pkgdir}"/usr/include/X11/extensions/apple*
  rm -f "${pkgdir}"/usr/share/licenses/${_pkgname}/COPYING-{apple,windows}wmproto
  rm -f "${pkgdir}"/usr/share/pkgconfig/applewmproto.pc
}