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