]>
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 |
234024cf | 9 | Release: 3 |
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 |
c4577179 | 33 | BuildRequires: rpm-pythonprov |
c66229aa | 34 | BuildRequires: rpmbuild(macros) >= 1.268 |
1545f1eb | 35 | #BuildRequires: scons |
dcdea3f9 JB |
36 | Requires(post): /sbin/ldconfig |
37 | Requires(post,preun): /sbin/chkconfig | |
38 | Requires: rc-scripts | |
24b3a0d2 AM |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
ecb2bb9c PS |
41 | %define filterout_ld -Wl,--as-needed |
42 | ||
24b3a0d2 AM |
43 | %description |
44 | Tools and support files for creating and managing OCFS2 volumes. | |
45 | ||
e7e6eaa6 JR |
46 | %description -l pl.UTF-8 |
47 | Narzędzia do tworzenia i zarządzania wolumenami OCFS2. | |
30d0cf50 | 48 | |
d548860d AM |
49 | %package devel |
50 | Summary: Header files and develpment documentation for ocfs2-tools | |
51 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do ocfs2-tools | |
52 | Group: Development/Libraries | |
53 | ||
54 | %description devel | |
55 | Header files and develpment documentation for ocfs2-tools. | |
56 | ||
e359b5f3 | 57 | %description devel -l pl.UTF-8 |
d548860d AM |
58 | Pliki nagłówkowe i dokumetacja do ocfs2-tools. |
59 | ||
24b3a0d2 | 60 | %package gtk |
30d0cf50 | 61 | Summary: GTK+ interface to OCFS2 Tools |
71876b01 | 62 | Summary(pl.UTF-8): Interfejs GTK+ do narzędzi OCFS2 |
24b3a0d2 AM |
63 | Group: X11/Applications |
64 | Requires: %{name} = %{version}-%{release} | |
65 | Requires: python-pygtk-gtk | |
66 | ||
67 | %description gtk | |
30d0cf50 JB |
68 | GTK+ interface to OCFS2 Tools. |
69 | ||
e7e6eaa6 JR |
70 | %description gtk -l pl.UTF-8 |
71 | Interfejs GTK+ do narzędzi OCFS2. | |
24b3a0d2 AM |
72 | |
73 | %prep | |
74 | %setup -q | |
180d12a8 | 75 | %patch0 -p1 |
ecb2bb9c | 76 | %patch1 -p1 |
24b3a0d2 AM |
77 | |
78 | %build | |
180d12a8 AM |
79 | %{__aclocal} -I . |
80 | %{__autoconf} | |
ecb2bb9c | 81 | |
24b3a0d2 AM |
82 | %configure \ |
83 | --enable-dynamic-fsck=yes \ | |
84 | --enable-dynamic-ctl=yes \ | |
988649c3 | 85 | %{?with_gtk2:--enable-ocfs2console=yes} |
ecb2bb9c | 86 | |
d548860d | 87 | %{__make} -j1 |
24b3a0d2 AM |
88 | |
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
1545f1eb | 91 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
24b3a0d2 AM |
92 | |
93 | %{__make} install \ | |
94 | DESTDIR=$RPM_BUILD_ROOT | |
95 | ||
d548860d | 96 | install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf |
872dff28 | 97 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2 |
98 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb | |
1545f1eb | 99 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb |
100 | install -d $RPM_BUILD_ROOT/dlm | |
872dff28 | 101 | |
988649c3 | 102 | %if %{with gtk2} |
24b3a0d2 AM |
103 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
104 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
1545f1eb | 105 | rm $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py |
988649c3 | 106 | %endif |
24b3a0d2 AM |
107 | |
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
872dff28 | 111 | %post |
112 | /sbin/ldconfig | |
113 | /sbin/chkconfig --add o2cb | |
1545f1eb | 114 | /sbin/chkconfig --add ocfs2 |
872dff28 | 115 | %service o2cb restart |
1545f1eb | 116 | %service ocfs2 restart |
872dff28 | 117 | |
118 | %preun | |
119 | if [ "$1" = "0" ]; then | |
1545f1eb | 120 | %service -q ocfs2 stop |
872dff28 | 121 | %service -q o2cb stop |
1545f1eb | 122 | /sbin/chkconfig --del ocfs2 |
872dff28 | 123 | /sbin/chkconfig --del o2cb |
124 | fi | |
125 | ||
dcdea3f9 JB |
126 | %postun -p /sbin/ldconfig |
127 | ||
24b3a0d2 AM |
128 | %files |
129 | %defattr(644,root,root,755) | |
1545f1eb | 130 | %doc documentation/*.txt |
872dff28 | 131 | %attr(754,root,root) /etc/rc.d/init.d/o2cb |
132 | %attr(754,root,root) /etc/rc.d/init.d/ocfs2 | |
24b3a0d2 | 133 | %attr(755,root,root) /sbin/* |
d548860d AM |
134 | %dir %{_sysconfdir}/ocfs2 |
135 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ocfs2/cluster.conf | |
d1e0bced | 136 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/o2cb |
1545f1eb | 137 | %dir /dlm |
d548860d AM |
138 | %{_mandir}/man[78]/* |
139 | ||
140 | %files devel | |
141 | %defattr(644,root,root,755) | |
142 | %{_includedir}/* | |
143 | %{_libdir}/lib*.a | |
144 | %{_pkgconfigdir}/*.pc | |
24b3a0d2 | 145 | |
988649c3 | 146 | %if %{with gtk2} |
24b3a0d2 AM |
147 | %files gtk |
148 | %defattr(644,root,root,755) | |
149 | %attr(755,root,root) %{_sbindir}/* | |
150 | %dir %{py_sitedir}/ocfs2interface | |
151 | %attr(755,root,root) %{py_sitedir}/ocfs2interface/*.so | |
152 | %{py_sitedir}/ocfs2interface/*.py[co] | |
988649c3 | 153 | %endif |