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