]>
Commit | Line | Data |
---|---|---|
0194a002 ER |
1 | # TODO |
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 | |
14010407 ER |
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 | |
0194a002 | 9 | Summary: A Clustered Database based on Samba's Trivial Database (TDB) |
12c08eb2 | 10 | Summary(pl.UTF-8): Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB) |
0194a002 ER |
11 | Name: ctdb |
12 | Version: 1.0.113 | |
c63e09ab | 13 | Release: 2 |
0194a002 ER |
14 | License: GPL v3+ |
15 | Group: Daemons | |
16 | URL: http://ctdb.samba.org/ | |
17 | # Tarfile created using git | |
18 | # git clone git://git.samba.org/sahlberg/ctdb.git ctdb | |
19 | # cd ctdb | |
20 | # git-archive --format=tar --prefix=%{name}-%{version}/ %{name}-%{version} | bzip2 > %{name}-%{version}.tar.bz2 | |
21 | Source0: %{name}-%{version}.tar.bz2 | |
85deb581 | 22 | # Source0-md5: ce3eda943bf81c7c9e513ec715f4a785 |
c63e09ab | 23 | Patch0: %{name}-version.patch |
12c08eb2 | 24 | BuildRequires: autoconf >= 2.50 |
0194a002 | 25 | BuildRequires: net-tools |
12c08eb2 | 26 | BuildRequires: popt-devel |
0194a002 ER |
27 | BuildRequires: rpmbuild(macros) >= 1.268 |
28 | Requires(post,preun): /sbin/chkconfig | |
29 | Requires: coreutils | |
30 | Requires: psmisc | |
31 | Requires: rc-scripts | |
32 | Requires: sed | |
364b344b | 33 | Requires: tdb |
0194a002 ER |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %description | |
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. | |
41 | ||
12c08eb2 JB |
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. | |
47 | ||
0194a002 ER |
48 | %package devel |
49 | Summary: CTDB clustered database development package | |
12c08eb2 | 50 | Summary(pl.UTF-8): Pakiet programistyczny klastrowej bazy danych CTDB |
0194a002 | 51 | Group: Development/Libraries |
14010407 | 52 | # does not require base |
0194a002 ER |
53 | |
54 | %description devel | |
12c08eb2 JB |
55 | Header files etc. you can use to develop CTDB applications. |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje | |
59 | wykorzystujące CTDB. | |
0194a002 ER |
60 | |
61 | %prep | |
62 | %setup -q | |
c63e09ab | 63 | %patch0 -p1 |
0194a002 ER |
64 | |
65 | %build | |
66 | sh -x ./autogen.sh | |
67 | ||
68 | CFLAGS="%{rpmcflags} $EXTRA -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{release}\"" | |
69 | %configure | |
70 | %{__make} showflags | |
71 | %{__make} | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} | |
76 | ||
77 | %{__make} install \ | |
78 | DESTDIR=$RPM_BUILD_ROOT | |
79 | ||
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 | |
82 | ||
83 | install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin | |
84 | install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin | |
85 | ||
86 | # Remove "*.old" files | |
85deb581 | 87 | find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';' |
0194a002 ER |
88 | |
89 | # fix doc path | |
90 | mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version} | |
91 | cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version} | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post | |
97 | /sbin/chkconfig --add ctdb | |
85deb581 | 98 | %service ctdb restart |
0194a002 ER |
99 | |
100 | %preun | |
101 | if [ "$1" -eq "0" ] ; then | |
102 | %service ctdb stop | |
103 | /sbin/chkconfig --del ctdb | |
104 | fi | |
105 | ||
0194a002 ER |
106 | %files |
107 | %defattr(644,root,root,755) | |
108 | %{_docdir}/ctdb-%{version} | |
109 | %dir %{_sysconfdir}/ctdb | |
110 | %{_sysconfdir}/ctdb/events.d | |
14010407 | 111 | %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh |
0194a002 ER |
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* | |
125 | ||
126 | %files devel | |
127 | %defattr(644,root,root,755) | |
128 | %{_includedir}/ctdb.h | |
129 | %{_includedir}/ctdb_private.h | |
130 | %{_pkgconfigdir}/ctdb.pc |