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