3 %bcond_with 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.6/%{name}-%{version}.tar.gz
19 # Source0-md5: 2e94423507b63fcc08f93c094e789be8
22 Source3: o2cb.sysconfig
23 Patch0: %{name}-tinfo.patch
24 Patch2: %{name}-linux.patch
25 Patch3: %{name}-format.patch
26 Patch4: %{name}-link.patch
27 URL: http://oss.oracle.com/projects/ocfs2-tools/
28 BuildRequires: autoconf >= 2.54
29 BuildRequires: automake
30 %{?with_cman:BuildRequires: cman-devel}
31 %{?with_corosync:BuildRequires: corosync-devel}
32 BuildRequires: device-mapper-devel
33 %{?with_dlm:BuildRequires: dlm-devel}
34 BuildRequires: e2fsprogs-devel
35 BuildRequires: glib2-devel >= 2.2.3
36 BuildRequires: libblkid-devel >= 1.36
37 BuildRequires: libcom_err-devel
38 BuildRequires: libuuid-devel
39 BuildRequires: ncurses-devel
40 %{?with_openais:BuildRequires: openais-devel}
41 %{?with_pacemaker:BuildRequires: pacemaker-devel}
42 BuildRequires: pkgconfig
43 %{?with_gtk2:BuildRequires: python-devel >= 1:2.3}
44 %{?with_gtk2:BuildRequires: python-pygtk-gtk}
45 BuildRequires: readline-devel
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.268
48 Requires(post): /sbin/ldconfig
49 Requires(post,preun): /sbin/chkconfig
50 Requires: glib2 >= 2.2.3
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 Tools and support files for creating and managing OCFS2 volumes.
57 %description -l pl.UTF-8
58 Narzędzia do tworzenia i zarządzania wolumenami OCFS2.
61 Summary: Header files and develpment documentation for ocfs2-tools
62 Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do ocfs2-tools
63 Group: Development/Libraries
66 Header files and develpment documentation for ocfs2-tools.
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe i dokumetacja do ocfs2-tools.
72 Summary: GTK+ interface to OCFS2 Tools
73 Summary(pl.UTF-8): Interfejs GTK+ do narzędzi OCFS2
74 Group: X11/Applications
75 Requires: %{name} = %{version}-%{release}
76 Requires: python-pygtk-gtk
79 GTK+ interface to OCFS2 Tools.
81 %description gtk -l pl.UTF-8
82 Interfejs GTK+ do narzędzi OCFS2.
96 %{!?with_corosync:ac_cv_header_corosync_cpg_h=no ac_cv_header_openais_cpg_h=no} \
97 %{!?with_cman:ac_cv_lib_cman_cman_replyto_shutdown=no} \
98 %{!?with_dlm:ac_cv_lib_dlmcontrol_dlmc_fs_connect=no} \
99 %{!?with_openais:ac_cv_header_openais_saCkpt_h=no} \
100 %{!?with_pacemaker:ac_cv_lib_crmcluster_crm_get_peer=no} \
101 --enable-dynamic-fsck=yes \
102 --enable-dynamic-ctl=yes \
103 %{?with_gtk2:--enable-ocfs2console=yes}
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
112 DESTDIR=$RPM_BUILD_ROOT
114 install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf
115 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2
116 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb
117 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb
118 install -d $RPM_BUILD_ROOT/dlm
121 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
122 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
123 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py
127 rm -rf $RPM_BUILD_ROOT
131 /sbin/chkconfig --add o2cb
132 /sbin/chkconfig --add ocfs2
133 %service o2cb restart
134 %service ocfs2 restart
137 if [ "$1" = "0" ]; then
138 %service -q ocfs2 stop
139 %service -q o2cb stop
140 /sbin/chkconfig --del ocfs2
141 /sbin/chkconfig --del o2cb
144 %postun -p /sbin/ldconfig
147 %defattr(644,root,root,755)
148 %doc CREDITS MAINTAINERS README README.O2CB documentation/*.txt
149 %attr(754,root,root) /etc/rc.d/init.d/o2cb
150 %attr(754,root,root) /etc/rc.d/init.d/ocfs2
151 %attr(755,root,root) /sbin/debugfs.ocfs2
152 %attr(755,root,root) /sbin/fsck.ocfs2
153 %attr(755,root,root) /sbin/mkfs.ocfs2
154 %attr(755,root,root) /sbin/mount.ocfs2
155 %attr(755,root,root) /sbin/mounted.ocfs2
156 %attr(755,root,root) /sbin/o2cb_ctl
157 %attr(755,root,root) /sbin/o2image
158 %attr(755,root,root) /sbin/ocfs2_hb_ctl
159 %attr(755,root,root) /sbin/tunefs.ocfs2
160 %if %{with corosync} && %{with openais} && %{with dlm}
162 %attr(755,root,root) /sbin/ocfs2_controld.cman
164 %if %{with pacemaker}
165 %attr(755,root,root) /sbin/ocfs2_controld.pcmk
168 %attr(755,root,root) %{_bindir}/o2info
169 %attr(755,root,root) %{_sbindir}/o2hbmonitor
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}/man1/o2info.1*
175 %{_mandir}/man7/o2cb.7*
176 %{_mandir}/man8/debugfs.ocfs2.8*
177 %{_mandir}/man8/fsck.ocfs2.8*
178 %{_mandir}/man8/fsck.ocfs2.checks.8*
179 %{_mandir}/man8/mkfs.ocfs2.8*
180 %{_mandir}/man8/mount.ocfs2.8*
181 %{_mandir}/man8/mounted.ocfs2.8*
182 %{_mandir}/man8/o2cb_ctl.8*
183 %{_mandir}/man8/o2image.8*
184 %{_mandir}/man8/ocfs2_hb_ctl.8*
185 %{_mandir}/man8/tunefs.ocfs2.8*
188 %defattr(644,root,root,755)
192 %{_includedir}/ocfs2-kernel
194 %{_libdir}/libo2dlm.a
195 %{_libdir}/libocfs2.a
196 %{_pkgconfigdir}/o2cb.pc
197 %{_pkgconfigdir}/o2dlm.pc
198 %{_pkgconfigdir}/ocfs2.pc
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_sbindir}/ocfs2console
204 %dir %{py_sitedir}/ocfs2interface
205 %attr(755,root,root) %{py_sitedir}/ocfs2interface/gidlemodule.so
206 %attr(755,root,root) %{py_sitedir}/ocfs2interface/o2cbmodule.so
207 %attr(755,root,root) %{py_sitedir}/ocfs2interface/ocfs2module.so
208 %attr(755,root,root) %{py_sitedir}/ocfs2interface/plistmodule.so
209 %{py_sitedir}/ocfs2interface/*.py[co]
210 %{_mandir}/man8/ocfs2console.8*