]> git.pld-linux.org Git - packages/drbd.git/blob - drbd.spec
- added br udev-core, updated todo
[packages/drbd.git] / drbd.spec
1 #
2 # TODO:
3 #  - trigger to update drbd-8.2 config
4 #  - warning: Installed (but unpackaged) file(s) found:
5 #     /etc/xen/scripts/block-drbd
6 #  - add some provides/requires to keep in sync with kernel releases
7 #    Linux 3.0.8 got drbd module version 8.3.11
8 #
9
10 Summary:        drbd is a block device designed to build high availibility clusters
11 Summary(pl.UTF-8):      drbd jest urządzeniem blokowym dla klastrów o wysokiej niezawodności
12 Name:           drbd
13 Version:        8.4.0
14 Release:        2
15 License:        GPL v2+
16 Group:          Base/Kernel
17 Source0:        http://oss.linbit.com/drbd/8.4/%{name}-%{version}.tar.gz
18 # Source0-md5:  8519246dff4e2de14595d71abcd54db4
19 URL:            http://www.drbd.org/
20 BuildRequires:  bison
21 BuildRequires:  flex
22 BuildRequires:  rpmbuild(macros) >= 1.379
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 drbd is a block device which is designed to build high availability
27 clusters. This is done by mirroring a whole block device via (a
28 dedicated) network. You could see it as a network RAID1.
29
30 %description -l pl.UTF-8
31 drbd jest urządzeniem blokowym zaprojektowanym dla klastrów o wysokiej
32 niezawodności. drbd działa jako mirroring całego urządzenia blokowego
33 przez (dedykowaną) sieć. Może być widoczny jako sieciowy RAID1.
34
35 %description -l pt_BR.UTF-8
36 O DRBD é um dispositivo de bloco que é projetado para construir
37 clusters de Alta Disponibilidade. Isto é feito espelhando um
38 dispositivo de bloco inteiro via rede (dedicada ou não). Pode ser
39 visto como um RAID 1 via rede. Este pacote contém utilitários para
40 gerenciar dispositivos DRBD.
41
42 %package -n drbdsetup
43 Summary:        Setup tool and scripts for DRBD
44 Summary(pl.UTF-8):      Narzędzie konfiguracyjne i skrypty dla DRBD
45 Summary(pt_BR.UTF-8):   Utilitários para gerenciar dispositivos DRBD
46 Group:          Applications/System
47 Requires(post,preun):   /sbin/chkconfig
48 Requires(pre):  /usr/bin/getgid
49 Requires(pre):  /usr/sbin/groupadd
50 Requires(postun):       /usr/sbin/groupdel
51 Requires:       rc-scripts
52 Provides:       group(haclient)
53 Obsoletes:      drbdsetup8
54 Conflicts:      drbdsetup24
55
56 %description -n drbdsetup
57 Setup tool and init scripts for DRBD.
58
59 %description -n drbdsetup -l pl.UTF-8
60 Narzędzie konfiguracyjne i skrypty startowe dla DRBD.
61
62 %package -n resource-agents-drbd
63 Summary:        DRBD resource agents for a cluster setup
64 Group:          Daemons
65 Requires:       heartbeat
66 Requires:       resource-agents
67
68 %description -n resource-agents-drbd
69 DRBD resource agents for a cluster setup.
70
71 %package -n bash-completion-drbd
72 Summary:        bash-completion for drbd
73 Summary(pl.UTF-8):      Bashowe uzupełnianie poleceń dla drbd
74 Group:          Applications/Shells
75 Requires:       bash-completion
76
77 %description -n bash-completion-drbd
78 This package provides bash-completion for drbd.
79
80 %description -n bash-completion-drbd -l pl.UTF-8
81 Ten pakiet dostarcza bashowe uzupełnianie poleceń dla drbd.
82
83 %package -n drbd-udev
84 Summary:        udev rules for drbd kernel module
85 Summary(pl.UTF-8):      Reguły udev dla modułów jądra Linuksa dla drbd
86 Group:          Base/Kernel
87 BuildRequires:  udev-core
88 Requires:       udev-core
89
90 %description -n drbd-udev
91 udev rules for drbd kernel module.
92
93 %description -n drbd-udev -l pl.UTF-8
94 Reguły udev dla modułu jądra Linuksa dla drbd.
95
96 %prep
97 %setup -q
98
99 %build
100 %configure
101 %{__make} tools \
102         KVER=dummy \
103         CC="%{__cc}" \
104         OPTCFLAGS="%{rpmcflags}" \
105         LDFLAGS="%{rpmldflags}"
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{_sysconfdir}} \
110         $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/ha.d/resource.d} \
111         $RPM_BUILD_ROOT/var/lib/drbd
112
113 %{__make} install -C scripts \
114         DRBD_ENABLE_UDEV=1 \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 install scripts/drbd $RPM_BUILD_ROOT/etc/rc.d/init.d
118 rm -rf $RPM_BUILD_ROOT/etc/init.d
119 install user/{drbdadm,drbdmeta,drbdsetup} $RPM_BUILD_ROOT/sbin
120
121 install documentation/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
122 install documentation/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %pre -n drbdsetup
128 %groupadd -g 60 haclient
129
130 %post -n drbdsetup
131 /sbin/chkconfig --add drbd
132 %service drbd restart
133
134 %preun -n drbdsetup
135 if [ "$1" = "0" ]; then
136         %service drbd stop
137         /sbin/chkconfig --del drbd
138 fi
139
140 %postun -n drbdsetup
141 if [ "$1" = "0" ]; then
142         %groupremove haclient
143 fi
144
145 %files -n drbdsetup
146 %defattr(644,root,root,755)
147 %attr(755,root,root) /sbin/drbdadm
148 %attr(4754,root,haclient) /sbin/drbdsetup
149 %attr(4754,root,haclient) /sbin/drbdmeta
150 %attr(754,root,root) /etc/rc.d/init.d/drbd
151 %dir %{_sysconfdir}/drbd.d
152 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.conf
153 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drbd.d/global_common.conf
154 %{_mandir}/man[58]/*
155 %dir /usr/lib/drbd
156 %attr(755,root,root) /usr/lib/drbd/*
157 %attr(755,root,root) %{_sbindir}/drbd-overview
158 %attr(750,root,root) %dir /var/lib/drbd
159
160 %files -n resource-agents-drbd
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbddisk
163 %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d/drbdupper
164 %dir /usr/lib/ocf/resource.d/linbit
165 %attr(755,root,root) /usr/lib/ocf/resource.d/linbit/*
166
167 %files -n bash-completion-drbd
168 %defattr(644,root,root,755)
169 /etc/bash_completion.d/drbdadm
170
171 %files -n drbd-udev
172 %defattr(644,root,root,755)
173 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/65-drbd.rules
This page took 0.053799 seconds and 3 git commands to generate.