summaryrefslogtreecommitdiff
path: root/community/multipath-tools/PKGBUILD
blob: bf4c18da80c36e1885e95589942cb48edebe450e (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
# $Id: PKGBUILD 64893 2012-02-18 19:44:21Z bpiotrowski $
# Maintainer:
# 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=5
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' 'etc/rc.d/multipathd' )
install=multipath-tools.install
source=("http://christophe.varoqui.free.fr/multipath-tools/$pkgname-$pkgver.tar.bz2"
        "multipath.conf"
        "multipath.conf.annotated"
        "multipathd.rc"
        'fix-build.patch')
md5sums=('a6d4b48afc28f1f50f5ee4b1b06d2765'
         'd0fb11398cc628c7997111efdc5d52e5'
         '5a93f993ec05fc99094d5139aabd3925'
         '1c2dcf43a6b5ae84ec1fae0fee071336'
         '2576fc535d7fa767837b1c7827013e52')

build() {
  #Needs to be fixed upstream. Refer to
  # https://bbs.archlinux.org/viewtopic.php?pid=793814#p793814
  cd "$srcdir"

  patch -p1 -i "${srcdir}"/fix-build.patch

  env LDFLAGS=${LDFLAGS//-Wl,--as-needed}\
    make
}

package() {
  cd "$srcdir"
  
  make LIB="lib" DESTDIR="$pkgdir" install

  install -D -m 644 "$srcdir"/multipath.conf "$pkgdir"/etc/multipath.conf
  install -D -m 644 "$srcdir"/multipath.conf.annotated "$pkgdir"/etc/multipath.conf.annotated
  install -D -m 755 "$srcdir"/multipathd.rc "$pkgdir"/etc/rc.d/multipathd
}