]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
bf0b2572518324874dffaec0af8666691d5d0307
[packages/ctdb.git] / ctdb.spec
1 # TODO
2 # - shared libctdb (not ready in Makefile)
3 # - skip interfaces check:
4 #   checking for iface getifaddrs...
5 #   lo         IP=127.0.0.1 NETMASK=255.0.0.0
6 #   eth0       IP=x.x.x.x NETMASK=255.255.252.0
7 # - add support for /sbin/ss instead of /bin/netstat (ss uses kernel netlink
8 #   which is huge win on server with loads of open tcp sockets)
9 # - patch scripts for pld
10 #
11 # Conditional build:
12 %bcond_without  ibverbs         # InfiniBand support
13 %bcond_without  pcp             # Performance Co-Pilot support
14 #
15 Summary:        A Clustered Database based on Samba's Trivial Database (TDB)
16 Summary(pl.UTF-8):      Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
17 Name:           ctdb
18 Version:        2.1
19 Release:        1
20 License:        GPL v3+
21 Group:          Daemons
22 Source0:        http://www.samba.org/ftp/ctdb/%{name}-%{version}.tar.gz
23 # Source0-md5:  61733cc10b4df20fa35dfd4d2697d8b8
24 Patch0:         %{name}-ib.patch
25 Patch1:         %{name}-pcp.patch
26 Patch2:         %{name}-format.patch
27 URL:            http://ctdb.samba.org/
28 %{?with_pcp:BuildRequires:      pcp-devel}
29 BuildRequires:  popt-devel
30 BuildRequires:  rpmbuild(macros) >= 1.268
31 BuildRequires:  talloc-devel
32 BuildRequires:  tdb-devel
33 BuildRequires:  tevent-devel
34 %if %{with ibverbs}
35 BuildRequires:  libibverbs-devel
36 BuildRequires:  librdmacm-devel
37 %endif
38 Requires(post,preun):   /sbin/chkconfig
39 Requires:       coreutils
40 Requires:       psmisc
41 Requires:       rc-scripts
42 Requires:       sed
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 CTDB is a cluster implementation of the TDB database used by Samba and
47 other projects to store temporary data. If an application is already
48 using TDB for temporary data it is very easy to convert that
49 application to be cluster aware and use CTDB instead.
50
51 %description -l pl.UTF-8
52 CTDB to klastrowa implementacja bazy danych TDB używanej w Sambie oraz
53 innych projektach do przechowywania danych tymczasowych. Jeśli jakaś
54 aplikacja już wykorzystuje TDB do trzymania danych tymczasowych,
55 bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
56
57 %package devel
58 Summary:        CTDB clustered database development package
59 Summary(pl.UTF-8):      Pakiet programistyczny klastrowej bazy danych CTDB
60 Group:          Development/Libraries
61 Requires:       tdb-devel
62 # does not require base
63
64 %description devel
65 Header files etc. you can use to develop CTDB applications.
66
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje
69 wykorzystujące CTDB.
70
71 %package -n pcp-ctdb
72 Summary:        CTDB PMDA
73 Summary(pl.UTF-8):      PMDA CTDB
74 Group:          Applications/System
75 Requires:       %{name} = %{version}-%{release}
76 Requires:       pcp
77
78 %description -n pcp-ctdb
79 This PMDA extracts metrics from the locally running ctdbd daemon for
80 export to PMCD.
81
82 %description -n pcp-ctdb -l pl.UTF-8
83 Ten PMDA odczytuje pomiary z lokalnie działającego demona ctdbd w celu
84 wyeksportowania do PMCD.
85
86 %prep
87 %setup -q
88 %patch0 -p1
89 %patch1 -p1
90 %patch2 -p1
91
92 %build
93 %configure \
94         %{!?with_pcp:ac_cv_header_pcp_pmda_h=no} \
95         %{?with_ibverbs:--enable-infiniband}
96 %{__make} showflags
97 %{__make}
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
102
103 %{__make} install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
107 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
108
109 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
110 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
111
112 # Remove "*.old" files
113 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
114
115 # fix doc path
116 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
117 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post
123 /sbin/chkconfig --add ctdb
124 %service ctdb restart
125
126 %preun
127 if [ "$1" -eq "0" ] ; then
128         %service ctdb stop
129         /sbin/chkconfig --del ctdb
130 fi
131
132 %files
133 %defattr(644,root,root,755)
134 %{_docdir}/ctdb-%{version}
135 %dir %{_sysconfdir}/ctdb
136 %{_sysconfdir}/ctdb/events.d
137 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
138 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug-hung-script.sh
139 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/gcore_trace.sh
140 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
141 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
142 %{_sysconfdir}/ctdb/statd-callout
143 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
144 %attr(754,root,root) /etc/rc.d/init.d/ctdb
145 %attr(755,root,root) %{_sbindir}/ctdbd
146 %attr(755,root,root) %{_bindir}/ctdb
147 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
148 %attr(755,root,root) %{_bindir}/ltdbtool
149 %attr(755,root,root) %{_bindir}/onnode
150 %attr(755,root,root) %{_bindir}/ping_pong
151 %attr(755,root,root) %{_bindir}/smnotify
152 %{_mandir}/man1/ctdb.1*
153 %{_mandir}/man1/ctdbd.1*
154 %{_mandir}/man1/ltdbtool.1*
155 %{_mandir}/man1/onnode.1*
156 %{_mandir}/man1/ping_pong.1*
157
158 %files devel
159 %defattr(644,root,root,755)
160 %{_libdir}/libctdb.a
161 %{_includedir}/ctdb*.h
162 %{_pkgconfigdir}/ctdb.pc
163
164 %files -n pcp-ctdb
165 %defattr(644,root,root,755)
166 %dir /var/lib/pcp/pmdas/ctdb
167 %doc /var/lib/pcp/pmdas/ctdb/README
168 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Install
169 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Remove
170 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/pmdactdb
171 /var/lib/pcp/pmdas/ctdb/domain.h
172 /var/lib/pcp/pmdas/ctdb/help
173 /var/lib/pcp/pmdas/ctdb/pmns
This page took 0.178565 seconds and 3 git commands to generate.