summaryrefslogtreecommitdiffstats
path: root/abs/core/mdadm/PKGBUILD
blob: c6402ac821359388bfbb28a31a7405a4e18d6936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# $Id: PKGBUILD 199470 2013-11-13 11:08:13Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
pkgname=mdadm
pkgver=3.3
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://neil.brown.name/blog/mdadm"
groups=('base')
conflicts=('mkinitcpio<0.7')
depends=('glibc')
backup=('etc/mdadm.conf')
source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
        mdadm.conf 
        mdadm_install
        mdadm_hook
        mdadm_udev_install
        mdadm.service
        disable-werror.patch)
replaces=('raidtools')

prepare() {
  cd $srcdir/$pkgname-$pkgver
  patch -Np0 -i ../disable-werror.patch
}

build() {
  cd $srcdir/$pkgname-$pkgver
  make CXFLAGS="$CFLAGS" BINDIR=/usr/bin
  # build static mdassemble for Arch's initramfs
  make MDASSEMBLE_AUTO=1 mdassemble
  
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make INSTALL=/usr/bin/install BINDIR=/usr/bin DESTDIR=$pkgdir install
  make SYSTEMD_DIR=$pkgdir/usr/lib/systemd/system install-systemd
  install -D -m755 mdassemble $pkgdir/usr/bin/mdassemble
  install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
  install -D -m644 ../mdadm_install $pkgdir/usr/lib/initcpio/install/mdadm
  install -D -m644 ../mdadm_hook $pkgdir/usr/lib/initcpio/hooks/mdadm
  install -D -m644 ../mdadm_udev_install $pkgdir/usr/lib/initcpio/install/mdadm_udev
  # systemd service file
  install -D -m644 $srcdir/mdadm.service $pkgdir/usr/lib/systemd/system/mdadm.service
}
md5sums=('8ac04259cdd74b4566c3b6dea9414b57'
         '5a37c112aa07dccdde62f9fa5b888607'
         'af2f73f0094ebee66f503ca4710c7142'
         'fbfb7d07efcbaf5dc61af424c5f6e352'
         'b6b0bfd6487c99264578630616dfe5eb'
         'eb1786b18fa4d13cfd7b71d6b05cfb4f'
         '599745ed2bec4489e83991cff89c46ee')