]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
7b9ffd5b56fe8832c5dc9066f5fb14024fd430e4
[packages/ctdb.git] / ctdb.spec
1 # TODO
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 # - add support for /sbin/ss instead of /bin/netstat (ss uses kernel netlink
9 #   which is huge win on server with loads of open tcp sockets)
10 # - patch scripts for pld
11 #
12 # Conditional build:
13 %bcond_without  ibverbs         # InfiniBand support
14 %bcond_without  pcp             # Performance Co-Pilot support
15 #
16 Summary:        A Clustered Database based on Samba's Trivial Database (TDB)
17 Summary(pl.UTF-8):      Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
18 Name:           ctdb
19 Version:        2.0
20 Release:        1
21 License:        GPL v3+
22 Group:          Daemons
23 Source0:        http://www.samba.org/ftp/ctdb/%{name}-%{version}.tar.gz
24 # Source0-md5:  89a397e165e7f5347f06a6cf45fd6b60
25 Patch0:         %{name}-ib.patch
26 Patch1:         %{name}-pcp.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
91 %build
92 %configure \
93         %{!?with_pcp:ac_cv_header_pcp_pmda_h=no} \
94         %{?with_ibverbs:--enable-infiniband}
95 %{__make} showflags
96 %{__make}
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
101
102 %{__make} install \
103         DESTDIR=$RPM_BUILD_ROOT
104
105 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
106 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
107
108 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
109 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
110
111 # Remove "*.old" files
112 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
113
114 # fix doc path
115 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
116 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %post
122 /sbin/chkconfig --add ctdb
123 %service ctdb restart
124
125 %preun
126 if [ "$1" -eq "0" ] ; then
127         %service ctdb stop
128         /sbin/chkconfig --del ctdb
129 fi
130
131 %files
132 %defattr(644,root,root,755)
133 %{_docdir}/ctdb-%{version}
134 %dir %{_sysconfdir}/ctdb
135 %{_sysconfdir}/ctdb/events.d
136 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
137 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug-hung-script.sh
138 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/gcore_trace.sh
139 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
140 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
141 %{_sysconfdir}/ctdb/statd-callout
142 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
143 %attr(754,root,root) /etc/rc.d/init.d/ctdb
144 %attr(755,root,root) %{_sbindir}/ctdbd
145 %attr(755,root,root) %{_bindir}/ctdb
146 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
147 %attr(755,root,root) %{_bindir}/ltdbtool
148 %attr(755,root,root) %{_bindir}/onnode
149 %attr(755,root,root) %{_bindir}/ping_pong
150 %attr(755,root,root) %{_bindir}/smnotify
151 %{_mandir}/man1/ctdb.1*
152 %{_mandir}/man1/ctdbd.1*
153 %{_mandir}/man1/ltdbtool.1*
154 %{_mandir}/man1/onnode.1*
155 %{_mandir}/man1/ping_pong.1*
156
157 %files devel
158 %defattr(644,root,root,755)
159 %{_libdir}/libctdb.a
160 %{_includedir}/ctdb*.h
161 %{_pkgconfigdir}/ctdb.pc
162
163 %files -n pcp-ctdb
164 %defattr(644,root,root,755)
165 %dir /var/lib/pcp/pmdas/ctdb
166 %doc /var/lib/pcp/pmdas/ctdb/README
167 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Install
168 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Remove
169 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/pmdactdb
170 /var/lib/pcp/pmdas/ctdb/domain.h
171 /var/lib/pcp/pmdas/ctdb/help
172 /var/lib/pcp/pmdas/ctdb/pmns
This page took 0.096313 seconds and 3 git commands to generate.