summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24b46c048e1cede205489c3a94cc3dad177af86c (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
pkgname=drpm
pkgver=0.4.0
pkgrel=1
pkgdesc="A small library for fetching information from deltarpm packages"
arch=('i686' 'x86_64')
url="https://github.com/rpm-software-management/$pkgname"
license=('custom:BSD' 'LGPL3')
depends=('bzip2' 'openssl' 'rpm-org' 'xz' 'zlib' 'zstd')
makedepends=('cmake>=2.8.5' 'doxygen')
checkdepends=('cmocka')
source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
md5sums=('346bd89eba41d23713fa49f546453796')

prepare() {
	cd "$pkgname-$pkgver"
	rm -rf build
	mkdir build
}

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

	cmake -DCMAKE_BUILD_TYPE=Release \
	      -DCMAKE_C_FLAGS="$CFLAGS $CPPFLAGS" \
	      -DCMAKE_INSTALL_PREFIX=/usr \
	      -DCMAKE_INSTALL_LIBDIR=lib \
	      -DWITH_ZSTD=ON \
	      ..

	make
	make doc
}

check() {
	cd "$pkgname-$pkgver"/build
	make ARGS="-V" test
}

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

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	cp -Rp doc/html "$pkgdir"/usr/share/doc/$pkgname/html

	install -Dp -m644 ../LICENSE.BSD "$pkgdir/usr/share/licenses/$pkgname/LICENSE.BSD"
}

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