# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

_pkgname=xtrans
pkgname=static-compat-$_pkgname
pkgver=1.4.0
pkgrel=2
pkgdesc="X transport library"
arch=('any')
license=('custom')
url="https://xorg.freedesktop.org/"
makedepends=(static-compat-configure)
options=(!emptydirs)
source=(${url}/releases/individual/lib/${_pkgname}-${pkgver}.tar.bz2{,.sig})
sha512sums=('4fea89a3455c0e13321cbefa43340016dbb59bdd0dbdb5b796c1a6d2a6b1fd63cf1327b769ab426286b9c54b32ec764a50cd2b46228e4e43b841bda6b94de214'
            'SKIP')
validpgpkeys=('C383B778255613DFDB409D91DB221A6900000011') #  "Keith Packard <keithp@keithp.com>"
validpgpkeys+=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith <alan.coopersmith@oracle.com>

build() {
  source static-compat-environment
  cd ${_pkgname}-${pkgver}
  static-compat-configure
}

package() {
  source static-compat-environment
  cd ${_pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"

  install -m755 -d "${pkgdir}/$static_compat_prefix/lib"
  mv "${pkgdir}/$static_compat_prefix/share/pkgconfig" "${pkgdir}/$static_compat_prefix/lib/pkgconfig"
}
