summaryrefslogtreecommitdiff
path: root/extra/libxkbcommon/PKGBUILD
blob: 2ee318e8c2fb7f34755fd225fd248b91fd4899dc (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
# $Id: PKGBUILD 204980 2014-02-02 18:43:24Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: Mladen Pejakovic <pejakm@gmail.com>

pkgbase=libxkbcommon
pkgname=(libxkbcommon libxkbcommon-x11)
pkgver=0.4.0
pkgrel=1
pkgdesc="Keyboard handling library using XKB data"
arch=(i686 x86_64)
url="http://xkbcommon.org/"
license=(custom)
depends=(xkeyboard-config glibc)
makedepends=(libxcb doxygen xorg-util-macros)
source=("http://xkbcommon.org/download/$pkgname-$pkgver.tar.xz")
md5sums=('bb782f1700e45b4f57c84ef513e3cf85')

prepare() {
  mkdir -p x11/usr/{include/xkbcommon,lib/pkgconfig}
}

build() {
  cd $pkgbase-$pkgver
  ./configure --prefix=/usr --disable-static
  make
}

package_libxkbcommon() {
  cd $pkgbase-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/libxkbcommon/LICENSE"

### Split libxkbcommon-x11

  mv "$pkgdir"/usr/lib/*x11* "$srcdir/x11/usr/lib"
  mv "$pkgdir"/usr/lib/pkgconfig/*x11* "$srcdir/x11/usr/lib/pkgconfig"
  mv "$pkgdir"/usr/include/xkbcommon/*x11* "$srcdir/x11/usr/include/xkbcommon"
}

package_libxkbcommon-x11() {
  pkgdesc="Keyboard handling library using XKB data for X11 XCB clients"
  depends=(libxkbcommon libxcb)

  mv x11/* "$pkgdir"

  install -Dm644 $pkgbase-$pkgver/COPYING "$pkgdir/usr/share/licenses/libxkbcommon-x11/LICENSE"
}