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