]>
Commit | Line | Data |
---|---|---|
988649c3 | 1 | # |
e6562548 | 2 | # Conditional build: |
c6d4d630 | 3 | %bcond_with cman # cman support |
d3ab8885 JB |
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 | |
988649c3 | 9 | # |
24b3a0d2 | 10 | Summary: Tools for the OCFS2 filesystem |
71876b01 | 11 | Summary(pl.UTF-8): Narzędzia dla systemu plików OCFS2 |
24b3a0d2 | 12 | Name: ocfs2-tools |
dd168fb5 | 13 | Version: 1.6.4 |
87ccf853 | 14 | Release: 3 |
d3ab8885 | 15 | License: GPL v2+ |
24b3a0d2 | 16 | Group: Applications/System |
d3ab8885 | 17 | #Source0Download: https://oss.oracle.com/projects/ocfs2-tools/files/source/ |
dd168fb5 JB |
18 | Source0: https://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v1.6/%{name}-%{version}.tar.gz |
19 | # Source0-md5: 2e94423507b63fcc08f93c094e789be8 | |
872dff28 | 20 | Source1: ocfs2.init |
21 | Source2: o2cb.init | |
1545f1eb | 22 | Source3: o2cb.sysconfig |
180d12a8 | 23 | Patch0: %{name}-tinfo.patch |
d3ab8885 JB |
24 | Patch2: %{name}-linux.patch |
25 | Patch3: %{name}-format.patch | |
26 | Patch4: %{name}-link.patch | |
24b3a0d2 | 27 | URL: http://oss.oracle.com/projects/ocfs2-tools/ |
d3ab8885 | 28 | BuildRequires: autoconf >= 2.54 |
180d12a8 | 29 | BuildRequires: automake |
d3ab8885 JB |
30 | %{?with_cman:BuildRequires: cman-devel} |
31 | %{?with_corosync:BuildRequires: corosync-devel} | |
1545f1eb | 32 | BuildRequires: device-mapper-devel |
d3ab8885 | 33 | %{?with_dlm:BuildRequires: dlm-devel} |
24b3a0d2 | 34 | BuildRequires: e2fsprogs-devel |
d548860d | 35 | BuildRequires: glib2-devel >= 2.2.3 |
d3ab8885 JB |
36 | BuildRequires: libblkid-devel >= 1.36 |
37 | BuildRequires: libcom_err-devel | |
d548860d AM |
38 | BuildRequires: libuuid-devel |
39 | BuildRequires: ncurses-devel | |
d3ab8885 JB |
40 | %{?with_openais:BuildRequires: openais-devel} |
41 | %{?with_pacemaker:BuildRequires: pacemaker-devel} | |
24b3a0d2 | 42 | BuildRequires: pkgconfig |
d3ab8885 | 43 | %{?with_gtk2:BuildRequires: python-devel >= 1:2.3} |
988649c3 | 44 | %{?with_gtk2:BuildRequires: python-pygtk-gtk} |
24b3a0d2 | 45 | BuildRequires: readline-devel |
c4577179 | 46 | BuildRequires: rpm-pythonprov |
c66229aa | 47 | BuildRequires: rpmbuild(macros) >= 1.268 |
dcdea3f9 JB |
48 | Requires(post): /sbin/ldconfig |
49 | Requires(post,preun): /sbin/chkconfig | |
d3ab8885 | 50 | Requires: glib2 >= 2.2.3 |
dcdea3f9 | 51 | Requires: rc-scripts |
24b3a0d2 AM |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
54 | %description | |
55 | Tools and support files for creating and managing OCFS2 volumes. | |
56 | ||
e7e6eaa6 JR |
57 | %description -l pl.UTF-8 |
58 | Narzędzia do tworzenia i zarządzania wolumenami OCFS2. | |
30d0cf50 | 59 | |
d548860d AM |
60 | %package devel |
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 | |
64 | ||
65 | %description devel | |
66 | Header files and develpment documentation for ocfs2-tools. | |
67 | ||
e359b5f3 | 68 | %description devel -l pl.UTF-8 |
d548860d AM |
69 | Pliki nagłówkowe i dokumetacja do ocfs2-tools. |
70 | ||
24b3a0d2 | 71 | %package gtk |
30d0cf50 | 72 | Summary: GTK+ interface to OCFS2 Tools |
71876b01 | 73 | Summary(pl.UTF-8): Interfejs GTK+ do narzędzi OCFS2 |
24b3a0d2 AM |
74 | Group: X11/Applications |
75 | Requires: %{name} = %{version}-%{release} | |
76 | Requires: python-pygtk-gtk | |
77 | ||
78 | %description gtk | |
30d0cf50 JB |
79 | GTK+ interface to OCFS2 Tools. |
80 | ||
e7e6eaa6 JR |
81 | %description gtk -l pl.UTF-8 |
82 | Interfejs GTK+ do narzędzi OCFS2. | |
24b3a0d2 AM |
83 | |
84 | %prep | |
85 | %setup -q | |
180d12a8 | 86 | %patch0 -p1 |
d3ab8885 JB |
87 | %patch2 -p1 |
88 | %patch3 -p1 | |
89 | %patch4 -p1 | |
24b3a0d2 AM |
90 | |
91 | %build | |
180d12a8 AM |
92 | %{__aclocal} -I . |
93 | %{__autoconf} | |
ecb2bb9c | 94 | |
24b3a0d2 | 95 | %configure \ |
d3ab8885 JB |
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} \ | |
24b3a0d2 AM |
101 | --enable-dynamic-fsck=yes \ |
102 | --enable-dynamic-ctl=yes \ | |
988649c3 | 103 | %{?with_gtk2:--enable-ocfs2console=yes} |
ecb2bb9c | 104 | |
d548860d | 105 | %{__make} -j1 |
24b3a0d2 AM |
106 | |
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
1545f1eb | 109 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
24b3a0d2 AM |
110 | |
111 | %{__make} install \ | |
112 | DESTDIR=$RPM_BUILD_ROOT | |
113 | ||
d548860d | 114 | install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf |
872dff28 | 115 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2 |
116 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb | |
1545f1eb | 117 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb |
118 | install -d $RPM_BUILD_ROOT/dlm | |
872dff28 | 119 | |
988649c3 | 120 | %if %{with gtk2} |
24b3a0d2 AM |
121 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
122 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
d3ab8885 | 123 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py |
988649c3 | 124 | %endif |
24b3a0d2 AM |
125 | |
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
872dff28 | 129 | %post |
130 | /sbin/ldconfig | |
131 | /sbin/chkconfig --add o2cb | |
1545f1eb | 132 | /sbin/chkconfig --add ocfs2 |
872dff28 | 133 | %service o2cb restart |
1545f1eb | 134 | %service ocfs2 restart |
872dff28 | 135 | |
136 | %preun | |
137 | if [ "$1" = "0" ]; then | |
1545f1eb | 138 | %service -q ocfs2 stop |
872dff28 | 139 | %service -q o2cb stop |
1545f1eb | 140 | /sbin/chkconfig --del ocfs2 |
872dff28 | 141 | /sbin/chkconfig --del o2cb |
142 | fi | |
143 | ||
dcdea3f9 JB |
144 | %postun -p /sbin/ldconfig |
145 | ||
24b3a0d2 AM |
146 | %files |
147 | %defattr(644,root,root,755) | |
d3ab8885 | 148 | %doc CREDITS MAINTAINERS README README.O2CB documentation/*.txt |
872dff28 | 149 | %attr(754,root,root) /etc/rc.d/init.d/o2cb |
150 | %attr(754,root,root) /etc/rc.d/init.d/ocfs2 | |
d3ab8885 JB |
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} | |
161 | %if %{with cman} | |
162 | %attr(755,root,root) /sbin/ocfs2_controld.cman | |
163 | %endif | |
164 | %if %{with pacemaker} | |
165 | %attr(755,root,root) /sbin/ocfs2_controld.pcmk | |
166 | %endif | |
167 | %endif | |
dd168fb5 JB |
168 | %attr(755,root,root) %{_bindir}/o2info |
169 | %attr(755,root,root) %{_sbindir}/o2hbmonitor | |
d548860d AM |
170 | %dir %{_sysconfdir}/ocfs2 |
171 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ocfs2/cluster.conf | |
d1e0bced | 172 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/o2cb |
1545f1eb | 173 | %dir /dlm |
dd168fb5 | 174 | %{_mandir}/man1/o2info.1* |
d3ab8885 JB |
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* | |
d548860d AM |
186 | |
187 | %files devel | |
188 | %defattr(644,root,root,755) | |
d3ab8885 JB |
189 | %{_includedir}/o2cb |
190 | %{_includedir}/o2dlm | |
191 | %{_includedir}/ocfs2 | |
192 | %{_includedir}/ocfs2-kernel | |
193 | %{_libdir}/libo2cb.a | |
194 | %{_libdir}/libo2dlm.a | |
195 | %{_libdir}/libocfs2.a | |
196 | %{_pkgconfigdir}/o2cb.pc | |
197 | %{_pkgconfigdir}/o2dlm.pc | |
198 | %{_pkgconfigdir}/ocfs2.pc | |
24b3a0d2 | 199 | |
988649c3 | 200 | %if %{with gtk2} |
24b3a0d2 AM |
201 | %files gtk |
202 | %defattr(644,root,root,755) | |
d3ab8885 | 203 | %attr(755,root,root) %{_sbindir}/ocfs2console |
24b3a0d2 | 204 | %dir %{py_sitedir}/ocfs2interface |
d3ab8885 JB |
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 | |
24b3a0d2 | 209 | %{py_sitedir}/ocfs2interface/*.py[co] |
d3ab8885 | 210 | %{_mandir}/man8/ocfs2console.8* |
988649c3 | 211 | %endif |