summaryrefslogtreecommitdiff
path: root/community-testing/drbd/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/drbd/PKGBUILD')
-rw-r--r--community-testing/drbd/PKGBUILD67
1 files changed, 67 insertions, 0 deletions
diff --git a/community-testing/drbd/PKGBUILD b/community-testing/drbd/PKGBUILD
new file mode 100644
index 000000000..5afc6db41
--- /dev/null
+++ b/community-testing/drbd/PKGBUILD
@@ -0,0 +1,67 @@
+# $Id: PKGBUILD 75398 2012-08-21 20:52:40Z seblu $
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+
+pkgname=drbd
+pkgver=8.3.13
+pkgrel=1
+arch=('i686' 'x86_64')
+pkgdesc='Userland tools for Distributed Replicated Block Device'
+url='http://www.drbd.org'
+license=('GPL2')
+depends=('perl' 'bash')
+source=("http://oss.linbit.com/drbd/8.3/$pkgname-$pkgver.tar.gz"
+ "$pkgname.rc"
+ "$pkgname.service")
+backup=('etc/drbd.conf' 'etc/drbd.d/global_common.conf')
+md5sums=('760a25459ef6b7262a2a3572c1561c5b'
+ '8902a2f7aca6245c27e9566a1509312c'
+ 'afbb345094db49b0a474c0b4e51c0acd')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --with-distro=generic \
+ --with-utils \
+ --with-bashcompletion \
+ --with-udev \
+ --without-km \
+ --without-rgmanager \
+ --without-pacemaker \
+ --without-heartbeat \
+ --without-xen \
+ --with-initdir=/etc/rc.d
+ #--with-legacy_utils \
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ # move forced /sbin binaries
+ cd "$pkgdir"
+ mv sbin/* usr/sbin
+ rmdir sbin
+ # fix hardcoded path in udev rules
+ sed -i 's,/sbin/drbdadm,/usr/sbin/drbdadm,' etc/udev/rules.d/65-drbd.rules
+ # move udev files
+ mv etc/udev usr/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
+ # autoload module
+ install -Dm 644 /dev/null usr/lib/modules-load.d/$pkgname.conf
+ echo 'drbd' > usr/lib/modules-load.d/$pkgname.conf
+ # setup initscript (replace)
+ cd "$srcdir"
+ install -Dm 755 $pkgname.rc "$pkgdir/etc/rc.d/$pkgname"
+ # install systemd stuff
+ install -Dm 644 $pkgname.service \
+ "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+}
+
+# vim:set ts=2 sw=2 ft=sh et: