Commit c7ac0015 authored by Sören Tempel's avatar Sören Tempel

main/patch: rebuild to fix install_if rule for -doc subpackage

Since abuild version 2.24.0 the install_if variable for the default
subpackage was modified to automatically pull in -doc subpackages when
the package 'docs' is installed.

While we are here also do some tiny cleanups.
parent f5a3a019
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=patch
pkgver=2.7.5
pkgrel=0
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.xz"
license="GPL"
depends=""
depends_dev=""
makedepends=""
install=""
subpackages="$pkgname-doc"
install=
source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"
_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 \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--disable-nls \
|| 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
make prefix="$pkgdir"/usr \
mandir="$pkgdir"/usr/share/man \
-C "$_builddir" install || return 1
rm -f "$pkgdir"/usr/lib/charset.alias
rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
}
md5sums="e3da7940431633fb65a01b91d3b7a27a patch-2.7.5.tar.xz"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment