summaryrefslogtreecommitdiff
path: root/system/libarchive/APKBUILD
blob: 18fae33b9bf8c0dde991c7ba32c9f8b08156d9fc (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
69
70
71
72
# Contributor: Sergey Lukin <sergej.lukin@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libarchive
pkgver=3.6.2
pkgrel=1
pkgdesc="Multi-format archive and compression library"
url="https://www.libarchive.org/"
arch="all"
license="BSD-2-Clause AND BSD-3-Clause AND Public-Domain"
depends=""
makedepends="zlib-dev bzip2-dev xz-dev lz4-dev acl-dev openssl-dev expat-dev
	attr-dev zstd-dev autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://github.com/libarchive/libarchive/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
	disable-locale-tests.patch
	disable-unaligned-access-arm32-xxhash.patch
	revert-autotools-Fix-static-linking-when-openssl-is-.patch
	"

# secfixes:
#   3.6.2-r0:
#     - CVE-2022-36227
#   3.6.1-r0:
#     - CVE-2022-26280
#   3.4.2-r0:
#     - CVE-2020-9308
#   3.3.2-r1:
#     - CVE-2017-14166

prepare() {
	default_prepare
	autoreconf -i
}

build () {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-expat \
		--without-xml2 \
		--with-bz2lib \
		--with-zlib \
		--with-lzma \
		--with-lz4 \
		--enable-acl \
		--enable-xattr \
		ac_cv_header_linux_fiemap_h=no
	make
}

check() {
	make check
}

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

tools() {
	pkgdesc="libarchive tools - bsdtar and bsdcpio"

	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
	ln -s bsdtar "$subpkgdir"/usr/bin/tar
	ln -s bsdcpio "$subpkgdir"/usr/bin/cpio
}

sha512sums="24e476465054a29a2d48adf3c197a171b5361fa5038729a1f14d578c6701424de4e5dd6a2b20a6b697969ab43bdd8afc1585f8de0465c266f455d7eaa19e5048  libarchive-3.6.2.tar.gz
27cf2aaa3e70e3a2a9944fac0c96c411e669c7e1a48daad1423bff68eef0f49153e5ef9d22dc9591a65353119d7fe203a28258ab82278aeb86b46fe691bcfb6a  disable-locale-tests.patch
56a2b13b6cd7b127c04ac50ebf49994ec91ff2467d5d0f32b8428bd4df82b167459d4630dee5d1b5119f70b04ea6fe4411d44b768e0f313fa302c9e5fe51b7cd  disable-unaligned-access-arm32-xxhash.patch
1b69d47d900d658622de7a621056f8abeacaf6ad4871a2d326fc925d76f7fe8ae15b16d16979fb8c62e429e231e13a97a89e8d064b3ed2b53b1399722207e1ab  revert-autotools-Fix-static-linking-when-openssl-is-.patch"