aboutsummaryrefslogtreecommitdiffstats
path: root/main/libarchive/APKBUILD
blob: 8893ac00de10de485969c9215c462220f7ef26af (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libarchive
pkgver=3.2.2
pkgrel=0
pkgdesc="library that can create and read several streaming archive formats"
url="http://libarchive.googlecode.com/"
arch="all"
license="BSD"
depends=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
makedepends="zlib-dev bzip2-dev xz-dev acl-dev openssl-dev expat-dev"
depends_dev="$makedepends"
source="http://www.libarchive.org/downloads/libarchive-$pkgver.tar.gz
	CVE-2017-5601.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver

# security fixes:
#  3.1.2-r4:
#    - CVE-2016-4302
#    - CVE-2016-4809
#    - CVE-2016-5844
#    - CVE-2016-6250
#  3.2.1-r0:
#    - CVE-2016-5418
#    - CVE-2016-7166
#  3.2.2-r0:
#    - CVE-2017-5601

prepare() {
	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 \
		--without-xml2 \
		|| return 1
	make
}

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

tools() {
	pkgdesc="libarchive tools bsdtar and bsdcpio"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

md5sums="1ec00b7dcaf969dd2a5712f85f23c764  libarchive-3.2.2.tar.gz
f9bf727dad55bc4c639e4fe12c456d8f  CVE-2017-5601.patch"
sha256sums="691c194ee132d1f0f7a42541f091db811bc2e56f7107e9121be2bc8c04f1060f  libarchive-3.2.2.tar.gz
300c119e85a49615e2ed34521de77fa8202d1db39bb861998b3e71148c1adcdc  CVE-2017-5601.patch"
sha512sums="a67920c37d49cf9478032d77fc4fa21827cebb96e9b83d9ecb8466328834052e4ab3d3a9bc4e2edf405d6cb14ffd648c9fa100b578257f6e5842c99bbea558a7  libarchive-3.2.2.tar.gz
a00839e72fa7ccbdbde4b8b5a8e04f96d6eabcaa2d0150393c8273e4855b09d18cbec6fb1e4551d0d1bbc0439e1f41d5341539a0de8a97f821a5281a7bac8494  CVE-2017-5601.patch"