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