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