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