aboutsummaryrefslogtreecommitdiffstats
path: root/main/file/APKBUILD
blob: 4d2d16063f0c7b935bb423513210fb9bc55879e3 (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.26
pkgrel=0
pkgdesc="File type identification utility"
url="http://www.darwinsys.com/file/"
arch="all"
license="BSD"
depends=""
source="ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"

subpackages="$pkgname-dev $pkgname-doc libmagic"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share \
		|| return 1
	make || return 1
	make tests || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

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

md5sums="bdd12400b90b78ce3c57e79c8d4e0e17  file-5.26.tar.gz"
sha256sums="2ef32b4ec936b0ff7b59a021dce56086a716663b6df1138c7ea597d396bf50cf  file-5.26.tar.gz"
sha512sums="e3251dde54f200b6bcade5db97fda25e73efcb2629ff5c464601c82190e12290b89eb942d820d43aa67ef37be3c0f2db00e7e5c303c083e4a8d1c49499b907dd  file-5.26.tar.gz"