summaryrefslogtreecommitdiff
path: root/system/unzip/APKBUILD
blob: ea8f7e6faaffedca4258663e9791ea78f3926af3 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=unzip
pkgver=6.0
_pkgver=$(printf '%s' "$pkgver" | tr -d .)
_debver=25
pkgrel=4
pkgdesc="Extract PKZIP-compatible .zip files"
url="http://www.info-zip.org/UnZip.html"
arch="all"
license="Info-ZIP"
subpackages="$pkgname-doc"
# normally     ftp://ftp.info-zip.org/pub/infozip/src/$pkgname$_pkgver.zip
source="$pkgname-$pkgver.tgz::https://distfiles.adelielinux.org/source/$pkgname$_pkgver.tgz
	http://deb.debian.org/debian/pool/main/u/unzip/unzip_$pkgver-$_debver.debian.tar.xz
	"
builddir="$srcdir/$pkgname$_pkgver"

# secfixes:
#   6.0-r4:
#     - CVE-2014-8139
#     - CVE-2014-8140
#     - CVE-2014-8141
#     - CVE-2014-9636
#     - CVE-2014-9913
#     - CVE-2016-9844
#     - CVE-2018-18384
#     - CVE-2018-1000035
#     - CVE-2019-13232

prepare() {
	default_prepare
	while read -r i; do
		msg "$i"
		patch -p1 -i "../debian/patches/$i"
	done < ../debian/patches/series
}

build() {
	make -f unix/Makefile \
		CC="${CHOST}-gcc" \
		LOCAL_ZIP="${CFLAGS} ${CPPFLAGS}" \
		prefix=/usr generic
}

check() {
	make -f unix/Makefile check
}

package() {
	make -f unix/Makefile \
		MANDIR=${pkgdir}/usr/share/man/man1/ \
		prefix=${pkgdir}/usr install
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d  unzip-6.0.tgz
13c16db420fa4a34be3090a9acdd79b01320da40ac5aa89a9dfca03e64b914b28eb72aff3882d02a8197457bcb8eeb9473c998cf6920e511883c9289a949fb21  unzip_6.0-25.debian.tar.xz"