]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
ea51daae774298730bf05bb5efef9306c49251df
[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.2
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:  c5aa3c887d1cb1eb2cfd84bb22c3d142
24 Patch0:         %{name}-ib.patch
25 Patch1:         %{name}-format.patch
26 URL:            http://ctdb.samba.org/
27 %{?with_pcp:BuildRequires:      pcp-devel}
28 BuildRequires:  popt-devel
29 BuildRequires:  rpmbuild(macros) >= 1.268
30 BuildRequires:  talloc-devel
31 BuildRequires:  tdb-devel
32 BuildRequires:  tevent-devel
33 %if %{with ibverbs}
34 BuildRequires:  libibverbs-devel
35 BuildRequires:  librdmacm-devel
36 %endif
37 Requires(post,preun):   /sbin/chkconfig
38 Requires:       coreutils
39 Requires:       psmisc
40 Requires:       rc-scripts
41 Requires:       sed
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 CTDB is a cluster implementation of the TDB database used by Samba and
46 other projects to store temporary data. If an application is already
47 using TDB for temporary data it is very easy to convert that
48 application to be cluster aware and use CTDB instead.
49
50 %description -l pl.UTF-8
51 CTDB to klastrowa implementacja bazy danych TDB używanej w Sambie oraz
52 innych projektach do przechowywania danych tymczasowych. Jeśli jakaś
53 aplikacja już wykorzystuje TDB do trzymania danych tymczasowych,
54 bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
55
56 %package devel
57 Summary:        CTDB clustered database development package
58 Summary(pl.UTF-8):      Pakiet programistyczny klastrowej bazy danych CTDB
59 Group:          Development/Libraries
60 Requires:       tdb-devel
61 # does not require base
62
63 %description devel
64 Header files etc. you can use to develop CTDB applications.
65
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje
68 wykorzystujące CTDB.
69
70 %package -n pcp-ctdb
71 Summary:        CTDB PMDA
72 Summary(pl.UTF-8):      PMDA CTDB
73 Group:          Applications/System
74 Requires:       %{name} = %{version}-%{release}
75 Requires:       pcp
76
77 %description -n pcp-ctdb
78 This PMDA extracts metrics from the locally running ctdbd daemon for
79 export to PMCD.
80
81 %description -n pcp-ctdb -l pl.UTF-8
82 Ten PMDA odczytuje pomiary z lokalnie działającego demona ctdbd w celu
83 wyeksportowania do PMCD.
84
85 %prep
86 %setup -q
87 %patch0 -p1
88 %patch1 -p1
89
90 %build
91 %configure \
92         %{?with_pcp:--enable-pmda} \
93         %{?with_ibverbs:--enable-infiniband}
94 %{__make} showflags
95 %{__make}
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
100
101 %{__make} install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
105 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
106
107 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
108 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
109
110 # Remove "*.old" files
111 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
112
113 # fix doc path
114 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
115 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %post
121 /sbin/chkconfig --add ctdb
122 %service ctdb restart
123
124 %preun
125 if [ "$1" -eq "0" ] ; then
126         %service ctdb stop
127         /sbin/chkconfig --del ctdb
128 fi
129
130 %files
131 %defattr(644,root,root,755)
132 %{_docdir}/ctdb-%{version}
133 %dir %{_sysconfdir}/ctdb
134 %{_sysconfdir}/ctdb/events.d
135 %{_sysconfdir}/ctdb/nfs-rpc-checks.d
136 %{_sysconfdir}/ctdb/notify.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(440,root,root) /etc/sudoers.d/ctdb
146 %attr(755,root,root) %{_sbindir}/ctdbd
147 %attr(755,root,root) %{_bindir}/ctdb
148 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
149 %attr(755,root,root) %{_bindir}/ctdb_lock_helper
150 %attr(755,root,root) %{_bindir}/ltdbtool
151 %attr(755,root,root) %{_bindir}/onnode
152 %attr(755,root,root) %{_bindir}/ping_pong
153 %attr(755,root,root) %{_bindir}/smnotify
154 %{_mandir}/man1/ctdb.1*
155 %{_mandir}/man1/ctdbd.1*
156 %{_mandir}/man1/ltdbtool.1*
157 %{_mandir}/man1/onnode.1*
158 %{_mandir}/man1/ping_pong.1*
159
160 %files devel
161 %defattr(644,root,root,755)
162 %{_libdir}/libctdb.a
163 %{_includedir}/ctdb*.h
164 %{_pkgconfigdir}/ctdb.pc
165
166 %files -n pcp-ctdb
167 %defattr(644,root,root,755)
168 %dir /var/lib/pcp/pmdas/ctdb
169 %doc /var/lib/pcp/pmdas/ctdb/README
170 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Install
171 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Remove
172 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/pmdactdb
173 /var/lib/pcp/pmdas/ctdb/domain.h
174 /var/lib/pcp/pmdas/ctdb/help
175 /var/lib/pcp/pmdas/ctdb/pmns
This page took 0.054936 seconds and 2 git commands to generate.