aboutsummaryrefslogtreecommitdiffstats
path: root/main/libarchive/APKBUILD
blob: 51f8ffabc759d324e6ca7146fcfeb9e88547e89f (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libarchive
pkgver=3.0.2
pkgrel=1
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-2013-0211.patch"

_builddir="$srcdir"/$pkgname-$pkgver
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 --prefix=/usr --without-xml2
	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="4df33cb107c9702c80473e0794ddf833  libarchive-3.0.2.tar.gz
fc5f5158d414e3a7e9f085d8d1470014  CVE-2013-0211.patch"