aboutsummaryrefslogtreecommitdiffstats
path: root/main/patch/APKBUILD
blob: bf00399d501a321edca48a970cdb9c50784488b7 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=patch
pkgver=2.7.1
pkgrel=1
pkgdesc="Utility to apply diffs to files"
url="http://www.gnu.org/software/patch/patch.html"
arch="all"
license='GPL'
depends=
source="ftp://ftp.gnu.org/gnu/patch/patch-$pkgver.tar.bz2
	CVE-2015-119.patch"
subpackages="$pkgname-doc"
install=

_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 \
		--mandir=/usr/share/man \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null
	return 0
}

md5sums="0881a7c6477862fc395f373ada0ec6b6  patch-2.7.1.tar.bz2
614f3d2d3e9db815f0292c774b4e09ee  CVE-2015-119.patch"
sha256sums="aae676de9e95051f425af4507fcc9a019941a2a1f78405e7dbd40bccf786aa11  patch-2.7.1.tar.bz2
894e3ef9f731384e26164222b340bc87ada0a61fd7ed8d5d2a63f548c8153fba  CVE-2015-119.patch"
sha512sums="b9411f1d7bb55151e6fa3b44bbbb73e025be8e87fad73b0c39b27d9b6467c7633c17fe772f6727c2be8779706d612ddb29ba6f94ed7c3d43e8327372940a9d03  patch-2.7.1.tar.bz2
3654605a9b52520ca3fa4ee22969a38e480937aa579c53974c50ed08877dde0d8c870e5d5765aaf430537b94c62a0304f4e9d4c78b82e87e6e09161d5411fd87  CVE-2015-119.patch"