aboutsummaryrefslogtreecommitdiffstats
path: root/main/grep/APKBUILD
blob: 5a9886836756e00de4f3518c410d5695ab98ab28 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=grep
pkgver=3.2
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+"
makedepends="pcre-dev autoconf automake"
checkdepends="coreutils bash diffutils"
subpackages="$pkgname-doc"
source="https://mirrors.kernel.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
	fix-tests.patch"
builddir="$srcdir/$pkgname-$pkgver"
# 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() {
	cd "$builddir"
	./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() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

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

sha512sums="8d12417abe400ef83e2df41e74e937b15c86d84cf2c6288d43264d4497d3f047b7017f907944f04bfc6ebe9c17aff50adbd1945a95a8920b6ef660891df07aa6  grep-3.2.tar.xz
9ba6b01c0c74933299afb469dadd2ea0c7e24befa34c691671a576063e32a1f0c735541e5e2bb0073d8afd814790909f7f895827aa8a2fbacdfcae380a7bcb11  fix-tests.patch"