]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
- added version patch to fix generating pkgconfig() Provides
[packages/ctdb.git] / ctdb.spec
1 # TODO
2 # - skip interfaces check:
3 #   checking for iface getifaddrs...
4 #   lo         IP=127.0.0.1 NETMASK=255.0.0.0
5 #   eth0       IP=x.x.x.x NETMASK=255.255.252.0
6 # - add support for /sbin/ss instead of /bin/netstat (ss uses kernel netlink
7 #   which is huge win on server with loads of open tcp sockets)
8 # - patch scripts for pld
9 Summary:        A Clustered Database based on Samba's Trivial Database (TDB)
10 Summary(pl.UTF-8):      Klastrowa baza danych oparta na bazie danych Trivial Database z Samby (TDB)
11 Name:           ctdb
12 Version:        1.0.113
13 Release:        2
14 License:        GPL v3+
15 Group:          Daemons
16 URL:            http://ctdb.samba.org/
17 # Tarfile created using git
18 # git clone git://git.samba.org/sahlberg/ctdb.git ctdb
19 # cd ctdb
20 # git-archive --format=tar --prefix=%{name}-%{version}/ %{name}-%{version} | bzip2 > %{name}-%{version}.tar.bz2
21 Source0:        %{name}-%{version}.tar.bz2
22 # Source0-md5:  ce3eda943bf81c7c9e513ec715f4a785
23 Patch0:         %{name}-version.patch
24 BuildRequires:  autoconf >= 2.50
25 BuildRequires:  net-tools
26 BuildRequires:  popt-devel
27 BuildRequires:  rpmbuild(macros) >= 1.268
28 Requires(post,preun):   /sbin/chkconfig
29 Requires:       coreutils
30 Requires:       psmisc
31 Requires:       rc-scripts
32 Requires:       sed
33 Requires:       tdb
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 CTDB is a cluster implementation of the TDB database used by Samba and
38 other projects to store temporary data. If an application is already
39 using TDB for temporary data it is very easy to convert that
40 application to be cluster aware and use CTDB instead.
41
42 %description -l pl.UTF-8
43 CTDB to klastrowa implementacja bazy danych TDB używanej w Sambie oraz
44 innych projektach do przechowywania danych tymczasowych. Jeśli jakaś
45 aplikacja już wykorzystuje TDB do trzymania danych tymczasowych,
46 bardzo przerobić ją na klastrowalną, wykorzystującą CTDB.
47
48 %package devel
49 Summary:        CTDB clustered database development package
50 Summary(pl.UTF-8):      Pakiet programistyczny klastrowej bazy danych CTDB
51 Group:          Development/Libraries
52 # does not require base
53
54 %description devel
55 Header files etc. you can use to develop CTDB applications.
56
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe i inne, przy użyciu których można tworzyć aplikacje
59 wykorzystujące CTDB.
60
61 %prep
62 %setup -q
63 %patch0 -p1
64
65 %build
66 sh -x ./autogen.sh
67
68 CFLAGS="%{rpmcflags} $EXTRA -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{release}\""
69 %configure
70 %{__make} showflags
71 %{__make}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
76
77 %{__make} install \
78         DESTDIR=$RPM_BUILD_ROOT
79
80 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
81 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
82
83 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
84 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
85
86 # Remove "*.old" files
87 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
88
89 # fix doc path
90 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
91 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post
97 /sbin/chkconfig --add ctdb
98 %service ctdb restart
99
100 %preun
101 if [ "$1" -eq "0" ] ; then
102         %service ctdb stop
103         /sbin/chkconfig --del ctdb
104 fi
105
106 %files
107 %defattr(644,root,root,755)
108 %{_docdir}/ctdb-%{version}
109 %dir %{_sysconfdir}/ctdb
110 %{_sysconfdir}/ctdb/events.d
111 %config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) %{_sysconfdir}/ctdb/notify.sh
112 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
113 %{_sysconfdir}/ctdb/statd-callout
114 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
115 %attr(754,root,root) /etc/rc.d/init.d/ctdb
116 %attr(755,root,root) %{_sbindir}/ctdbd
117 %attr(755,root,root) %{_bindir}/ctdb
118 %attr(755,root,root) %{_bindir}/smnotify
119 %attr(755,root,root) %{_bindir}/ping_pong
120 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
121 %attr(755,root,root) %{_bindir}/onnode
122 %{_mandir}/man1/ctdb.1*
123 %{_mandir}/man1/ctdbd.1*
124 %{_mandir}/man1/onnode.1*
125
126 %files devel
127 %defattr(644,root,root,755)
128 %{_includedir}/ctdb.h
129 %{_includedir}/ctdb_private.h
130 %{_pkgconfigdir}/ctdb.pc
This page took 0.082929 seconds and 3 git commands to generate.