]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
57d83ace134fb7f52bf5140a968bc45dffe3d9be
[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.4
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:  0cfd24a056f0dbffc8ca64a2373f084c
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},%{systemdunitdir}}
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 cp -p config/ctdb.service $RPM_BUILD_ROOT%{systemdunitdir}
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 %{_sysconfdir}/ctdb/nfs-rpc-checks.d
137 %{_sysconfdir}/ctdb/notify.d
138 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
139 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug-hung-script.sh
140 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug_locks.sh
141 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/gcore_trace.sh
142 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
143 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
144 %{_sysconfdir}/ctdb/statd-callout
145 %attr(755,root,root) %{_sbindir}/ctdbd
146 %attr(755,root,root) %{_sbindir}/ctdbd_wrapper
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 %{systemdunitdir}/ctdb.service
155 %attr(754,root,root) /etc/rc.d/init.d/ctdb
156 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
157 %attr(440,root,root) /etc/sudoers.d/ctdb
158 %{_mandir}/man1/ctdb.1*
159 %{_mandir}/man1/ctdbd.1*
160 %{_mandir}/man1/ltdbtool.1*
161 %{_mandir}/man1/onnode.1*
162 %{_mandir}/man1/ping_pong.1*
163
164 %files devel
165 %defattr(644,root,root,755)
166 %{_libdir}/libctdb.a
167 %{_includedir}/ctdb*.h
168 %{_pkgconfigdir}/ctdb.pc
169
170 %files -n pcp-ctdb
171 %defattr(644,root,root,755)
172 %dir /var/lib/pcp/pmdas/ctdb
173 %doc /var/lib/pcp/pmdas/ctdb/README
174 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Install
175 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/Remove
176 %attr(755,root,root) /var/lib/pcp/pmdas/ctdb/pmdactdb
177 /var/lib/pcp/pmdas/ctdb/domain.h
178 /var/lib/pcp/pmdas/ctdb/help
179 /var/lib/pcp/pmdas/ctdb/pmns
This page took 0.124215 seconds and 3 git commands to generate.