summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0aaeaaf7226ba9c6173ccb6d978c2eddfc2a95bf (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
pkgname=dnf-plugins-core
_pkgver=0.1.17
_rpmrel=1
pkgver=$_pkgver.$_rpmrel
pkgrel=1
pkgdesc="Core DNF Plugins"
arch=('any')
url="https://github.com/rpm-software-management/$pkgname"
license=('GPL2')
depends=('dnf' 'python')
makedepends=('cmake' 'python-sphinx')
checkdepends=('python-nose')
options=(!emptydirs)
source=("$url/archive/$pkgname-$_pkgver-$_rpmrel.tar.gz")
md5sums=('1d9318f815941562a89b623235419d0a')

prepare() {
	mv "$pkgname-$pkgname-$_pkgver-$_rpmrel" "$pkgname-$pkgver"

	cd "$pkgname-$pkgver"
	rm -rf build
	mkdir build
}

build() {
	cd "$pkgname-$pkgver"/build
	cmake -DCMAKE_BUILD_TYPE=Release  \
	      -DCMAKE_INSTALL_PREFIX=/usr \
	      -DPYTHON_DESIRED=3          \
	      ..
	make
	# sphinx-build fails with non UTF-8 locales
	make LC_ALL=en_US.UTF-8 doc-man
}

check() {
	cd "$pkgname-$pkgver"
	PYTHONPATH=./plugins nosetests -s tests
}

package() {
	cd "$pkgname-$pkgver"/build
	make DESTDIR="$pkgdir/" install

	install -D -m644 ../README.rst "$pkgdir/usr/share/doc/$pkgname/README.rst"
}

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