archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / libcomps / trunk / PKGBUILD
blob9dafea614b736473560c451c0f5d89d62f9dcafe
1 # Contributor: larchunix
2 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
4 pkgname=libcomps
5 pkgver=0.1.19
6 pkgrel=2
7 pkgdesc="Comps XML file manipulation library"
8 arch=('x86_64')
9 url="https://github.com/rpm-software-management/$pkgname"
10 license=('GPL2')
11 depends=('expat' 'libxml2' 'zlib')
12 makedepends=('cmake' 'python' 'python-setuptools' 'doxygen' 'python-sphinx')
13 checkdepends=('check')
14 optdepends=('python: for python bindings')
15 source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
16 sha256sums=('19433751eecf5ceee4b85c9244496d9d32af78af6fc17db697b39501f8308f94')
18 build() {
19   cd "$pkgname-$pkgver"
21   cmake -B build -S libcomps \
22         -DCMAKE_BUILD_TYPE=None \
23         -DCMAKE_C_FLAGS_RELEASE='-DNDEBUG' \
24         -DCMAKE_INSTALL_PREFIX=/usr \
25         -DCMAKE_INSTALL_LIBDIR=lib \
26         -Wno-dev
28   make -C build
30   make -C build docs
31   make -C build pydocs
34 check() {
35   cd "$pkgname-$pkgver"
37   make -C build test
38   make -C build pytest
41 package() {
42   cd "$pkgname-$pkgver"
44   make -C build DESTDIR="$pkgdir/" install
46   mkdir -p "$pkgdir/usr/share/doc/$pkgname"/{doxygen,sphinx}
47   cp -Rp build/docs/libcomps-doc/html/ "$pkgdir/usr/share/doc/$pkgname/doxygen/"
48   rm -r build/src/python/docs/html/.doctrees
49   cp -Rp build/src/python/docs/html/   "$pkgdir/usr/share/doc/$pkgname/sphinx/"
51   install -Dp -m644 README.md  "$pkgdir/usr/share/doc/$pkgname/README.md"