# $Id: PKGBUILD 228947 2015-01-12 18:46:21Z anatolik $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>

pkgname=linux-manpages
pkgver=3.18
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=("https://www.kernel.org/pub/linux/kernel/v3.x/linux-${pkgver}.tar.xz")
sha256sums=('becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd')

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 {} \;
}
