]> git.pld-linux.org Git - packages/ocfs2-tools.git/blob - ocfs2-tools.spec
- release 3
[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.4
9 Release:        3
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:  f7ae245e8baa499aa56d7af25a7885d5
14 Source1:        ocfs2.init
15 Source2:        o2cb.init
16 Source3:        o2cb.sysconfig
17 Patch0:         %{name}-tinfo.patch
18 Patch1:         %{name}-vla-initializer.patch
19 URL:            http://oss.oracle.com/projects/ocfs2-tools/
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  cman-devel
23 BuildRequires:  device-mapper-devel
24 BuildRequires:  e2fsprogs-devel
25 BuildRequires:  glib2-devel >= 2.2.3
26 BuildRequires:  libuuid-devel
27 BuildRequires:  ncurses-devel
28 BuildRequires:  openais-devel
29 BuildRequires:  pkgconfig
30 %{?with_gtk2:BuildRequires:     python-devel}
31 %{?with_gtk2:BuildRequires:     python-pygtk-gtk}
32 BuildRequires:  readline-devel
33 BuildRequires:  rpm-pythonprov
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 %define         filterout_ld    -Wl,--as-needed
42
43 %description
44 Tools and support files for creating and managing OCFS2 volumes.
45
46 %description -l pl.UTF-8
47 Narzędzia do tworzenia i zarządzania wolumenami OCFS2.
48
49 %package devel
50 Summary:        Header files and develpment documentation for ocfs2-tools
51 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumetacja do ocfs2-tools
52 Group:          Development/Libraries
53
54 %description devel
55 Header files and develpment documentation for ocfs2-tools.
56
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe i dokumetacja do ocfs2-tools.
59
60 %package gtk
61 Summary:        GTK+ interface to OCFS2 Tools
62 Summary(pl.UTF-8):      Interfejs GTK+ do narzędzi OCFS2
63 Group:          X11/Applications
64 Requires:       %{name} = %{version}-%{release}
65 Requires:       python-pygtk-gtk
66
67 %description gtk
68 GTK+ interface to OCFS2 Tools.
69
70 %description gtk -l pl.UTF-8
71 Interfejs GTK+ do narzędzi OCFS2.
72
73 %prep
74 %setup -q
75 %patch0 -p1
76 %patch1 -p1
77
78 %build
79 %{__aclocal} -I .
80 %{__autoconf}
81
82 %configure \
83         --enable-dynamic-fsck=yes \
84         --enable-dynamic-ctl=yes \
85         %{?with_gtk2:--enable-ocfs2console=yes}
86
87 %{__make} -j1
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
92
93 %{__make} install \
94         DESTDIR=$RPM_BUILD_ROOT
95
96 install -D documentation/samples/cluster.conf $RPM_BUILD_ROOT%{_sysconfdir}/ocfs2/cluster.conf
97 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ocfs2
98 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/o2cb
99 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/o2cb
100 install -d $RPM_BUILD_ROOT/dlm
101
102 %if %{with gtk2}
103 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
104 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
105 rm $RPM_BUILD_ROOT%{py_sitedir}/ocfs2interface/*.py
106 %endif
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %post
112 /sbin/ldconfig
113 /sbin/chkconfig --add o2cb
114 /sbin/chkconfig --add ocfs2
115 %service o2cb restart
116 %service ocfs2 restart
117
118 %preun
119 if [ "$1" = "0" ]; then
120         %service -q ocfs2 stop
121         %service -q o2cb stop
122         /sbin/chkconfig --del ocfs2
123         /sbin/chkconfig --del o2cb
124 fi
125
126 %postun -p /sbin/ldconfig
127
128 %files
129 %defattr(644,root,root,755)
130 %doc documentation/*.txt
131 %attr(754,root,root) /etc/rc.d/init.d/o2cb
132 %attr(754,root,root) /etc/rc.d/init.d/ocfs2
133 %attr(755,root,root) /sbin/*
134 %dir %{_sysconfdir}/ocfs2
135 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ocfs2/cluster.conf
136 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/o2cb
137 %dir /dlm
138 %{_mandir}/man[78]/*
139
140 %files devel
141 %defattr(644,root,root,755)
142 %{_includedir}/*
143 %{_libdir}/lib*.a
144 %{_pkgconfigdir}/*.pc
145
146 %if %{with gtk2}
147 %files gtk
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_sbindir}/*
150 %dir %{py_sitedir}/ocfs2interface
151 %attr(755,root,root) %{py_sitedir}/ocfs2interface/*.so
152 %{py_sitedir}/ocfs2interface/*.py[co]
153 %endif
This page took 0.081748 seconds and 3 git commands to generate.