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