aboutsummaryrefslogtreecommitdiffstats
path: root/main/file/APKBUILD
blob: d1b7fbbcca90868b2f8dfdaf2c8f65f8bc8d1f2d (plain)
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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=file
pkgver=5.37
pkgrel=1
pkgdesc="File type identification utility"
url="https://www.darwinsys.com/file"
arch="all"
license="BSD-2-Clause"
makedepends="autoconf libtool automake"
subpackages="$pkgname-dev $pkgname-doc libmagic"
source="$pkgname-$pkgver.tar.gz::https://github.com/file/file/archive/FILE${pkgver/./_}.tar.gz
	CVE-2019-18218.patch
	"
builddir="$srcdir/$pkgname-FILE${pkgver/./_}"

# secfixes:
#   5.37-r1:
#     - CVE-2019-19218
#   5.36-r0:
#     - CVE-2019-1543
#     - CVE-2019-8904
#     - CVE-2019-8905
#     - CVE-2019-8906
#     - CVE-2019-8907

build() {
	SH_LIBTOOL='/usr/share/build-1/libtool' autoreconf -f -i
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share
	make
}

check() {
	make check
}

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

libmagic() {
	pkgdesc="File type identification library"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr
}

sha512sums="9b6ae3dd910a03d2161c91ebc75ac91eb7dbd279563462b77daf902d9ae9f0a70de12c37a498b20c6357d6594059d01841bfd104592107b65c08d8343fca19d2  file-5.37.tar.gz
d70c5d298db7f70c45feaeebb077f076e6f1b5bcccb85926afeead64838436fd42681541d56f4fbe35b97dd76bfdbf3abf2665894c18999b37d2ca3fe2f2cf17  CVE-2019-18218.patch"