aboutsummaryrefslogtreecommitdiffstats
path: root/main/grep/APKBUILD
blob: b7d15c29cc5cf7d32df11d0e71a796a23eeff377 (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
53
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=grep
pkgver=2.22
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 autoconf automake"
install=
subpackages="$pkgname-doc"
source="http://mirrors.kernel.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
	"

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

prepare() {
	cd "$_builddir"
	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 \
		--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="e1015e951a49a82b02e38891026ef5df  grep-2.22.tar.xz"
sha256sums="ca91d22f017bfcb503d4bc3b44295491c89a33a3df0c3d8b8614f2d3831836eb  grep-2.22.tar.xz"
sha512sums="c0756e4aa360cc29b3123384eef654743df108cc606372142c79893a09a0c8053b03d048768e972221e0ed96f378b8564f848f9acc180fca499f0494fbe9113c  grep-2.22.tar.xz"