core/mdadm/PKGBUILD
Jan Mette e339b8e300
2010-04-04 14:20:41 +00:00

50 lines
1.7 KiB
Bash

# $Id: PKGBUILD 72624 2010-03-18 23:00:10Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
pkgname=mdadm
pkgver=3.1.2
pkgrel=2
pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
arch=(i686 x86_64)
license=('GPL')
url="http://www.cse.unsw.edu.au/~neilb/source/mdadm/"
groups=('base')
conflicts=('mkinitcpio<0.5.99')
depends=('glibc')
backup=('etc/mdadm.conf')
source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
mdadm
mdadm.conf
mdadm_install
mdadm_hook
mdadm-3.1.2-mapfile.patch
mdadm-3.1.2-fix-udev.patch)
install=mdadm.install
replaces=('raidtools')
md5sums=('c5a39f38c465229767a5af2a4eb81bef'
'6df172c8f77b280018cf87eb3d313f29'
'00cbed931db4f15b6ce49e3e7d433966'
'865c3d39e5f5dae58388160b563981f1'
'1a3eb63832cecd6550f5b0a21d58cfdb'
'b8e4f97a0045c958202758a88a822331'
'5251b6a53992308cad199a4ea1e19420')
build() {
cd $srcdir/$pkgname-$pkgver
# fix udev hang
patch -Np1 -i ../mdadm-3.1.2-mapfile.patch || return 1
patch -Np0 -i ../mdadm-3.1.2-fix-udev.patch || return 1
make || return 1
make INSTALL=/bin/install DESTDIR=$pkgdir install
install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
install -D -m755 ../mdadm $pkgdir/etc/rc.d/mdadm
install -D -m644 ../mdadm_install $pkgdir/lib/initcpio/install/mdadm
install -D -m644 ../mdadm_hook $pkgdir/lib/initcpio/hooks/mdadm
# symlink for backward compatibility
ln -sf /lib/initcpio/hooks/mdadm $pkgdir/lib/initcpio/hooks/raid
# build static mdassemble for Arch's initramfs
make MDASSEMBLE_AUTO=1 mdassemble
install -D -m755 mdassemble $pkgdir/sbin/mdassemble
}