# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libxpm
pkgver=3.5.17
pkgrel=1
pkgdesc="X11 pixmap library"
arch=('x86_64')
license=('custom')
url="https://xorg.freedesktop.org/"
depends=('libxt' 'libxext')
makedepends=('xorg-util-macros')
source=(${url}/releases/individual/lib/libXpm-${pkgver}.tar.xz{,.sig})
sha512sums=('52f9d2664a47a26c1a6ad65d18867de870b66947b0b0d99cca3512756a0aaa6ce2a245c0b49f20b70c3ce48bf04c47c333e8119a147465c277bca727f6ab017e'
            'SKIP')
#validpgpkeys+=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # "Peter Hutterer (Who-T) <office@who-t.net>"

build() {
  cd libXpm-${pkgver}
  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --disable-static \
    --disable-open-zfile
  make
}

check() {
  cd libXpm-${pkgver}
  # 3 test fails due to disabling compression support from 3.5.15 on
  make check || /bin/true
}

package() {
  cd libXpm-${pkgver}
  make DESTDIR="${pkgdir}" install

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