]> git.pld-linux.org Git - packages/ctdb.git/blob - ctdb.spec
- df source
[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 Summary:        A Clustered Database based on Samba's Trivial Database (TDB)
7 Name:           ctdb
8 Version:        1.0.113
9 Release:        0.1
10 License:        GPL v3+
11 Group:          Daemons
12 URL:            http://ctdb.samba.org/
13 # Tarfile created using git
14 # git clone git://git.samba.org/sahlberg/ctdb.git ctdb
15 # cd ctdb
16 # git-archive --format=tar --prefix=%{name}-%{version}/ %{name}-%{version} | bzip2 > %{name}-%{version}.tar.bz2
17 Source0:        %{name}-%{version}.tar.bz2
18 # Source0-md5:  ce3eda943bf81c7c9e513ec715f4a785
19 BuildRequires:  autoconf
20 BuildRequires:  net-tools
21 BuildRequires:  rpmbuild(macros) >= 1.268
22 Requires(post,preun):   /sbin/chkconfig
23 Requires:       coreutils
24 Requires:       psmisc
25 Requires:       rc-scripts
26 Requires:       sed
27 Requires:       tdb-tools
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 CTDB is a cluster implementation of the TDB database used by Samba and
32 other projects to store temporary data. If an application is already
33 using TDB for temporary data it is very easy to convert that
34 application to be cluster aware and use CTDB instead.
35
36 %package devel
37 Summary:        CTDB clustered database development package
38 Group:          Development/Libraries
39 Requires:       %{name} = %{version}-%{release}
40
41 %description devel
42 Libraries, include files, etc you can use to develop CTDB
43 applications. CTDB is a cluster implementation of the TDB database
44 used by Samba and other projects to store temporary data. If an
45 application is already using TDB for temporary data it is very easy to
46 convert that application to be cluster aware and use CTDB instead.
47
48 %prep
49 %setup -q
50
51 %build
52 sh -x ./autogen.sh
53
54 CFLAGS="%{rpmcflags} $EXTRA -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{release}\""
55 %configure
56 %{__make} showflags
57 %{__make}
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
62
63 %{__make} install \
64         DESTDIR=$RPM_BUILD_ROOT
65
66 cp -a config/ctdb.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/ctdb
67 install -p config/ctdb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ctdb
68
69 install -d $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
70 install -p tests/bin/ctdb_transaction $RPM_BUILD_ROOT%{_docdir}/ctdb/tests/bin
71
72 # Remove "*.old" files
73 find $RPM_BUILD_ROOT -name "*.old" -exec rm -fv {} ';'
74
75 # fix doc path
76 mv $RPM_BUILD_ROOT%{_docdir}/ctdb $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
77 cp -a web $RPM_BUILD_ROOT%{_docdir}/ctdb-%{version}
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %post
83 /sbin/chkconfig --add ctdb
84 %service ctdb restart
85
86 %preun
87 if [ "$1" -eq "0" ] ; then
88         %service ctdb stop
89         /sbin/chkconfig --del ctdb
90 fi
91
92 %files
93 %defattr(644,root,root,755)
94 %{_docdir}/ctdb-%{version}
95 %dir %{_sysconfdir}/ctdb
96 %{_sysconfdir}/ctdb/events.d
97 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/notify.sh
98 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ctdb/functions
99 %{_sysconfdir}/ctdb/statd-callout
100 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ctdb
101 %attr(754,root,root) /etc/rc.d/init.d/ctdb
102 %attr(755,root,root) %{_sbindir}/ctdbd
103 %attr(755,root,root) %{_bindir}/ctdb
104 %attr(755,root,root) %{_bindir}/smnotify
105 %attr(755,root,root) %{_bindir}/ping_pong
106 %attr(755,root,root) %{_bindir}/ctdb_diagnostics
107 %attr(755,root,root) %{_bindir}/onnode
108 %{_mandir}/man1/ctdb.1*
109 %{_mandir}/man1/ctdbd.1*
110 %{_mandir}/man1/onnode.1*
111
112 %files devel
113 %defattr(644,root,root,755)
114 %{_includedir}/ctdb.h
115 %{_includedir}/ctdb_private.h
116 %{_pkgconfigdir}/ctdb.pc
This page took 0.812981 seconds and 3 git commands to generate.