2 # - pcp support (pcp/{pmapi,impl,pmda}.h)
3 # - shared libctdb (not ready in Makefile)
4 # - skip interfaces check:
5 # checking for iface getifaddrs...
6 # lo IP=127.0.0.1 NETMASK=255.0.0.0
7 # eth0 IP=x.x.x.x NETMASK=255.255.252.0
8 # - patch scripts for pld
11 %bcond_without ibverbs # InfiniBand support
13 Summary: A Clustered Database based on Samba's Trivial Database (TDB)
14 Summary(pl.UTF-8): Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
20 Source0: http://www.samba.org/ftp/ctdb/%{name}-%{version}.tar.gz
21 # Source0-md5: 89a397e165e7f5347f06a6cf45fd6b60
22 Patch0: %{name}-ib.patch
23 URL: http://ctdb.samba.org/
24 BuildRequires: popt-devel
25 BuildRequires: rpmbuild(macros) >= 1.268
26 BuildRequires: talloc-devel
27 BuildRequires: tdb-devel
28 BuildRequires: tevent-devel
30 BuildRequires: libibverbs-devel
31 BuildRequires: librdmacm-devel
33 Requires(post,preun): /sbin/chkconfig
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 CTDB is a cluster implementation of the TDB database used by Samba and
42 other projects to store temporary data. If an application is already
43 using TDB for temporary data it is very easy to convert that
44 application to be cluster aware and use CTDB instead.
46 %description -l pl.UTF-8
47 CTDB to klastrowa implementacja bazy danych TDB używanej w Sambie oraz
48 innych projektach do przechowywania danych tymczasowych. Jeśli jakaś
49 aplikacja już wykorzystuje TDB do trzymania danych tymczasowych,
50 bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
53 Summary: CTDB clustered database development package
54 Summary(pl.UTF-8): Pakiet programistyczny klastrowej bazy danych CTDB
55 Group: Development/Libraries
57 # does not require base
60 Header files etc. you can use to develop CTDB applications.
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje
72 %{?with_ibverbs:--enable-infiniband}
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
81 DESTDIR=$RPM_BUILD_ROOT
83 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
84 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
86 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
87 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
89 # Remove "*.old" files
90 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
93 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
94 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
97 rm -rf $RPM_BUILD_ROOT
100 /sbin/chkconfig --add ctdb
101 %service ctdb restart
104 if [ "$1" -eq "0" ] ; then
106 /sbin/chkconfig --del ctdb
110 %defattr(644,root,root,755)
111 %{_docdir}/ctdb-%{version}
112 %dir %{_sysconfdir}/ctdb
113 %{_sysconfdir}/ctdb/events.d
114 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
115 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug-hung-script.sh
116 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/gcore_trace.sh
117 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
118 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
119 %{_sysconfdir}/ctdb/statd-callout
120 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
121 %attr(754,root,root) /etc/rc.d/init.d/ctdb
122 %attr(755,root,root) %{_sbindir}/ctdbd
123 %attr(755,root,root) %{_bindir}/ctdb
124 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
125 %attr(755,root,root) %{_bindir}/ltdbtool
126 %attr(755,root,root) %{_bindir}/onnode
127 %attr(755,root,root) %{_bindir}/ping_pong
128 %attr(755,root,root) %{_bindir}/smnotify
129 %{_mandir}/man1/ctdb.1*
130 %{_mandir}/man1/ctdbd.1*
131 %{_mandir}/man1/ltdbtool.1*
132 %{_mandir}/man1/onnode.1*
133 %{_mandir}/man1/ping_pong.1*
136 %defattr(644,root,root,755)
138 %{_includedir}/ctdb*.h
139 %{_pkgconfigdir}/ctdb.pc