summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f48dd01c8f00b5b41d7f474378727c99d222dd51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Contributor: Sam Day <me@samcday.com>

pkgname=dnf5
pkgver=5.2.4.0
pkgrel=1
pkgdesc="Next-generation RPM package management system"
arch=('x86_64')
url="https://github.com/rpm-software-management/$pkgname"
license=('GPL-2.0-or-later' 'LGPL-2.1-or-later')
conflicts=('dnf')
depends=('curl>=7.62.0' 'fmt' 'glib2>=2.46.0' 'json-c' 'libmodulemd>=2.11.2'
         'librepo>=1.17.1' 'libsolv>=0.7.25' 'libxml2' 'rpm-tools>=4.17.0'
         'sdbus-cpp>=0.9.0' 'sqlite>=3.35.0' 'systemd-libs' 'util-linux-libs')
makedepends=('bash-completion' 'cmake>=3.13' 'doxygen' 'gettext' 'perl'
             'python' 'python-breathe' 'python-sphinx' 'python-sphinx_rtd_theme'
             'toml11' 'swig' 'systemd')
checkdepends=('cppunit' 'createrepo_c' 'perl-test-exception')
optdepends=('perl: for perl bindings'
            'polkit: for dnf5daemon-server'
            'python: for python bindings')
backup=('etc/dnf/dnf.conf'
        'etc/dnf/libdnf5-plugins/actions.conf')
options=('!emptydirs')
source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('c6e83f9721f1b711262a50b25434b160f0e904bc006347d36fd37f1f50f10505')

build() {
	cd "$pkgname-$pkgver"

	cmake -B build \
	      -DCMAKE_INSTALL_PREFIX='/usr' \
	      -DCMAKE_INSTALL_SBINDIR='bin' \
	      -DWITH_RUBY='OFF'  # https://github.com/rpm-software-management/dnf5/issues/562

	cmake --build build
	cmake --build build --target doc-man
}

check() {
	cd "$pkgname-$pkgver"

	LC_ALL=C.UTF-8 ctest --test-dir build --output-on-failure
}

package() {
	cd "$pkgname-$pkgver"

	DESTDIR="$pkgdir" cmake --install build

	install -Dp -m644 COPYING.md "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

# vim: set ft=sh ts=4 sw=4 noet: