summaryrefslogtreecommitdiff
path: root/user/libzip/APKBUILD
blob: 62a55bfba82b8619f65a1c751d5a812772ec1a29 (plain) (blame)
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
# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Contributor: Jose-Luis Rivas <ghostbar@riseup.net>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=libzip
pkgver=1.6.1
pkgrel=0
pkgdesc="C library for manipulating ZIP archives"
url="https://libzip.org/"
arch="all"
license="BSD-3-Clause"
depends=""
depends_dev="zlib-dev"
makedepends="$depends_dev cmake groff openssl-dev perl"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://libzip.org/download/$pkgname-$pkgver.tar.xz"

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

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

check() {
	make check
}

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

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

sha512sums="dcf3790933c95f66bdcbdb276497b36e57776103b0b1064a94479e84eaa0a09df8dd91509cb4ccab3a6724f0650f076ca1e332d73acc94b653e99a3e94a64574  libzip-1.6.1.tar.xz"