blob: 2034ff7c35467e0d9e2dfa8ad94124fc151e234c (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Maintainer: Gerlof Fokkema <gerlof.fokkema+aur@gmail.com>
# Maintainer: Rene Peinthor <peinthor@gmail.com>
pkgname=drbd-utils-git
pkgver=9.3.1
pkgrel=2
arch=('x86_64')
pkgdesc='Userland tools for Distributed Replicated Block Device. (Git)'
url='https://www.drbd.org'
license=('GPL2')
depends=('perl' 'bash' 'po4a')
makedepends=('git' 'libxslt' 'systemd')
provides=('drbd-utils=${pkgver}')
conflicts=('drbd-utils')
replaces=('drbd-utils')
source=("git+https://github.com/LINBIT/drbd-utils.git"
"drbd-headers.git::git+https://github.com/LINBIT/drbd-headers.git")
backup=('etc/drbd.conf' 'etc/drbd.d/global_common.conf')
md5sums=('SKIP' 'SKIP')
prepare() {
cd $srcdir/drbd-utils
git submodule init
git -c protocol.file.allow=always submodule update
}
build() {
cd $srcdir/drbd-utils
./autogen.sh
./configure \
--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--sbindir=/usr/bin \
--libdir=/usr/lib \
--with-distro=generic \
--with-bashcompletion \
--with-initscripttype=systemd \
--with-udev \
--without-rgmanager \
--without-pacemaker \
--without-heartbeat \
--without-83support \
--without-xen \
--without-manual
make
}
package() {
make -C $srcdir/drbd-utils DESTDIR="$pkgdir" install
cd "$pkgdir"
# move /lib files under /usr/lib
mv lib/drbd/* usr/lib/drbd
rmdir lib/drbd lib
# move bash completion
install -dm 755 usr/share/bash-completion
mv etc/bash_completion.d usr/share/bash-completion/completions
# remove /var/lock
rmdir var/lock
rmdir var/run/drbd var/run
# autoload module
install -Dm 644 /dev/null usr/lib/modules-load.d/drbd.conf
echo 'drbd' > usr/lib/modules-load.d/drbd.conf
}
# vim:set ts=2 sw=2 et:
|