# Maintainer: Natanael Copa pkgname=patch pkgver=2.7.4 pkgrel=0 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="a9adb166010f4b39d197e8d8e77af9ca patch-2.7.4.tar.bz2 614f3d2d3e9db815f0292c774b4e09ee CVE-2015-119.patch" sha256sums="bf1c0d7db8212aa7bd4a780acd381c93e79469bf44fa4923236e306cc247a4e4 patch-2.7.4.tar.bz2 894e3ef9f731384e26164222b340bc87ada0a61fd7ed8d5d2a63f548c8153fba CVE-2015-119.patch" sha512sums="068c9f3fb968f27f8205ea76a38c521ecd3c5583307a6312683135253a5743a3231de0676420d0966410b2018d4323e2040ae43812f5182776ae2dab61e16dc5 patch-2.7.4.tar.bz2 3654605a9b52520ca3fa4ee22969a38e480937aa579c53974c50ed08877dde0d8c870e5d5765aaf430537b94c62a0304f4e9d4c78b82e87e6e09161d5411fd87 CVE-2015-119.patch"