aboutsummaryrefslogtreecommitdiffstats
path: root/main/file/APKBUILD
blob: fbdb5bbbb8555ab90ce3b6efa8dedfdf63078990 (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=file
pkgver=5.28
pkgrel=0
pkgdesc="File type identification utility"
url="http://www.darwinsys.com/file/"
arch="all"
license="BSD"
depends=""
subpackages="$pkgname-dev $pkgname-doc libmagic"
source="ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"

_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="3f7771424aa855f32094b49571e19b33  file-5.28.tar.gz"
sha256sums="0ecb5e146b8655d1fa84159a847ee619fc102575205a0ff9c6cc60fc5ee2e012  file-5.28.tar.gz"
sha512sums="42136505e21b14396e3af4e0d3f349687176cf0771d2dc9fed3599a30c7bab59184459f1e51033bce2d6ee0e292eba034bdfda727decca1219c1b3419e6bbfdc  file-5.28.tar.gz"