aboutsummaryrefslogtreecommitdiffstats
path: root/main/libmspack/APKBUILD
blob: 6d69fd8cd323e6e6425f03eca4446e6cc46bfd0d (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
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmspack
pkgver=0.8_alpha
_ver=${pkgver/_/}
pkgrel=0
pkgdesc="Library for CAB and related files compression and decompression"
url="https://www.cabextract.org.uk/libmspack/"
arch="all"
license="LGPL-2.0"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="https://www.cabextract.org.uk/libmspack/libmspack-$_ver.tar.gz"

_builddir="$srcdir"/libmspack-$_ver

# secfixes:
#   0.8_alpha-r0:
#     - CVE-2018-18584
#     - CVE-2018-18585
#     - CVE-2018-18586
#   0.7.1_alpha-r0:
#     - CVE-2018-14679
#     - CVE-2018-14680
#     - CVE-2018-14681
#     - CVE-2018-14682
#   0.5_alpha-r1:
#     - CVE-2017-6419
#     - CVE-2017-11423

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static \
		|| return 1
	# parallel build workaround
	make libmspack.la libmscabd.la libmschmd.la
	make
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="d178afc4d2eded204594c81af1c91be17d3be4f1a09829e08c103023aa7badc6b2595e9ec13cc7f77e3262d2cd874ed40ce6da01695c5c839682562740d2bf0a  libmspack-0.8alpha.tar.gz"