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

_pkgname=libxmu
pkgname=static-compat-$_pkgname
pkgver=1.1.4
pkgrel=1
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}"/archive/individual/lib/libXmu-${pkgver}.tar.xz{,.sig})
sha512sums=('3cf90cb3ff380aafefbb39297bdd95b9e1e6d6618cecb53ff09faf38f9b9c54599d28367f07a9ec77a20214c6c3e661b8d0a12b38082556790a79a59942039c1'
            'SKIP')
validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # "Alan Coopersmith <alan.coopersmith@oracle.com>"

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}/"
}
