]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
- updated to 2.0
[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 # - patch scripts for pld
9 #
10 # Conditional build:
11 %bcond_without  ibverbs         # InfiniBand support
12 #
13 Summary:        A Clustered Database based on Samba's Trivial Database (TDB)
14 Summary(pl.UTF-8):      Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
15 Name:           ctdb
16 Version:        2.0
17 Release:        1
18 License:        GPL v3+
19 Group:          Daemons
20 Source0:        http://www.samba.org/ftp/ctdb/%{name}-%{version}.tar.gz
21 # Source0-md5:  89a397e165e7f5347f06a6cf45fd6b60
22 Patch0:         %{name}-ib.patch
23 URL:            http://ctdb.samba.org/
24 BuildRequires:  popt-devel
25 BuildRequires:  rpmbuild(macros) >= 1.268
26 BuildRequires:  talloc-devel
27 BuildRequires:  tdb-devel
28 BuildRequires:  tevent-devel
29 %if %{with ibverbs}
30 BuildRequires:  libibverbs-devel
31 BuildRequires:  librdmacm-devel
32 %endif
33 Requires(post,preun):   /sbin/chkconfig
34 Requires:       coreutils
35 Requires:       psmisc
36 Requires:       rc-scripts
37 Requires:       sed
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 CTDB is a cluster implementation of the TDB database used by Samba and
42 other projects to store temporary data. If an application is already
43 using TDB for temporary data it is very easy to convert that
44 application to be cluster aware and use CTDB instead.
45
46 %description -l pl.UTF-8
47 CTDB to klastrowa implementacja bazy danych TDB używanej w Sambie oraz
48 innych projektach do przechowywania danych tymczasowych. Jeśli jakaś
49 aplikacja już wykorzystuje TDB do trzymania danych tymczasowych,
50 bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
51
52 %package devel
53 Summary:        CTDB clustered database development package
54 Summary(pl.UTF-8):      Pakiet programistyczny klastrowej bazy danych CTDB
55 Group:          Development/Libraries
56 Requires:       tdb-devel
57 # does not require base
58
59 %description devel
60 Header files etc. you can use to develop CTDB applications.
61
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje
64 wykorzystujące CTDB.
65
66 %prep
67 %setup -q
68 %patch0 -p1
69
70 %build
71 %configure \
72         %{?with_ibverbs:--enable-infiniband}
73 %{__make} showflags
74 %{__make}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
79
80 %{__make} install \
81         DESTDIR=$RPM_BUILD_ROOT
82
83 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
84 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
85
86 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
87 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
88
89 # Remove "*.old" files
90 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
91
92 # fix doc path
93 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
94 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post
100 /sbin/chkconfig --add ctdb
101 %service ctdb restart
102
103 %preun
104 if [ "$1" -eq "0" ] ; then
105         %service ctdb stop
106         /sbin/chkconfig --del ctdb
107 fi
108
109 %files
110 %defattr(644,root,root,755)
111 %{_docdir}/ctdb-%{version}
112 %dir %{_sysconfdir}/ctdb
113 %{_sysconfdir}/ctdb/events.d
114 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh
115 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/debug-hung-script.sh
116 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/gcore_trace.sh
117 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
118 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
119 %{_sysconfdir}/ctdb/statd-callout
120 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
121 %attr(754,root,root) /etc/rc.d/init.d/ctdb
122 %attr(755,root,root) %{_sbindir}/ctdbd
123 %attr(755,root,root) %{_bindir}/ctdb
124 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
125 %attr(755,root,root) %{_bindir}/ltdbtool
126 %attr(755,root,root) %{_bindir}/onnode
127 %attr(755,root,root) %{_bindir}/ping_pong
128 %attr(755,root,root) %{_bindir}/smnotify
129 %{_mandir}/man1/ctdb.1*
130 %{_mandir}/man1/ctdbd.1*
131 %{_mandir}/man1/ltdbtool.1*
132 %{_mandir}/man1/onnode.1*
133 %{_mandir}/man1/ping_pong.1*
134
135 %files devel
136 %defattr(644,root,root,755)
137 %{_libdir}/libctdb.a
138 %{_includedir}/ctdb*.h
139 %{_pkgconfigdir}/ctdb.pc
This page took 0.063195 seconds and 4 git commands to generate.