aboutsummaryrefslogtreecommitdiffstats
path: root/main/file/APKBUILD
blob: ad6680b83241dc41694225401776ae7f497fabc4 (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=file
pkgver=5.32
pkgrel=1
pkgdesc="File type identification utility"
url="http://www.darwinsys.com/file/"
arch="all"
license="BSD"
subpackages="$pkgname-dev $pkgname-doc libmagic"
source="ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz
	CVE-2019-8906.patch
	CVE-2019-8905-and-CVE-2019-8907.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   5.32-r1:
#     - CVE-2019-8905
#     - CVE-2019-8906
#     - CVE-2019-8907

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share
	make
}

check() {
	cd "$builddir"
	make check
}

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

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

sha512sums="315343229fa196335389544ee8010e9e80995ef4721938492dedcfb0465dfc45e1feb96f26dfe53cab484fb5d9bac54d2d72917fbfd28a1d998c6ad8c8f9792f  file-5.32.tar.gz
f54a16dbca2b5a490405e323924fb2657cc67f73648ad5203b41c13da1dc98e5ca64fc6c94415386538d3c2124f487fc3bf86082ce1571a24d05f5a5e213da08  CVE-2019-8906.patch
5b8058fd39d9f9d91c7d8377708068dc0161abdbbb7fdb3d1bd9358b297133e425252758b45cccec937a7c51226d4f6dd67f5a13ff935a4353a44f140f011a7e  CVE-2019-8905-and-CVE-2019-8907.patch"