# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=xorg-xrdb
pkgver=1.2.2
pkgrel=2
pkgdesc="X server resource database utility"
arch=('x86_64')
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('libx11' 'libxmu' 'glibc')
makedepends=('xorg-util-macros')
optdepends=('gcc: for preprocessing'
            'mcpp: a lightweight alternative for preprocessing')
groups=('xorg-apps' 'xorg')
source=(https://xorg.freedesktop.org/archive/individual/app/xrdb-${pkgver}.tar.xz{,.sig})
sha512sums=('c8a6fc94e270e9cb5602e055150553de103d545298285157ecd8924f163a10ebeb9acfff56d1fafbf48d339809c76340213792478cdf3270012d3cd05486001c'
            'SKIP')

build() {
  cd xrdb-${pkgver}
  # --with-cpp=path       comma-separated list of paths to cpp command for xrdb to use at runtime
  # mcpp is small but can fail, FS#46934
  ./configure --prefix=/usr --with-cpp=/usr/bin/cpp,/usr/bin/mcpp
  make
}

package() {
  cd xrdb-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
