3 %bcond_without cman # cman support
4 %bcond_without corosync # Corosync support
5 %bcond_without dlm # DLM support
6 %bcond_with openais # OpenAIS ckpt support
7 %bcond_without pacemaker # Pacemaker support
8 %bcond_without gtk2 # GTK+ 2 ocfs2console tool
10 Summary: Tools for the OCFS2 filesystem
11 Summary(pl.UTF-8): Narzędzia dla systemu plików OCFS2
16 Group: Applications/System
17 #Source0Download: https://oss.oracle.com/projects/ocfs2-tools/files/source/
18 Source0: https://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v1.4/%{name}-%{version}.tar.gz
19 # Source0-md5: f7ae245e8baa499aa56d7af25a7885d5
22 Source3: o2cb.sysconfig
23 Patch0: %{name}-tinfo.patch
24 Patch1: %{name}-vla-initializer.patch
25 Patch2: %{name}-linux.patch
26 Patch3: %{name}-format.patch
27 Patch4: %{name}-link.patch
28 URL: http://oss.oracle.com/projects/ocfs2-tools/
29 BuildRequires: autoconf >= 2.54
30 BuildRequires: automake
31 %{?with_cman:BuildRequires: cman-devel}
32 %{?with_corosync:BuildRequires: corosync-devel}
33 BuildRequires: device-mapper-devel
34 %{?with_dlm:BuildRequires: dlm-devel}
35 BuildRequires: e2fsprogs-devel
36 BuildRequires: glib2-devel >= 2.2.3
37 BuildRequires: libblkid-devel >= 1.36
38 BuildRequires: libcom_err-devel
39 BuildRequires: libuuid-devel
40 BuildRequires: ncurses-devel
41 %{?with_openais:BuildRequires: openais-devel}
42 %{?with_pacemaker:BuildRequires: pacemaker-devel}
43 BuildRequires: pkgconfig
44 %{?with_gtk2:BuildRequires: python-devel >= 1:2.3}
45 %{?with_gtk2:BuildRequires: python-pygtk-gtk}
46 BuildRequires: readline-devel
47 BuildRequires: rpm-pythonprov
48 BuildRequires: rpmbuild(macros) >= 1.268
49 Requires(post): /sbin/ldconfig
50 Requires(post,preun): /sbin/chkconfig
51 Requires: glib2 >= 2.2.3
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 Tools and support files for creating and managing OCFS2 volumes.
58 %description -l pl.UTF-8
59 Narzędzia do tworzenia i zarządzania wolumenami OCFS2.
62 Summary: Header files and develpment documentation for ocfs2-tools
63 Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do ocfs2-tools
64 Group: Development/Libraries
67 Header files and develpment documentation for ocfs2-tools.
69 %description devel -l pl.UTF-8
70 Pliki nagłówkowe i dokumetacja do ocfs2-tools.
73 Summary: GTK+ interface to OCFS2 Tools
74 Summary(pl.UTF-8): Interfejs GTK+ do narzędzi OCFS2
75 Group: X11/Applications
76 Requires: %{name} = %{version}-%{release}
77 Requires: python-pygtk-gtk
80 GTK+ interface to OCFS2 Tools.
82 %description gtk -l pl.UTF-8
83 Interfejs GTK+ do narzędzi OCFS2.
98 %{!?with_corosync:ac_cv_header_corosync_cpg_h=no ac_cv_header_openais_cpg_h=no} \
99 %{!?with_cman:ac_cv_lib_cman_cman_replyto_shutdown=no} \
100 %{!?with_dlm:ac_cv_lib_dlmcontrol_dlmc_fs_connect=no} \
101 %{!?with_openais:ac_cv_header_openais_saCkpt_h=no} \
102 %{!?with_pacemaker:ac_cv_lib_crmcluster_crm_get_peer=no} \
103 --enable-dynamic-fsck=yes \
104 --enable-dynamic-ctl=yes \
105 %{?with_gtk2:--enable-ocfs2console=yes}
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
114 DESTDIR=$RPM_BUILD_ROOT
116 install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf
117 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2
118 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb
119 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb
120 install -d $RPM_BUILD_ROOT/dlm
123 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
124 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
125 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py
129 rm -rf $RPM_BUILD_ROOT
133 /sbin/chkconfig --add o2cb
134 /sbin/chkconfig --add ocfs2
135 %service o2cb restart
136 %service ocfs2 restart
139 if [ "$1" = "0" ]; then
140 %service -q ocfs2 stop
141 %service -q o2cb stop
142 /sbin/chkconfig --del ocfs2
143 /sbin/chkconfig --del o2cb
146 %postun -p /sbin/ldconfig
149 %defattr(644,root,root,755)
150 %doc CREDITS MAINTAINERS README README.O2CB documentation/*.txt
151 %attr(754,root,root) /etc/rc.d/init.d/o2cb
152 %attr(754,root,root) /etc/rc.d/init.d/ocfs2
153 %attr(755,root,root) /sbin/debugfs.ocfs2
154 %attr(755,root,root) /sbin/fsck.ocfs2
155 %attr(755,root,root) /sbin/mkfs.ocfs2
156 %attr(755,root,root) /sbin/mount.ocfs2
157 %attr(755,root,root) /sbin/mounted.ocfs2
158 %attr(755,root,root) /sbin/o2cb_ctl
159 %attr(755,root,root) /sbin/o2image
160 %attr(755,root,root) /sbin/ocfs2_hb_ctl
161 %attr(755,root,root) /sbin/tunefs.ocfs2
162 %if %{with corosync} && %{with openais} && %{with dlm}
164 %attr(755,root,root) /sbin/ocfs2_controld.cman
166 %if %{with pacemaker}
167 %attr(755,root,root) /sbin/ocfs2_controld.pcmk
170 %dir %{_sysconfdir}/ocfs2
171 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ocfs2/cluster.conf
172 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/o2cb
174 %{_mandir}/man7/o2cb.7*
175 %{_mandir}/man8/debugfs.ocfs2.8*
176 %{_mandir}/man8/fsck.ocfs2.8*
177 %{_mandir}/man8/fsck.ocfs2.checks.8*
178 %{_mandir}/man8/mkfs.ocfs2.8*
179 %{_mandir}/man8/mount.ocfs2.8*
180 %{_mandir}/man8/mounted.ocfs2.8*
181 %{_mandir}/man8/o2cb_ctl.8*
182 %{_mandir}/man8/o2image.8*
183 %{_mandir}/man8/ocfs2_hb_ctl.8*
184 %{_mandir}/man8/tunefs.ocfs2.8*
187 %defattr(644,root,root,755)
191 %{_includedir}/ocfs2-kernel
193 %{_libdir}/libo2dlm.a
194 %{_libdir}/libocfs2.a
195 %{_pkgconfigdir}/o2cb.pc
196 %{_pkgconfigdir}/o2dlm.pc
197 %{_pkgconfigdir}/ocfs2.pc
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_sbindir}/ocfs2console
203 %dir %{py_sitedir}/ocfs2interface
204 %attr(755,root,root) %{py_sitedir}/ocfs2interface/gidlemodule.so
205 %attr(755,root,root) %{py_sitedir}/ocfs2interface/o2cbmodule.so
206 %attr(755,root,root) %{py_sitedir}/ocfs2interface/ocfs2module.so
207 %attr(755,root,root) %{py_sitedir}/ocfs2interface/plistmodule.so
208 %{py_sitedir}/ocfs2interface/*.py[co]
209 %{_mandir}/man8/ocfs2console.8*