Name grep
Description Searches input files for lines containing a match to a specified pattern
Version 3.12-r0
Package Base grep
Homepage https://www.gnu.org/software/grep/grep.html
Maintainers ['Natanael Copa <ncopa@alpinelinux.org>']
Contributors ['Michael Mason <ms13sp@gmail.com>']
Distro-repo https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/main/grep
Sources ['https://mirrors.kernel.org/gnu/grep/grep-3.12-r0.tar.xz']
Dependencies ['libc.musl-x86_64.so.1', 'libpcre2-8.so.0']
Optional-Dependencies []
Build-Dependencies ['pcre2-dev', 'autoconf', 'automake']
Provides ['cmd:egrep=3.12-r0', 'cmd:fgrep=3.12-r0', 'cmd:grep=3.12-r0']
Builddate 12-04-2025 17:00:10
Architecture x86_64
Distro-Version v3.22
Licenses ['GPL-3.0-or-later']
Hash Q1Edqnqi7o6yXbrjKPX95ohSLwr0E=
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=grep
pkgver=3.12
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="pcre2-dev autoconf automake"
checkdepends="coreutils bash diffutils"
subpackages="$pkgname-doc"
source="https://mirrors.kernel.org/gnu/grep/grep-$pkgver.tar.xz"

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

check() {
	make check || {
		cat tests/test-suite.log
	}
}

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

sha512sums="
c54b4db5a8b9afe098c088decd94977746305284d716666a60bac82b4edc0fae4acf828970b5b6fc7d58ecd549f638e17e6958f33a71fedcc7d7415b9228b161  grep-3.12.tar.xz
"