PKGBUILD 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
  2. # Contributor: Judd Vinet <jvinet@zeroflux.org>
  3. pkgname=mdadm
  4. pkgver=4.0
  5. pkgrel=1
  6. pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
  7. arch=(x86_64 ppc64le)
  8. license=('GPL')
  9. url="http://neil.brown.name/blog/mdadm"
  10. groups=('base')
  11. conflicts=('mkinitcpio<0.7')
  12. depends=('glibc')
  13. backup=('etc/mdadm.conf')
  14. source=("https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-4.0.tar."{xz,sign}
  15. mdadm.conf
  16. mdadm_install
  17. mdadm_hook
  18. mdadm_udev_install
  19. disable-werror.patch)
  20. replaces=('raidtools')
  21. validpgpkeys=('6A86B80E1D22F21D0B26BA75397D82E0531A9C91') # Jes Sorensen
  22. md5sums=('2cb4feffea9167ba71b5f346a0c0a40d'
  23. 'SKIP'
  24. '5a37c112aa07dccdde62f9fa5b888607'
  25. 'af2f73f0094ebee66f503ca4710c7142'
  26. 'fbfb7d07efcbaf5dc61af424c5f6e352'
  27. 'b6b0bfd6487c99264578630616dfe5eb'
  28. '599745ed2bec4489e83991cff89c46ee')
  29. prepare() {
  30. cd $srcdir/$pkgname-$pkgver
  31. patch -Np0 -i ../disable-werror.patch
  32. }
  33. build() {
  34. cd $srcdir/$pkgname-$pkgver
  35. make CXFLAGS="$CFLAGS" BINDIR=/usr/bin UDEVDIR=/usr/lib/udev
  36. # build static mdassemble for Arch's initramfs
  37. make MDASSEMBLE_AUTO=1 mdassemble
  38. }
  39. package() {
  40. cd $srcdir/$pkgname-$pkgver
  41. make INSTALL=/usr/bin/install BINDIR=/usr/bin DESTDIR=$pkgdir UDEVDIR=/usr/lib/udev install
  42. make SYSTEMD_DIR=$pkgdir/usr/lib/systemd/system install-systemd
  43. install -D -m755 mdassemble $pkgdir/usr/bin/mdassemble
  44. install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
  45. install -D -m644 ../mdadm_install $pkgdir/usr/lib/initcpio/install/mdadm
  46. install -D -m644 ../mdadm_hook $pkgdir/usr/lib/initcpio/hooks/mdadm
  47. install -D -m644 ../mdadm_udev_install $pkgdir/usr/lib/initcpio/install/mdadm_udev
  48. }