]> git.pld-linux.org Git - packages/ocfs2-tools.git/blob - ocfs2-tools.spec
- up to 1.8.6
[packages/ocfs2-tools.git] / ocfs2-tools.spec
1 #
2 # Conditional build:
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
9 #
10 Summary:        Tools for the OCFS2 filesystem
11 Summary(pl.UTF-8):      Narzędzia dla systemu plików OCFS2
12 Name:           ocfs2-tools
13 Version:        1.8.6
14 Release:        1
15 License:        GPL v2+
16 Group:          Applications/System
17 Source0:        https://github.com/markfasheh/ocfs2-tools/archive/%{name}-%{version}.tar.gz
18 # Source0-md5:  fc64af70a6a2533948f47fa9cb2fc1c4
19 Source1:        ocfs2.init
20 Source2:        o2cb.init
21 Source3:        o2cb.sysconfig
22 Patch0:         %{name}-tinfo.patch
23 Patch2:         %{name}-linux.patch
24 Patch3:         %{name}-format.patch
25 Patch4:         %{name}-link.patch
26 URL:            http://oss.oracle.com/projects/ocfs2-tools/
27 BuildRequires:  autoconf >= 2.54
28 BuildRequires:  automake
29 %{?with_cman:BuildRequires:     cman-devel}
30 %{?with_corosync:BuildRequires: corosync-devel}
31 BuildRequires:  device-mapper-devel
32 %{?with_dlm:BuildRequires:      dlm-devel}
33 BuildRequires:  e2fsprogs-devel
34 BuildRequires:  glib2-devel >= 2.2.3
35 BuildRequires:  libblkid-devel >= 1.36
36 BuildRequires:  libcom_err-devel
37 BuildRequires:  libuuid-devel
38 BuildRequires:  ncurses-devel
39 %{?with_openais:BuildRequires:  openais-devel}
40 %{?with_pacemaker:BuildRequires:        pacemaker-devel}
41 BuildRequires:  pkgconfig
42 %{?with_gtk2:BuildRequires:     python-devel >= 1:2.3}
43 %{?with_gtk2:BuildRequires:     python-pygtk-gtk}
44 BuildRequires:  readline-devel
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rpmbuild(macros) >= 1.268
47 Requires(post): /sbin/ldconfig
48 Requires(post,preun):   /sbin/chkconfig
49 Requires:       glib2 >= 2.2.3
50 Requires:       rc-scripts
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
54 Tools and support files for creating and managing OCFS2 volumes.
55
56 %description -l pl.UTF-8
57 Narzędzia do tworzenia i zarządzania wolumenami OCFS2.
58
59 %package devel
60 Summary:        Header files and develpment documentation for ocfs2-tools
61 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumetacja do ocfs2-tools
62 Group:          Development/Libraries
63
64 %description devel
65 Header files and develpment documentation for ocfs2-tools.
66
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe i dokumetacja do ocfs2-tools.
69
70 %package gtk
71 Summary:        GTK+ interface to OCFS2 Tools
72 Summary(pl.UTF-8):      Interfejs GTK+ do narzędzi OCFS2
73 Group:          X11/Applications
74 Requires:       %{name} = %{version}-%{release}
75 Requires:       python-pygtk-gtk
76
77 %description gtk
78 GTK+ interface to OCFS2 Tools.
79
80 %description gtk -l pl.UTF-8
81 Interfejs GTK+ do narzędzi OCFS2.
82
83 %prep
84 %setup -q -n %{name}-%{name}-%{version}
85 %patch0 -p1
86 %patch2 -p1
87 %patch3 -p1
88 %patch4 -p1
89
90 sed -i -e 's#-Wno-format##g' */Makefile
91
92 %build
93 %{__aclocal} -I .
94 %{__autoconf}
95
96 %configure \
97         %{!?with_corosync:ac_cv_header_corosync_cpg_h=no ac_cv_header_openais_cpg_h=no} \
98         %{!?with_cman:ac_cv_lib_cman_cman_replyto_shutdown=no} \
99         %{!?with_dlm:ac_cv_lib_dlmcontrol_dlmc_fs_connect=no} \
100         %{!?with_openais:ac_cv_header_openais_saCkpt_h=no} \
101         %{!?with_pacemaker:ac_cv_lib_crmcluster_crm_get_peer=no} \
102         --enable-dynamic-fsck=yes \
103         --enable-dynamic-ctl=yes \
104         %{?with_gtk2:--enable-ocfs2console=yes}
105
106 %{__make} -j1
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
111
112 %{__make} install \
113         DESTDIR=$RPM_BUILD_ROOT
114
115 install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf
116 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2
117 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb
118 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb
119 install -d $RPM_BUILD_ROOT/dlm
120
121 %if %{with gtk2}
122 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
123 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
124 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py
125 %endif
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %post
131 /sbin/ldconfig
132 /sbin/chkconfig --add o2cb
133 /sbin/chkconfig --add ocfs2
134 %service o2cb restart
135 %service ocfs2 restart
136
137 %preun
138 if [ "$1" = "0" ]; then
139         %service -q ocfs2 stop
140         %service -q o2cb stop
141         /sbin/chkconfig --del ocfs2
142         /sbin/chkconfig --del o2cb
143 fi
144
145 %postun -p /sbin/ldconfig
146
147 %files
148 %defattr(644,root,root,755)
149 %doc CREDITS MAINTAINERS README README.O2CB documentation/*.txt
150 %attr(754,root,root) /etc/rc.d/init.d/o2cb
151 %attr(754,root,root) /etc/rc.d/init.d/ocfs2
152 %attr(755,root,root) /sbin/debugfs.ocfs2
153 %attr(755,root,root) /sbin/defragfs.ocfs2
154 %attr(755,root,root) /sbin/fsck.ocfs2
155 %attr(755,root,root) /sbin/mkfs.ocfs2
156 %attr(755,root,root) /sbin/mounted.ocfs2
157 %attr(755,root,root) /sbin/mount.ocfs2
158 %attr(755,root,root) /sbin/o2cb
159 %attr(755,root,root) /sbin/o2cb_ctl
160 %attr(755,root,root) /sbin/o2cluster
161 %attr(755,root,root) /sbin/o2image
162 %attr(755,root,root) /sbin/ocfs2_hb_ctl
163 %attr(755,root,root) /sbin/tunefs.ocfs2
164 %if %{with corosync} && %{with openais} && %{with dlm}
165 %if %{with cman}
166 %attr(755,root,root) /sbin/ocfs2_controld.cman
167 %endif
168 %if %{with pacemaker}
169 %attr(755,root,root) /sbin/ocfs2_controld.pcmk
170 %endif
171 %endif
172 %attr(755,root,root) %{_bindir}/o2info
173 %attr(755,root,root) %{_sbindir}/o2hbmonitor
174 %dir %{_sysconfdir}/ocfs2
175 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ocfs2/cluster.conf
176 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/o2cb
177 %dir /dlm
178 %{_mandir}/man1/o2info.1*
179 %{_mandir}/man5/o2cb.sysconfig.5.*
180 %{_mandir}/man5/ocfs2.cluster.conf.5.*
181 %{_mandir}/man7/o2cb.7*
182 %{_mandir}/man7/ocfs2.7.*
183 %{_mandir}/man8/debugfs.ocfs2.8*
184 %{_mandir}/man8/defragfs.ocfs2.8.*
185 %{_mandir}/man8/fsck.ocfs2.8*
186 %{_mandir}/man8/fsck.ocfs2.checks.8*
187 %{_mandir}/man8/mkfs.ocfs2.8*
188 %{_mandir}/man8/mounted.ocfs2.8*
189 %{_mandir}/man8/mount.ocfs2.8*
190 %{_mandir}/man8/o2cb.8.*
191 %{_mandir}/man8/o2cb_ctl.8*
192 %{_mandir}/man8/o2cluster.8.*
193 %{_mandir}/man8/o2hbmonitor.8.*
194 %{_mandir}/man8/o2image.8*
195 %{_mandir}/man8/ocfs2_hb_ctl.8*
196 %{_mandir}/man8/tunefs.ocfs2.8*
197
198 %files devel
199 %defattr(644,root,root,755)
200 %{_includedir}/o2cb
201 %{_includedir}/o2dlm
202 %{_includedir}/ocfs2
203 %{_includedir}/ocfs2-kernel
204 %{_libdir}/libo2cb.a
205 %{_libdir}/libo2dlm.a
206 %{_libdir}/libocfs2.a
207 %{_pkgconfigdir}/o2cb.pc
208 %{_pkgconfigdir}/o2dlm.pc
209 %{_pkgconfigdir}/ocfs2.pc
210
211 %if %{with gtk2}
212 %files gtk
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_sbindir}/ocfs2console
215 %dir %{py_sitedir}/ocfs2interface
216 %attr(755,root,root) %{py_sitedir}/ocfs2interface/gidlemodule.so
217 %attr(755,root,root) %{py_sitedir}/ocfs2interface/o2cbmodule.so
218 %attr(755,root,root) %{py_sitedir}/ocfs2interface/ocfs2module.so
219 %attr(755,root,root) %{py_sitedir}/ocfs2interface/plistmodule.so
220 %{py_sitedir}/ocfs2interface/*.py[co]
221 %{_mandir}/man8/ocfs2console.8*
222 %endif
This page took 0.139232 seconds and 3 git commands to generate.