aboutsummaryrefslogtreecommitdiffstats
path: root/community/libzip/APKBUILD
blob: 0b6ba42626d3b4bd37de7139acfb0298b5e41816 (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
# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Contributor: Jose-Luis Rivas <ghostbar@riseup.net>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=libzip
pkgver=1.5.2
pkgrel=0
pkgdesc="C library for manipulating zip archives"
url="http://www.nih.at/libzip/index.html"
arch="all"
license="BSD-3-Clause"
depends_dev="zlib-dev"
makedepends="$depends_dev cmake openssl-dev perl"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://www.nih.at/libzip/$pkgname-$pkgver.tar.xz
	build-static-and-dynamic.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

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

build() {
	cd "$builddir"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-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="1e6d48ddbac4d270f70b314f6ada3c93a3196a8cc3b8d17c6cf5ea8409ff29f36ac351206675f9d81351fcf633b0c15d7b0b5530c30c4140e4fe55e64c602643  libzip-1.5.2.tar.xz
09b31e42e732b3d0e7705c90fa0b3afa5a2d2eaa8dfde4ab24d728158d805dc4e8c803f184b6eb69711f4975a220528578a4d78d88713b4ce405d3892be11fa9  build-static-and-dynamic.patch"