summaryrefslogtreecommitdiff
path: root/system/unzip/APKBUILD
blob: 88c0b76b3f58a59c9ab76e4b24fdd368c67ed1e3 (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
# 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=26
pkgrel=6
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
# find timestamp here: https://snapshot.debian.org/package/unzip/
source="$pkgname-$pkgver.tgz::https://distfiles.adelielinux.org/source/$pkgname$_pkgver.tgz
	https://snapshot.debian.org/archive/debian-debug/20210110T204103Z/pool/main/u/${pkgname}/${pkgname}_${pkgver}-${_debver}.debian.tar.xz
	cflags.patch
	format-secure.patch
	unzipsfx-bomb-32bit.patch
	"
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() {
	cd "$builddir"
	while read -r i; do
		msg "$i"
		patch -p1 -i "../debian/patches/$i"
	done < ../debian/patches/series
	default_prepare
}

build() {
	make -f unix/Makefile \
		CC="${CHOST}-gcc" \
		LOCAL_UNZIP="${CFLAGS} ${CPPFLAGS}" \
		STRIP=: \
		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
9a56e400ad0984f87c7ee0548429349be549e35a3cae4c9acb88a8fb97a1d1fbd116cfa3292622ad8b2c67ffe79ae268861ddec1269993ba98f1a6a411b7611f  unzip_6.0-26.debian.tar.xz
029447a48972234e60c6b45c58b01dbe411594b1ffe0db00d028810b0bcfa7244dcc89f765e1ee6e8805ba2d2db9bc1d05a1e30ef0d9dd08d33ff6f04af811ab  cflags.patch
4bdf55937a181d496261a8f426a97d63844ba96f23beea7906c5e4f7064f55c188ee5ec3ae2d6f2011b5f26b6ac0941dcffb83c06370ed9648b2262917cde64d  format-secure.patch
81777dfa1ad707046b238fa9205f8be0f48363f0f23bc0d2d83b67b143ceeba6818cc11058355195a03432cdd6ed4f392202ff3029e14d4b1435c9e2cb5ca6bf  unzipsfx-bomb-32bit.patch"