archrelease: copy trunk to community-any
[ArchLinux/community.git] / libdnf / trunk / PKGBUILD
blob6b39246e2c292283b265b7fab17c9b8cd67c0eeb
1 # Contributor: larchunix
2 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
4 pkgname=libdnf
5 pkgver=0.70.0
6 pkgrel=2
7 pkgdesc="Library providing simplified C and Python API to libsolv"
8 arch=('x86_64')
9 url="https://github.com/rpm-software-management/$pkgname"
10 license=('GPL')
11 depends=('glib2' 'gpgme' 'json-c' 'libmodulemd' 'librepo' 'libsolv'
12          'libutil-linux' 'openssl' 'rpm-tools' 'sqlite' 'zlib')
13 makedepends=('cmake' 'gtk-doc' 'python' 'python-sphinx' 'swig')
14 checkdepends=('check' 'cppunit')
15 optdepends=('python: for python bindings')
16 source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
17 sha256sums=('9934b94ad2df81d00f1bb22803130d16b9327888b7de4cd446efadd9e8c47e5f')
19 prepare() {
20   cd "$pkgname-$pkgver"
21   # TODO: libsolv installs cmake in something where libdnf can't find it
22   cp -p /usr/share/cmake/Modules/FindLibSolv.cmake cmake/modules/
25 build() {
26   cd "$pkgname-$pkgver"
28   cmake -B build \
29         -DCMAKE_BUILD_TYPE=None \
30         -DCMAKE_C_FLAGS_RELEASE='-DNDEBUG' \
31         -DCMAKE_CXX_FLAGS_RELEASE='-DNDEBUG' \
32         -DCMAKE_INSTALL_PREFIX=/usr \
33         -DCMAKE_INSTALL_LIBDIR=lib \
34         -DPYTHON_DESIRED=3 \
35         -DWITH_ZCHUNK=OFF \
36         -Wno-dev
38   make -C build VERBOSE=1
41 check() {
42   cd "$pkgname-$pkgver"
43   # tests fail
44   # (/build/libdnf/src/libdnf-0.65.0/build/tests/libdnf/test_libdnf_main:5860): libdnf-WARNING **: 12:55:05.175: Can't read plugin directory "/usr/lib/libdnf/plugins/": No such file or directory
45   # error: cannot open Packages database in /var/lib/rpm
46   # make -C build test ARGS="--output-on-failure"
49 package() {
50   cd "$pkgname-$pkgver"
52   make -C build DESTDIR="$pkgdir/" install
54   install -Dp -m644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"