]> git.pld-linux.org Git - packages/drbd.git/blame - drbd.spec
- converted to UTF-8
[packages/drbd.git] / drbd.spec
CommitLineData
865899a0
JB
1#
2# Conditional build:
8a621363 3%bcond_without dist_kernel # allow non-distribution kernel
4%bcond_without kernel # don't build kernel modules
5%bcond_without smp # don't build SMP module
6%bcond_without userspace # don't build userspace module
7%bcond_with verbose # verbose build (V=1)
d5b2fc9b 8%bcond_with grsec_kernel # build for kernel-grsecurity
9#
10%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
11%define alt_kernel grsecurity
12%endif
865899a0 13#
9bc98bf1
AM
14%ifarch sparc
15%undefine with_smp
16%endif
17
17bdc5f2 18%define _rel 5
adfef6a4 19Summary: drbd is a block device designed to build high availibility clusters
1d7c6457 20Summary(pl.UTF-8): drbd jest urządzeniem blokowym dla klastrów o wysokiej niezawodności
6fa99396 21Name: drbd
63833c46 22Version: 0.7.22
757ccdc6 23Release: %{_rel}
6fa99396 24License: GPL
adfef6a4 25Group: Base/Kernel
e1902b31 26Source0: http://oss.linbit.com/drbd/0.7/%{name}-%{version}.tar.gz
63833c46 27# Source0-md5: 589626e0c62d314d3bbe78275b9e7d2d
6ed4faa5 28Patch0: %{name}-Makefile.patch
ab116b42 29# based on http://members.home.nl/maarten/drbd-0.7.22-2.6.19.patch but compliant
30# with older kernels
31Patch1: %{name}-0.7.22-2.6.19-friendly.patch
b7104f70 32URL: http://www.drbd.org/
c3f25c5f 33%if %{with userspace}
e1e6e3f2 34BuildRequires: bison
35BuildRequires: flex
c3f25c5f 36%endif
75784242 37%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build}
6ed4faa5 38BuildRequires: rpmbuild(macros) >= 1.330
6fa99396 39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
dcef0ff6 40
dcef0ff6 41%description
adfef6a4
JB
42drbd is a block device which is designed to build high availability
43clusters. This is done by mirroring a whole block device via (a
44dedicated) network. You could see it as a network RAID1.
6fa99396 45
1d7c6457
JR
46%description -l pl.UTF-8
47drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
48niezawodności. drbd działa jako mirroring całego urządzenia blokowego
49przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
adfef6a4 50
1d7c6457
JR
51%description -l pt_BR.UTF-8
52O DRBD é um dispositivo de bloco que é projetado para construir
53clusters de Alta Disponibilidade. Isto é feito espelhando um
54dispositivo de bloco inteiro via rede (dedicada ou não). Pode ser
55visto como um RAID 1 via rede. Este pacote contém utilitários para
03eacf93 56gerenciar dispositivos DRBD.
57
adfef6a4
JB
58%package -n drbdsetup
59Summary: Setup tool and scripts for DRBD
1d7c6457
JR
60Summary(pl.UTF-8): Narzędzie konfiguracyjne i skrypty dla DRBD
61Summary(pt_BR.UTF-8): Utilitários para gerenciar dispositivos DRBD
adfef6a4 62Group: Applications/System
865899a0 63Requires(post,preun): /sbin/chkconfig
62f18924 64Requires: rc-scripts
229016ae 65Conflicts: drbdsetup24
adfef6a4
JB
66
67%description -n drbdsetup
68Setup tool and init scripts for DRBD.
69
1d7c6457
JR
70%description -n drbdsetup -l pl.UTF-8
71Narzędzie konfiguracyjne i skrypty startowe dla DRBD.
dcef0ff6 72
75784242 73%package -n kernel%{_alt_kernel}-block-drbd
2befa262 74Summary: Kernel module with drbd - a block device designed to build high availibility clusters
1d7c6457 75Summary(pl.UTF-8): Moduł jądra do drbd - urządzenia blokowego dla klastrów o wysokiej niezawodności
757ccdc6 76Release: %{_rel}@%{_kernel_ver_str}
5a6d72e4 77Group: Base/Kernel
aa91dcdd 78%{?with_dist_kernel:%requires_releq_kernel_up}
865899a0 79Requires(post,postun): /sbin/depmod
8bbec5cd 80Requires: drbdsetup
5a6d72e4 81
75784242 82%description -n kernel%{_alt_kernel}-block-drbd
5a6d72e4 83drbd is a block device which is designed to build high availability
84clusters. This is done by mirroring a whole block device via (a
85dedicated) network. You could see it as a network RAID1.
86
1d7c6457
JR
87%description -n kernel%{_alt_kernel}-block-drbd -l pl.UTF-8
88drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
89niezawodności. drbd działa jako mirroring całego urządzenia blokowego
90przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
5a6d72e4 91
75784242 92%package -n kernel%{_alt_kernel}-smp-block-drbd
5a6d72e4 93Summary: SMP kernel module with drbd - a block device designed to build high availibility clusters
1d7c6457 94Summary(pl.UTF-8): Wersja SMP Modułu jądra do drbd - urządzenia blokowego dla klastrów o wysokiej niezawodności
757ccdc6 95Release: %{_rel}@%{_kernel_ver_str}
5a6d72e4 96Group: Base/Kernel
aa91dcdd 97%{?with_dist_kernel:%requires_releq_kernel_smp}
865899a0 98Requires(post,postun): /sbin/depmod
8bbec5cd 99Requires: drbdsetup
5a6d72e4 100
75784242 101%description -n kernel%{_alt_kernel}-smp-block-drbd
5a6d72e4 102drbd is a block device which is designed to build high availability
103clusters. This is done by mirroring a whole block device via (a
104dedicated) network. You could see it as a network RAID1.
105
1d7c6457
JR
106%description -n kernel%{_alt_kernel}-smp-block-drbd -l pl.UTF-8
107drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
108niezawodności. drbd działa jako mirroring całego urządzenia blokowego
109przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
5a6d72e4 110
dcef0ff6 111%prep
b7104f70 112%setup -q
6ed4faa5 113%patch0 -p1
ab116b42 114%patch1 -p1
6fa99396 115
dcef0ff6 116%build
2a3f4807
AM
117%if %{with userspace}
118%{__make} tools \
6ed4faa5 119 KVER=dummy \
63833c46 120 CC="%{__cc}" \
6ed4faa5 121 OPTCFLAGS="%{rpmcflags}" \
122 LDFLAGS="%{rpmldflags}"
adfef6a4 123%endif
2a3f4807
AM
124
125%if %{with kernel}
126cd drbd
127sed -i -e 's#$(CONFIG_BLK_DEV_DRBD)#m#g' Makefile-2.6
128ln -sf Makefile-2.6 Makefile
129# kernel module(s)
6ed4faa5 130%build_kernel_modules -m drbd EXTRA_CFLAGS="-DNO_MORE_DEV_FS"
adfef6a4 131%endif
6fa99396 132
dcef0ff6 133%install
6fa99396 134rm -rf $RPM_BUILD_ROOT
a383bc65 135install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{_sysconfdir}} \
adfef6a4 136 $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/ha.d/resource.d}
dcef0ff6 137
2a3f4807 138%if %{with kernel}
6ed4faa5 139%install_kernel_modules -m drbd/drbd -d misc
2a3f4807 140%endif
adfef6a4 141
2a3f4807 142%if %{with userspace}
a383bc65 143install user/{drbdadm,drbdsetup} $RPM_BUILD_ROOT/sbin
adfef6a4
JB
144install scripts/drbd.conf $RPM_BUILD_ROOT%{_sysconfdir}
145install scripts/drbd $RPM_BUILD_ROOT/etc/rc.d/init.d
2a3f4807 146
033ea64b 147install scripts/drbddisk $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d
dcef0ff6 148
2a3f4807
AM
149install documentation/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
150install documentation/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
151%endif
adfef6a4 152
6fa99396 153%clean
154rm -rf $RPM_BUILD_ROOT
155
75784242 156%post -n kernel%{_alt_kernel}-block-drbd
50595a60 157%depmod %{_kernel_ver}
5a6d72e4 158
75784242 159%postun -n kernel%{_alt_kernel}-block-drbd
50595a60 160%depmod %{_kernel_ver}
adfef6a4 161
75784242 162%post -n kernel%{_alt_kernel}-smp-block-drbd
50595a60 163%depmod %{_kernel_ver}smp
5a6d72e4 164
75784242 165%postun -n kernel%{_alt_kernel}-smp-block-drbd
50595a60 166%depmod %{_kernel_ver}smp
adfef6a4
JB
167
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
2a3f4807 178%if %{with userspace}
850fc8e7 179%files -n drbdsetup
180%defattr(644,root,root,755)
a383bc65 181%attr(755,root,root) /sbin/*
ea0a006e 182%attr(754,root,root) /etc/rc.d/init.d/drbd
a915ddd5 183%attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbddisk
a383bc65 184%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.conf
850fc8e7 185%{_mandir}/man[58]/*
2a3f4807 186%endif
adfef6a4 187
2a3f4807 188%if %{with kernel}
75784242 189%files -n kernel%{_alt_kernel}-block-drbd
6fa99396 190%defattr(644,root,root,755)
ac033d95 191%doc ChangeLog README
6ed4faa5 192/lib/modules/%{_kernel_ver}/misc/drbd.ko*
adfef6a4 193
2a3f4807 194%if %{with smp} && %{with dist_kernel}
75784242 195%files -n kernel%{_alt_kernel}-smp-block-drbd
5a6d72e4 196%defattr(644,root,root,755)
ac033d95 197%doc ChangeLog README
6ed4faa5 198/lib/modules/%{_kernel_ver}smp/misc/drbd.ko*
2a3f4807
AM
199%endif
200%endif
This page took 0.087553 seconds and 4 git commands to generate.