aboutsummaryrefslogtreecommitdiffstats
path: root/main/grep/APKBUILD
blob: 899dff048a805e744f768e6a0a7386b34e363ff1 (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
54
55
56
57
58
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=grep
pkgver=2.21
pkgrel=1
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
	CVE-2015-1345.patch
	"

_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
	aclocal && autoconf && automake --add-missing
}

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="43c48064d6409862b8a850db83c8038a  grep-2.21.tar.xz
331c938bfb346f6f09553008548dccc6  CVE-2015-1345.patch"
sha256sums="5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de  grep-2.21.tar.xz
e65dc3748044eafac90e7a0f14420b91c6ccb71d9fcbdf2a374f5b29d4bd5067  CVE-2015-1345.patch"
sha512sums="bc894325f89d37413c773d4812cb24180560037ccc8d72c015462043ef3479ea7eefd62557e3a9d191d6d94c68262563d3c68e634acd4e77ba56e96c92805dfd  grep-2.21.tar.xz
83c16cec05ca7d39ee455c3032d983cef8fe2d9cfd272ca55dbfee231a1782a69e92a8f528202e3a004b23fca27bd7fca331a019ab0a69d9cedeb5559c6dda11  CVE-2015-1345.patch"