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

_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 "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
}

md5sums="61db35209ce71a6d576392ce6e1d2f80  file-5.23.tar.gz"
sha256sums="2c8ab3ff143e2cdfb5ecee381752f80a79e0b4cfe9ca4cc6e1c3e5ec15e6157c  file-5.23.tar.gz"
sha512sums="30c4177819bc453854da644122ef5c1b7a9cba9b5ff6ee8e02eb889064203d75ce59cf3b08a41653e72f5567d442062fd65bb08c1670d294d36f10004ab28d5f  file-5.23.tar.gz"