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

_pkgname=libxmu
pkgname=static-compat-$_pkgname
pkgver=1.1.3
pkgrel=2
pkgdesc="X11 miscellaneous micro-utility library"
arch=('x86_64')
url="https://xorg.freedesktop.org/"
depends=('static-compat-libxext' 'static-compat-libxt')
makedepends=('static-compat-configure' 'static-compat-xorgproto')
options=(staticlibs !emptydirs)
license=('custom')
source=("${url}/releases/individual/lib/libXmu-${pkgver}.tar.bz2")
sha512sums=('8c6cc65b22aa031ad870dd92736681a068a0878a425a53dbed909943da1136c4a24034d467cfd3785c3a8d78f66850b69f1ebe1eb24aaf9bc176b1d171a5c762')

build() {
  source static-compat-environment
  cd libXmu-${pkgver}
  static-compat-configure --disable-shared --enable-static
  make
}

package() {
  source static-compat-environment
  cd libXmu-${pkgver}
  make DESTDIR="${pkgdir}" install
  rm -r "$pkgdir/$static_compat_prefix"/share/doc

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