2 # - skip interfaces check:
3 # checking for iface getifaddrs...
4 # lo IP=127.0.0.1 NETMASK=255.0.0.0
5 # eth0 IP=x.x.x.x NETMASK=255.255.252.0
6 # - add support for /sbin/ss instead of /bin/netstat (ss uses kernel netlink
7 # which is huge win on server with loads of open tcp sockets)
8 # - patch scripts for pld
9 Summary: A Clustered Database based on Samba's Trivial Database (TDB)
10 Summary(pl.UTF-8): Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
16 URL: http://ctdb.samba.org/
17 # Tarfile created using git
18 # git clone git://git.samba.org/sahlberg/ctdb.git ctdb
20 # git-archive --format=tar --prefix=%{name}-%{version}/ %{name}-%{version} | bzip2 > %{name}-%{version}.tar.bz2
21 Source0: %{name}-%{version}.tar.bz2
22 # Source0-md5: ce3eda943bf81c7c9e513ec715f4a785
23 Patch0: %{name}-version.patch
24 BuildRequires: autoconf >= 2.50
25 BuildRequires: net-tools
26 BuildRequires: popt-devel
27 BuildRequires: rpmbuild(macros) >= 1.268
28 Requires(post,preun): /sbin/chkconfig
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 CTDB is a cluster implementation of the TDB database used by Samba and
38 other projects to store temporary data. If an application is already
39 using TDB for temporary data it is very easy to convert that
40 application to be cluster aware and use CTDB instead.
42 %description -l pl.UTF-8
43 CTDB to klastrowa implementacja bazy danych TDB używanej w Sambie oraz
44 innych projektach do przechowywania danych tymczasowych. Jeśli jakaś
45 aplikacja już wykorzystuje TDB do trzymania danych tymczasowych,
46 bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
49 Summary: CTDB clustered database development package
50 Summary(pl.UTF-8): Pakiet programistyczny klastrowej bazy danych CTDB
51 Group: Development/Libraries
52 # does not require base
55 Header files etc. you can use to develop CTDB applications.
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje
68 CFLAGS="%{rpmcflags} $EXTRA -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{release}\""
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
78 DESTDIR=$RPM_BUILD_ROOT
80 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
81 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
83 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
84 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
86 # Remove "*.old" files
87 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
90 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
91 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
94 rm -rf $RPM_BUILD_ROOT
97 /sbin/chkconfig --add ctdb
101 if [ "$1" -eq "0" ] ; then
103 /sbin/chkconfig --del ctdb
107 %defattr(644,root,root,755)
108 %{_docdir}/ctdb-%{version}
109 %dir %{_sysconfdir}/ctdb
110 %{_sysconfdir}/ctdb/events.d
111 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
112 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
113 %{_sysconfdir}/ctdb/statd-callout
114 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
115 %attr(754,root,root) /etc/rc.d/init.d/ctdb
116 %attr(755,root,root) %{_sbindir}/ctdbd
117 %attr(755,root,root) %{_bindir}/ctdb
118 %attr(755,root,root) %{_bindir}/smnotify
119 %attr(755,root,root) %{_bindir}/ping_pong
120 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
121 %attr(755,root,root) %{_bindir}/onnode
122 %{_mandir}/man1/ctdb.1*
123 %{_mandir}/man1/ctdbd.1*
124 %{_mandir}/man1/onnode.1*
127 %defattr(644,root,root,755)
128 %{_includedir}/ctdb.h
129 %{_includedir}/ctdb_private.h
130 %{_pkgconfigdir}/ctdb.pc