summaryrefslogtreecommitdiff
path: root/community-testing/multipath-tools/PKGBUILD
blob: 28d08b8f49c3c9eac928e92068606b00a12b07ed (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
# $Id: PKGBUILD 71284 2012-05-26 08:37:33Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Thomas S Hatch <thatch45 ar gmail dot com>
# Contributor: Michael P <ptchinster@archlinux.us>
# Contributor: Matt Heagney <matt@heagney.com>

pkgname=multipath-tools
pkgver=0.4.9
pkgrel=7
pkgdesc='Multipath tools for Linux'
arch=('i686' 'x86_64')
url="http://christophe.varoqui.free.fr/"
license=('GPL')
depends=('libaio' 'device-mapper')
backup=('etc/multipath.conf' 'etc/multipath.conf.annotated')
install=multipath-tools.install
options=(!emptydirs)
source=(http://christophe.varoqui.free.fr/multipath-tools/$pkgname-$pkgver.tar.bz2
        multipath.conf multipath.conf.annotated multipathd.rc all-in-one.patch)
md5sums=('a6d4b48afc28f1f50f5ee4b1b06d2765'
         '9324ff0ba8330dcb21b2fcf64988026f'
         'be11462922eeeb9fcd2ba5f3f137b7d9'
         '7c04ef96441363b0d43a2ebb13a87659'
         '885c0ba9c90b73cc93aa3f78005f81d6')

build() {
  patch -Np1 -i all-in-one.patch

  # Needs to be fixed upstream. Refer to
  # https://bbs.archlinux.org/viewtopic.php?pid=793814#p793814
  export LDFLAGS=${LDFLAGS/-Wl,--as-needed}
  
  make
}

package() {
  make LIB='usr/lib' DESTDIR="$pkgdir" bindir='/usr/bin' libudevdir='/usr/lib/udev' install
  install -D -m 644 multipath.conf "$pkgdir"/etc/multipath.conf
  install -D -m 644 multipath.conf.annotated "$pkgdir"/etc/multipath.conf.annotated
  install -D -m 755 multipathd.rc "$pkgdir"/etc/rc.d/multipathd
}