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