summaryrefslogtreecommitdiff
path: root/pcr/multipath-tools-git/PKGBUILD
blob: d1bb4ac9bda18f2cc592c77f3f9f2ec1ee118e0b (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
# Maintainer: Miguel Revilla <yo@miguelrevilla.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Timothée Ravier <tim@siosm.fr>

pkgname=multipath-tools-git
pkgver=1295.81895af
pkgrel=1
pkgdesc="Tools to drive the Device Mapper multipathing driver (contains kpartx)"
url="http://christophe.varoqui.free.fr/"
arch=('x86_64' 'i686')
license=('GPL2')
depends=('libaio' 'device-mapper')
makedepends=('git' 'setconf')
options=(!emptydirs)
source=("${pkgname}::git+http://git.opensvc.com/multipath-tools/.git")
md5sums=('SKIP')

pkgver() {
  cd ${pkgname}
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd ${pkgname}
  sed -i 's|/sbin|/usr/bin|g' Makefile.inc
  sed -i 's|LIB=lib|LIB=usr/lib|g' Makefile.inc
  sed -i 's|${prefix}/lib/udev|${prefix}/usr/lib/udev|g' Makefile.inc
  sed -i 's|$(prefix)/lib/systemd/system|$(prefix)/usr/lib/systemd/system|g' Makefile.inc
}

build() {
  cd ${pkgname}
  setconf Makefile.inc GZIP '/usr/bin/gzip -9 -c'
  make
}

package() {
  cd ${pkgname}
  make LIB="/usr/lib" DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
  cd "${pkgdir}"/usr/lib
  rm libmpathpersist.so
  ln -s libmpathpersist.so.0 libmpathpersist.so
}