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