blob: a92017d6a1f7d4dda08aa085fd2bd73316f7e6c1 (
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
|
# Maintainer: Gerlof Fokkema <gerlof.fokkema+aur@gmail.com>
# Maintainer: Rene Peinthor <peinthor@gmail.com>
pkgname=drbd-utils-git
pkgver=9.28.0
pkgrel=1
arch=('x86_64' 'i686')
pkgdesc='Userland tools for Distributed Replicated Block Device. (Git)'
url='https://www.drbd.org'
license=('GPL2')
depends=('bash')
makedepends=('git' 'libxslt' 'systemd' 'po4a')
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
sed -i -e "s: -Wshadow: -Wshadow $LDFLAGS:" user/drbdmon/Makefile.in
}
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-manual \
--without-xen
make
}
package() {
make -C $srcdir/drbd-utils DESTDIR="$pkgdir" install
cd "$pkgdir"
# move bash completion
install -dm 755 usr/share/bash-completion
mv etc/bash_completion.d usr/share/bash-completion/completions
# remove /var establish /var/lib/drbd when installed
rm -r var
install -Dm 644 /dev/null usr/lib/tmpfiles.d/drbd.conf
echo "d /var/lib/drbd" >usr/lib/tmpfiles.d/drbd.conf
# 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:
|