File drbd.spec of Package drbd

# spec file for package drbd
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           drbd
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  udev
Summary:        Distributed Replicated Block Device
License:        GPL-2.0+
Group:          Productivity/Clustering/HA
Version:        8.4.3
Release:        0
Source:         %{name}-%{version}.tar.gz
Provides:       drbd-control
Provides:       drbdsetup
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(post): %insserv_prereq %fillup_prereq
Requires(preun): %insserv_prereq %fillup_prereq
Requires(postun): %insserv_prereq fileutils

Drbd is a distributed replicated block device. It mirrors a block
device over the network to another machine. Think of it as networked
raid 1. It is a building block for setting up clusters.


PATH=/sbin:$PATH %configure \
    --without-km \
    --with-utils \
    --with-udev \
    --with-distro=suse \
    --with-heartbeat \
    --with-pacemaker \
    --with-xen \

make OPTFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

ln -sf ../etc/init.d/drbd $RPM_BUILD_ROOT/sbin/rcdrbd
mkdir -p $RPM_BUILD_ROOT/var/lib/drbd
# and I only want to install a hint to the example conf
cat <<___ > $RPM_BUILD_ROOT/etc/drbd.conf
# please have a a look at the example configuration file in
# %{_docdir}/drbd/drbd.conf
%ifnarch %ix86 x86_64
rm -rf $RPM_BUILD_ROOT/etc/xen




%files -n drbd
%defattr(-, root, root)
%config(noreplace) /etc/drbd.conf
%config /etc/drbd.d/global_common.conf
%doc %{_mandir}/man5/drbd.conf.5*
%doc %{_mandir}/man8/drbd.8*
%doc %{_mandir}/man8/drbdsetup.8*
%doc %{_mandir}/man8/drbdadm.8*
%doc %{_mandir}/man8/drbddisk.8*
%doc %{_mandir}/man8/drbdmeta.8*
%doc ChangeLog
%doc scripts/drbd.conf
%dir /etc/drbd.d
%dir /lib/drbd
%ifarch %ix86 x86_64
%dir %attr(700,root,root) /etc/xen
%dir /etc/xen/scripts
%dir /etc/udev
%dir /etc/udev/rules.d
%config /etc/init.d/drbd
%defattr(-, root, root)
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
%dir /usr/lib/ocf/resource.d/linbit
%dir /etc/ha.d
%dir /etc/ha.d/resource.d

openSUSE Build Service is sponsored by