]> git.pld-linux.org Git - packages/drbd.git/blame - drbd.spec
- updated to 8.3.2
[packages/drbd.git] / drbd.spec
CommitLineData
865899a0 1#
54a31074
AG
2# TODO:
3# - trigger to update drbd-8.2 config
4#
865899a0 5# Conditional build:
8a621363 6%bcond_without dist_kernel # allow non-distribution kernel
7%bcond_without kernel # don't build kernel modules
8a621363 8%bcond_without userspace # don't build userspace module
9%bcond_with verbose # verbose build (V=1)
d5b2fc9b 10%bcond_with grsec_kernel # build for kernel-grsecurity
11#
cb2a50aa
ER
12%ifarch sparc
13%undefine with_smp
14%endif
15
16%if %{without kernel}
17%undefine with_dist_kernel
18%endif
d5b2fc9b 19%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
20%define alt_kernel grsecurity
21%endif
cb2a50aa
ER
22%if "%{_alt_kernel}" != "%{nil}"
23%undefine with_userspace
24%endif
25
54a31074 26%define _rel 0.1
cb2a50aa 27%define pname drbd
adfef6a4 28Summary: drbd is a block device designed to build high availibility clusters
281aad7e 29Summary(pl.UTF-8): drbd jest urządzeniem blokowym dla klastrów o wysokiej niezawodności
cb2a50aa 30Name: %{pname}%{_alt_kernel}
e664584d 31Version: 8.3.2
757ccdc6 32Release: %{_rel}
6fa99396 33License: GPL
adfef6a4 34Group: Base/Kernel
54a31074 35Source0: http://oss.linbit.com/drbd/8.3/%{pname}-%{version}.tar.gz
e664584d 36# Source0-md5: 8aa8f7891d397ff25b7a3f77f56d353b
cb2a50aa 37Patch0: %{pname}-Makefile.patch
b7104f70 38URL: http://www.drbd.org/
c3f25c5f 39%if %{with userspace}
e1e6e3f2 40BuildRequires: bison
41BuildRequires: flex
c3f25c5f 42%endif
61ec3cf3 43%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
9cb96b0b 44BuildRequires: rpmbuild(macros) >= 1.379
6fa99396 45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
dcef0ff6 46
dcef0ff6 47%description
adfef6a4
JB
48drbd is a block device which is designed to build high availability
49clusters. This is done by mirroring a whole block device via (a
50dedicated) network. You could see it as a network RAID1.
6fa99396 51
1d7c6457
JR
52%description -l pl.UTF-8
53drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
54niezawodności. drbd działa jako mirroring całego urządzenia blokowego
55przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
adfef6a4 56
1d7c6457
JR
57%description -l pt_BR.UTF-8
58O DRBD é um dispositivo de bloco que é projetado para construir
59clusters de Alta Disponibilidade. Isto é feito espelhando um
60dispositivo de bloco inteiro via rede (dedicada ou não). Pode ser
61visto como um RAID 1 via rede. Este pacote contém utilitários para
03eacf93 62gerenciar dispositivos DRBD.
63
adfef6a4
JB
64%package -n drbdsetup
65Summary: Setup tool and scripts for DRBD
281aad7e
ER
66Summary(pl.UTF-8): Narzędzie konfiguracyjne i skrypty dla DRBD
67Summary(pt_BR.UTF-8): Utilitários para gerenciar dispositivos DRBD
adfef6a4 68Group: Applications/System
865899a0 69Requires(post,preun): /sbin/chkconfig
81edeba3
JK
70Requires(pre): /usr/bin/getgid
71Requires(pre): /usr/sbin/groupadd
72Requires(postun): /usr/sbin/groupdel
62f18924 73Requires: rc-scripts
81edeba3 74Provides: group(haclient)
229016ae 75Conflicts: drbdsetup24
3f109fc6 76Obsoletes: drbdsetup8
adfef6a4
JB
77
78%description -n drbdsetup
79Setup tool and init scripts for DRBD.
80
1d7c6457
JR
81%description -n drbdsetup -l pl.UTF-8
82Narzędzie konfiguracyjne i skrypty startowe dla DRBD.
dcef0ff6 83
75784242 84%package -n kernel%{_alt_kernel}-block-drbd
2befa262 85Summary: Kernel module with drbd - a block device designed to build high availibility clusters
281aad7e 86Summary(pl.UTF-8): Moduł jądra do drbd - urządzenia blokowego dla klastrów o wysokiej niezawodności
757ccdc6 87Release: %{_rel}@%{_kernel_ver_str}
5a6d72e4 88Group: Base/Kernel
9cb96b0b 89%{?with_dist_kernel:%requires_releq_kernel}
865899a0 90Requires(post,postun): /sbin/depmod
8bbec5cd 91Requires: drbdsetup
5a6d72e4 92
75784242 93%description -n kernel%{_alt_kernel}-block-drbd
5a6d72e4 94drbd is a block device which is designed to build high availability
95clusters. This is done by mirroring a whole block device via (a
96dedicated) network. You could see it as a network RAID1.
97
1d7c6457
JR
98%description -n kernel%{_alt_kernel}-block-drbd -l pl.UTF-8
99drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
100niezawodności. drbd działa jako mirroring całego urządzenia blokowego
101przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
5a6d72e4 102
f20d65a6 103%package -n bash-completion-drbd
104Summary: bash-completion for drbd
105Summary(pl.UTF-8): Bashowe uzupełnianie poleceń dla drbd
106Group: Applications/Shells
107Requires: bash-completion
108
109%description -n bash-completion-drbd
110This package provides bash-completion for drbd.
111
112%description -n bash-completion-drbd -l pl.UTF-8
113Ten pakiet dostarcza bashowe uzupełnianie poleceń dla drbd.
114
dcef0ff6 115%prep
cb2a50aa 116%setup -q -n %{pname}-%{version}
6ed4faa5 117%patch0 -p1
6fa99396 118
dcef0ff6 119%build
2a3f4807
AM
120%if %{with userspace}
121%{__make} tools \
6ed4faa5 122 KVER=dummy \
63833c46 123 CC="%{__cc}" \
6ed4faa5 124 OPTCFLAGS="%{rpmcflags}" \
125 LDFLAGS="%{rpmldflags}"
adfef6a4 126%endif
2a3f4807
AM
127
128%if %{with kernel}
129cd drbd
130sed -i -e 's#$(CONFIG_BLK_DEV_DRBD)#m#g' Makefile-2.6
131ln -sf Makefile-2.6 Makefile
132# kernel module(s)
8a8cb102 133%build_kernel_modules -m drbd
adfef6a4 134%endif
6fa99396 135
dcef0ff6 136%install
6fa99396 137rm -rf $RPM_BUILD_ROOT
a383bc65 138install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{_sysconfdir}} \
adfef6a4 139 $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/ha.d/resource.d}
dcef0ff6 140
2a3f4807 141%if %{with kernel}
475f67f1 142%install_kernel_modules -m drbd/drbd -d block
2a3f4807 143%endif
adfef6a4 144
2a3f4807 145%if %{with userspace}
f20d65a6 146%{__make} install -C scripts \
147 PREFIX=$RPM_BUILD_ROOT
adfef6a4 148install scripts/drbd $RPM_BUILD_ROOT/etc/rc.d/init.d
f20d65a6 149rm -rf $RPM_BUILD_ROOT/etc/init.d
150install user/{drbdadm,drbdmeta,drbdsetup} $RPM_BUILD_ROOT/sbin
dcef0ff6 151
2a3f4807
AM
152install documentation/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
153install documentation/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
154%endif
adfef6a4 155
6fa99396 156%clean
157rm -rf $RPM_BUILD_ROOT
158
75784242 159%post -n kernel%{_alt_kernel}-block-drbd
50595a60 160%depmod %{_kernel_ver}
5a6d72e4 161
75784242 162%postun -n kernel%{_alt_kernel}-block-drbd
50595a60 163%depmod %{_kernel_ver}
adfef6a4 164
81edeba3
JK
165%pre -n drbdsetup
166%groupadd -g 60 haclient
167
adfef6a4 168%post -n drbdsetup
850fc8e7 169/sbin/chkconfig --add drbd
87d17891 170%service drbd restart
adfef6a4
JB
171
172%preun -n drbdsetup
850fc8e7 173if [ "$1" = "0" ]; then
87d17891 174 %service drbd stop
850fc8e7 175 /sbin/chkconfig --del drbd
176fi
177
81edeba3
JK
178%postun -n drbdsetup
179if [ "$1" = "0" ]; then
180 %groupremove haclient
181fi
182
183
2a3f4807 184%if %{with userspace}
850fc8e7 185%files -n drbdsetup
186%defattr(644,root,root,755)
81edeba3
JK
187%attr(755,root,root) /sbin/drbdadm
188%attr(2754,root,haclient) /sbin/drbdsetup
189%attr(2754,root,haclient) /sbin/drbdmeta
ea0a006e 190%attr(754,root,root) /etc/rc.d/init.d/drbd
a915ddd5 191%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbddisk
a383bc65 192%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.conf
850fc8e7 193%{_mandir}/man[58]/*
f20d65a6 194%dir /usr/lib/drbd
195%attr(755,root,root) /usr/lib/drbd/*
196
197%files -n bash-completion-drbd
198%defattr(644,root,root,755)
199/etc/bash_completion.d/drbdadm
2a3f4807 200%endif
adfef6a4 201
2a3f4807 202%if %{with kernel}
75784242 203%files -n kernel%{_alt_kernel}-block-drbd
6fa99396 204%defattr(644,root,root,755)
ac033d95 205%doc ChangeLog README
475f67f1 206/lib/modules/%{_kernel_ver}/block/drbd.ko*
2a3f4807 207%endif
This page took 0.10488 seconds and 4 git commands to generate.