aboutsummaryrefslogtreecommitdiffstats
path: root/community/libzip/APKBUILD
blob: 3f7ccace92033afcc53cd9fe5e321b03e7697ca2 (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
# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Contributor: Jose-Luis Rivas <ghostbar@riseup.net>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=libzip
pkgver=1.4.0
pkgrel=0
pkgdesc="A C library for reading, creating, and modifying zip archives"
url="http://www.nih.at/libzip/index.html"
arch="all"
license="BSD"
depends_dev="zlib-dev"
makedepends="$depends_dev perl cmake"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="http://www.nih.at/libzip/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   1.3.0:
#     - CVE-2017-14107

build() {
	cd "$builddir"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS"
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" -j1 install
}

tools() {
	pkgdesc="$pkgname cmp and merge tools"
	install -d "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

sha512sums="ade168e24150a7a3365813d49d6e6189248e1a5e82d73fc93936350e5be03f33357aea07d54f6560f2ea0ad1fef1ecd61c16e399b68dfb1879b0665364652feb  libzip-1.4.0.tar.gz"