# $Id: PKGBUILD 160392 2012-06-01 13:21:36Z dreisner $
# Maintainer: Thomas Bächler <thomas@archlinux.org>

pkgname=mkinitcpio-nfs-utils
pkgver=0.3
pkgrel=3
pkgdesc="ipconfig and nfsmount tools for NFS root support in mkinitcpio"
arch=('i686' 'x86_64')
url="http://www.archlinux.org/"
license=('GPL2')
depends=('glibc')
source=("ftp://ftp.archlinux.org/other/mkinitcpio/$pkgname-$pkgver.tar.xz"
        'initcpio-install-net'
        'initcpio-hook-net')
sha256sums=('d290d489844fae100ca7b848b8eef40078124ff373203086bacc07329d1e8939'
            '8e5ddaacb0e5751e432f95870958c5fa2e01e1ab3f55b5eca2b8b2d030b5d861'
            '29a5a4a9ebd61bfa1afbb8dcaf2187e487ee1f34b1979a85a853fa2acbeb510e')

build() {
  make -C "$pkgname-$pkgver"
}

package() {
  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install

  # override hooks, they need updates
  install -m644 "$srcdir/initcpio-install-net" "$pkgdir/usr/lib/initcpio/install/net"
  install -m644 "$srcdir/initcpio-hook-net" "$pkgdir/usr/lib/initcpio/hooks/net"
}