]> git.pld-linux.org Git - packages/ocfs2-tools.git/blob - ocfs2-tools.spec
d35ee03726f8bdc9d0f7b729f94efc73c482a04e
[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.4.1
9 Release:        2
10 License:        GPL v2
11 Group:          Applications/System
12 Source0:        http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v1.4/%{name}-%{version}.tar.gz
13 # Source0-md5:  92f4f9f16c3f74307ad508f5e6a300a1
14 Source1:        ocfs2.init
15 Source2:        o2cb.init
16 Source3:        o2cb.sysconfig
17 Patch0:         %{name}-tinfo.patch
18 Patch1:         %{name}-ac.patch
19 Patch2:         %{name}-limits.patch
20 URL:            http://oss.oracle.com/projects/ocfs2-tools/
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  cman-devel
24 BuildRequires:  device-mapper-devel
25 BuildRequires:  e2fsprogs-devel
26 BuildRequires:  glib2-devel >= 2.2.3
27 BuildRequires:  libuuid-devel
28 BuildRequires:  ncurses-devel
29 BuildRequires:  openais-devel
30 BuildRequires:  pkgconfig
31 %{?with_gtk2:BuildRequires:     python-devel}
32 %{?with_gtk2:BuildRequires:     python-pygtk-gtk}
33 BuildRequires:  readline-devel
34 BuildRequires:  rpmbuild(macros) >= 1.268
35 #BuildRequires: scons
36 Requires(post): /sbin/ldconfig
37 Requires(post,preun):   /sbin/chkconfig
38 Requires:       rc-scripts
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 Tools and support files for creating and managing OCFS2 volumes.
43
44 %description -l pl.UTF-8
45 Narzędzia do tworzenia i zarządzania wolumenami OCFS2.
46
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
58 %package gtk
59 Summary:        GTK+ interface to OCFS2 Tools
60 Summary(pl.UTF-8):      Interfejs GTK+ do narzędzi OCFS2
61 Group:          X11/Applications
62 Requires:       %{name} = %{version}-%{release}
63 Requires:       python-pygtk-gtk
64
65 %description gtk
66 GTK+ interface to OCFS2 Tools.
67
68 %description gtk -l pl.UTF-8
69 Interfejs GTK+ do narzędzi OCFS2.
70
71 %prep
72 %setup -q
73 %patch0 -p1
74 %patch1 -p0
75 %patch2 -p0
76
77 %build
78 %{__aclocal} -I .
79 %{__autoconf}
80 %configure \
81         --enable-dynamic-fsck=yes \
82         --enable-dynamic-ctl=yes \
83         %{?with_gtk2:--enable-ocfs2console=yes}
84 %{__make} -j1
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
89
90 %{__make} install \
91         DESTDIR=$RPM_BUILD_ROOT
92
93 install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf
94 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2
95 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb
96 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb
97 install -d $RPM_BUILD_ROOT/dlm
98
99 %if %{with gtk2}
100 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
101 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
102 rm $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %post
109 /sbin/ldconfig
110 /sbin/chkconfig --add o2cb
111 /sbin/chkconfig --add ocfs2
112 %service o2cb restart
113 %service ocfs2 restart
114
115 %preun
116 if [ "$1" = "0" ]; then
117         %service -q ocfs2 stop
118         %service -q o2cb stop
119         /sbin/chkconfig --del ocfs2
120         /sbin/chkconfig --del o2cb
121 fi
122
123 %postun -p /sbin/ldconfig
124
125 %files
126 %defattr(644,root,root,755)
127 %doc documentation/*.txt
128 %attr(754,root,root) /etc/rc.d/init.d/o2cb
129 %attr(754,root,root) /etc/rc.d/init.d/ocfs2
130 %attr(755,root,root) /sbin/*
131 %dir %{_sysconfdir}/ocfs2
132 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ocfs2/cluster.conf
133 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/o2cb
134 %dir /dlm
135 %{_mandir}/man[78]/*
136
137 %files devel
138 %defattr(644,root,root,755)
139 %{_includedir}/*
140 %{_libdir}/lib*.a
141 %{_pkgconfigdir}/*.pc
142
143 %if %{with gtk2}
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]
150 %endif
This page took 0.134821 seconds and 3 git commands to generate.