summaryrefslogtreecommitdiffstats
path: root/main/grep/APKBUILD
blob: 450a68b80086d6a5aea6a238ef5b4e9ff03d8cbf (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.18
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="7439f8266f50844b56cc3e2721606541  grep-2.18.tar.xz"
sha256sums="e6436e5077fa1497feccc8feaabd3f507b172369bf120fbc9e4874bba81be720  grep-2.18.tar.xz"
sha512sums="2d0e6cf9dc47a49d72ecb3e2c3b7bd8dd4d9cdef7bcec002af2c41e6cc57c26520b115188477ba7bfdf7c67fea86d1105450227f9df2900aac16ea6bb7783263  grep-2.18.tar.xz"