drbd/drbd.spec
OBS User autobuild 267ac243e6 Accepting request 37680 from Base:System
Copy from Base:System/drbd based on submit request 37680 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/37680
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=25
2010-04-15 22:07:17 +00:00

137 lines
3.3 KiB
RPMSpec

#
# spec file for package drbd (Version 8.3.7)
#
# Copyright (c) 2010 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 http://bugs.opensuse.org/
#
Name: drbd
BuildRequires: bison flex udev
Summary: Distributed Replicated Block Device
Version: 8.3.7
Release: 1
Source: %{name}-%{version}.tar.bz2
Patch1: init-script-fixes.diff
Patch2: 64bit-fixes.diff
License: GPLv2+
Group: Productivity/Clustering/HA
Provides: drbdsetup drbd-control
Url: http://www.drbd.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): %insserv_prereq %fillup_prereq
Requires(preun): %insserv_prereq %fillup_prereq
Requires(postun): %insserv_prereq fileutils
%description
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.
Authors:
--------
Philipp Reisner <philipp.reisner@linbit.com>
Lars Ellenberg <lars.ellenberg@linbit.com>
%prep
%setup
%patch1
%patch2
%build
PATH=/sbin:$PATH %configure \
--without-km \
--with-utils \
--with-udev \
--with-distro=suse \
--with-heartbeat \
--with-pacemaker \
--with-xen \
--with-bashcompletion
make OPTFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%install
%makeinstall
rm $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/linbit/drbd
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
%endif
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
%{fillup_and_insserv}
%preun
%{stop_on_removal}
%postun
%{insserv_cleanup}
%files -n drbd
%defattr(-, root, root)
%config(noreplace) /etc/drbd.conf
/etc/bash_completion.d/drbdadm.sh
%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 COPYING
%doc README
%doc ChangeLog
%doc scripts/drbd.conf
%dir /etc/drbd.d
/sbin/drbdadm
/sbin/drbdsetup
/sbin/rcdrbd
/sbin/drbdmeta
/usr/sbin/drbd-overview
%ifarch %ix86 x86_64
%dir /etc/xen
%dir /etc/xen/scripts
/etc/xen/scripts/block-drbd
%endif
/etc/ha.d/resource.d/drbddisk
/etc/ha.d/resource.d/drbdupper
%dir /etc/udev
%dir /etc/udev/rules.d
/etc/udev/rules.d/65-drbd.rules
%config /etc/init.d/drbd
%defattr(-, root, root)
/var/lib/drbd
/usr/lib/drbd
%dir /etc/ha.d
%dir /etc/ha.d/resource.d
%changelog