]>
Commit | Line | Data |
---|---|---|
988649c3 | 1 | # |
e6562548 JB |
2 | # Conditional build: |
3 | %bcond_without gtk2 # build without GTK | |
988649c3 | 4 | # |
24b3a0d2 | 5 | Summary: Tools for the OCFS2 filesystem |
71876b01 | 6 | Summary(pl.UTF-8): Narzędzia dla systemu plików OCFS2 |
24b3a0d2 | 7 | Name: ocfs2-tools |
ecb2bb9c | 8 | Version: 1.4.4 |
e652298d | 9 | Release: 2 |
24b3a0d2 AM |
10 | License: GPL v2 |
11 | Group: Applications/System | |
d548860d | 12 | Source0: http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v1.4/%{name}-%{version}.tar.gz |
ecb2bb9c | 13 | # Source0-md5: f7ae245e8baa499aa56d7af25a7885d5 |
872dff28 | 14 | Source1: ocfs2.init |
15 | Source2: o2cb.init | |
1545f1eb | 16 | Source3: o2cb.sysconfig |
180d12a8 | 17 | Patch0: %{name}-tinfo.patch |
ecb2bb9c | 18 | Patch1: %{name}-vla-initializer.patch |
24b3a0d2 | 19 | URL: http://oss.oracle.com/projects/ocfs2-tools/ |
180d12a8 AM |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
d548860d | 22 | BuildRequires: cman-devel |
1545f1eb | 23 | BuildRequires: device-mapper-devel |
24b3a0d2 | 24 | BuildRequires: e2fsprogs-devel |
d548860d AM |
25 | BuildRequires: glib2-devel >= 2.2.3 |
26 | BuildRequires: libuuid-devel | |
27 | BuildRequires: ncurses-devel | |
28 | BuildRequires: openais-devel | |
24b3a0d2 | 29 | BuildRequires: pkgconfig |
988649c3 | 30 | %{?with_gtk2:BuildRequires: python-devel} |
31 | %{?with_gtk2:BuildRequires: python-pygtk-gtk} | |
24b3a0d2 | 32 | BuildRequires: readline-devel |
c66229aa | 33 | BuildRequires: rpmbuild(macros) >= 1.268 |
1545f1eb | 34 | #BuildRequires: scons |
dcdea3f9 JB |
35 | Requires(post): /sbin/ldconfig |
36 | Requires(post,preun): /sbin/chkconfig | |
37 | Requires: rc-scripts | |
24b3a0d2 AM |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
ecb2bb9c PS |
40 | %define filterout_ld -Wl,--as-needed |
41 | ||
24b3a0d2 AM |
42 | %description |
43 | Tools and support files for creating and managing OCFS2 volumes. | |
44 | ||
e7e6eaa6 JR |
45 | %description -l pl.UTF-8 |
46 | Narzędzia do tworzenia i zarządzania wolumenami OCFS2. | |
30d0cf50 | 47 | |
d548860d AM |
48 | %package devel |
49 | Summary: Header files and develpment documentation for ocfs2-tools | |
50 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do ocfs2-tools | |
51 | Group: Development/Libraries | |
52 | ||
53 | %description devel | |
54 | Header files and develpment documentation for ocfs2-tools. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Pliki nagłówkowe i dokumetacja do ocfs2-tools. | |
58 | ||
24b3a0d2 | 59 | %package gtk |
30d0cf50 | 60 | Summary: GTK+ interface to OCFS2 Tools |
71876b01 | 61 | Summary(pl.UTF-8): Interfejs GTK+ do narzędzi OCFS2 |
24b3a0d2 AM |
62 | Group: X11/Applications |
63 | Requires: %{name} = %{version}-%{release} | |
64 | Requires: python-pygtk-gtk | |
65 | ||
66 | %description gtk | |
30d0cf50 JB |
67 | GTK+ interface to OCFS2 Tools. |
68 | ||
e7e6eaa6 JR |
69 | %description gtk -l pl.UTF-8 |
70 | Interfejs GTK+ do narzędzi OCFS2. | |
24b3a0d2 AM |
71 | |
72 | %prep | |
73 | %setup -q | |
180d12a8 | 74 | %patch0 -p1 |
ecb2bb9c | 75 | %patch1 -p1 |
24b3a0d2 AM |
76 | |
77 | %build | |
180d12a8 AM |
78 | %{__aclocal} -I . |
79 | %{__autoconf} | |
ecb2bb9c | 80 | |
24b3a0d2 AM |
81 | %configure \ |
82 | --enable-dynamic-fsck=yes \ | |
83 | --enable-dynamic-ctl=yes \ | |
988649c3 | 84 | %{?with_gtk2:--enable-ocfs2console=yes} |
ecb2bb9c | 85 | |
d548860d | 86 | %{__make} -j1 |
24b3a0d2 AM |
87 | |
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
1545f1eb | 90 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
24b3a0d2 AM |
91 | |
92 | %{__make} install \ | |
93 | DESTDIR=$RPM_BUILD_ROOT | |
94 | ||
d548860d | 95 | install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf |
872dff28 | 96 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2 |
97 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb | |
1545f1eb | 98 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb |
99 | install -d $RPM_BUILD_ROOT/dlm | |
872dff28 | 100 | |
988649c3 | 101 | %if %{with gtk2} |
24b3a0d2 AM |
102 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
103 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
1545f1eb | 104 | rm $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py |
988649c3 | 105 | %endif |
24b3a0d2 AM |
106 | |
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
872dff28 | 110 | %post |
111 | /sbin/ldconfig | |
112 | /sbin/chkconfig --add o2cb | |
1545f1eb | 113 | /sbin/chkconfig --add ocfs2 |
872dff28 | 114 | %service o2cb restart |
1545f1eb | 115 | %service ocfs2 restart |
872dff28 | 116 | |
117 | %preun | |
118 | if [ "$1" = "0" ]; then | |
1545f1eb | 119 | %service -q ocfs2 stop |
872dff28 | 120 | %service -q o2cb stop |
1545f1eb | 121 | /sbin/chkconfig --del ocfs2 |
872dff28 | 122 | /sbin/chkconfig --del o2cb |
123 | fi | |
124 | ||
dcdea3f9 JB |
125 | %postun -p /sbin/ldconfig |
126 | ||
24b3a0d2 AM |
127 | %files |
128 | %defattr(644,root,root,755) | |
1545f1eb | 129 | %doc documentation/*.txt |
872dff28 | 130 | %attr(754,root,root) /etc/rc.d/init.d/o2cb |
131 | %attr(754,root,root) /etc/rc.d/init.d/ocfs2 | |
24b3a0d2 | 132 | %attr(755,root,root) /sbin/* |
d548860d AM |
133 | %dir %{_sysconfdir}/ocfs2 |
134 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ocfs2/cluster.conf | |
d1e0bced | 135 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/o2cb |
1545f1eb | 136 | %dir /dlm |
d548860d AM |
137 | %{_mandir}/man[78]/* |
138 | ||
139 | %files devel | |
140 | %defattr(644,root,root,755) | |
141 | %{_includedir}/* | |
142 | %{_libdir}/lib*.a | |
143 | %{_pkgconfigdir}/*.pc | |
24b3a0d2 | 144 | |
988649c3 | 145 | %if %{with gtk2} |
24b3a0d2 AM |
146 | %files gtk |
147 | %defattr(644,root,root,755) | |
148 | %attr(755,root,root) %{_sbindir}/* | |
149 | %dir %{py_sitedir}/ocfs2interface | |
150 | %attr(755,root,root) %{py_sitedir}/ocfs2interface/*.so | |
151 | %{py_sitedir}/ocfs2interface/*.py[co] | |
988649c3 | 152 | %endif |