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