aboutsummaryrefslogtreecommitdiffstats
path: root/main/grep/APKBUILD
blob: ab0a5ee44ea96d5eea08efdb8ee8e3ca35368877 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=grep
pkgver=3.6
pkgrel=0
pkgdesc="Searches input files for lines containing a match to a specified pattern"
url="https://www.gnu.org/software/grep/grep.html"
arch="all"
license="GPL-3.0-or-later"
makedepends="pcre-dev autoconf automake"
checkdepends="coreutils bash diffutils"
subpackages="$pkgname-doc"
source="https://mirrors.kernel.org/gnu/grep/grep-$pkgver.tar.xz
	fix-tests.patch"
# for whatever reason, all the builders locked up in the testsuite.  investigate later.
options="!check"

prepare() {
	default_prepare
	sed -i '/test-localename$(EXEEXT)/d' \
		"$builddir"/gnulib-tests/Makefile.in
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--bindir=/bin \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls
	make
}

check() {
	make -C "$builddir" check
}

package() {
	make DESTDIR="$pkgdir" install

	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
}

sha512sums="8934544a19ded61344d83ff2cab501e86f17f8ae338892e0c36c2d2d8e63c76817840a0071ef5e3fcbca9115eba8a1aae0e4c46b024e75cd9a2e3bd05f933d90  grep-3.6.tar.xz
9ba6b01c0c74933299afb469dadd2ea0c7e24befa34c691671a576063e32a1f0c735541e5e2bb0073d8afd814790909f7f895827aa8a2fbacdfcae380a7bcb11  fix-tests.patch"