aboutsummaryrefslogtreecommitdiffstats
path: root/main/grep/APKBUILD
blob: 4d17213d3ccdd8a515fd63826c84645204a3a2d6 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=grep
pkgver=2.20
pkgrel=0
pkgdesc="Searches input files for lines containing a match to a specified pattern"
url="http://www.gnu.org/software/grep/grep.html"
arch="all"
license="GPL"
depends=
makedepends="pcre-dev"
install=
subpackages="$pkgname-doc"
source="http://mirrors.kernel.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"

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

prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null
	return 0
}

md5sums="2cbea44a4f1548aee20b9ff2d3076908  grep-2.20.tar.xz"
sha256sums="f0af452bc0d09464b6d089b6d56a0a3c16672e9ed9118fbe37b0b6aeaf069a65  grep-2.20.tar.xz"
sha512sums="97e0a92a84727eb590099ffdd44f296eff2232d1f3d508a9391e8a9976993da2b49ea80381d9b711609cb86d889a2d5903aaf2f14d79ad10b2bea1027a8a498e  grep-2.20.tar.xz"