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