# $Id: PKGBUILD 199518 2013-11-13 23:06:31Z thomas $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>

pkgname=linux-manpages
pkgver=3.12
pkgrel=1
pkgdesc="Kernel hackers manual - Section 9 manpages that comes with the Linux kernel."
arch=('any')
url="http://www.kernel.org"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
replaces=('kernel26-manpages')
conflicts=('kernel26-manpages')
provides=('kernel26-manpages')
source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-${pkgver}.tar.xz")
sha256sums=('2e120ec7fde19fa51dc6b6cc11c81860a0775defcad5a5bf910ed9a50e845a02')

build() {
  cd "${srcdir}/linux-$pkgver"
  make mandocs
}

package() {
  install -d "${pkgdir}/usr/share/man/man9/"
  install "${srcdir}"/linux-$pkgver/Documentation/DocBook/man/*.9.gz \
    "${pkgdir}/usr/share/man/man9/"

  find "${pkgdir}" -type f -exec chmod 644 {} \;
}
