Search
j0ke.net Open Build Service
>
Projects
>
ha
:
testing
>
csync2-20
> csync2.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File csync2.spec of Package csync2-20 (Revision 8)
Currently displaying revision
8
,
show latest
# csync2 - cluster synchronization tool, 2nd generation # LINBIT Information Technologies GmbH <http://www.linbit.com> # Copyright (C) 2004, 2005 Clifford Wolf <clifford@clifford.at> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # spec file for package csync2 (Version 2.0) # # norootforbuild # neededforbuild librsync openssl openssl-devel glibc-devel libgcc gcc gcc-c++ bison flex %define gitversion 2.0 BuildRequires: -post-build-checks BuildRequires: sqlite-devel sqlite librsync openssl-devel glibc-devel libgcc gcc gcc-c++ bison flex gnutls gnutls-devel libtasn1-devel libtasn1 file BuildRequires: autoconf automake libtool pkgconfig %if 0%{?suse_version} >= 1100 BuildRequires: libgnutls-devel %endif %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} || 0%{?suse_version} < 1100 BuildRequires: gnutls-devel %endif Requires: librsync openssl file logrotate Name: csync2 License: GPL Group: System/Monitoring Requires: sqlite sqlite-devel openssl librsync Autoreqprov: on Version: 2.0 Release: 1 Source0: csync2-%{gitversion}.tar.bz2 Source2: create_csync2_ssl.sh Source3: paper.pdf Source4: csync2.logrotate Source5: csync2.cron URL: http://oss.linbit.com/csync2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Cluster sync tool %description Csync2 is a cluster synchronization tool. It can be used to keep files on multiple hosts in a cluster in sync. Csync2 can handle complex setups with much more than just 2 hosts, handle file deletions and can detect conflicts. It is expedient for HA-clusters, HPC-clusters, COWs and server farms. Authors: -------- Clifford Wolf <clifford.wolf@linbit.com> %prep %setup -n %{name}-%{gitversion} %{?suse_update_config:%{suse_update_config}} autoreconf -fi %build export CFLAGS="$RPM_OPT_FLAGS -I/usr/kerberos/include" if ! [ -f configure ]; then ./autogen.sh; fi %configure && cat config.h %__make all %install [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p $RPM_BUILD_ROOT%{_var}/lib/csync2 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.d mkdir -p $RPM_BUILD_ROOT/var/backups/csync2 %__make DESTDIR=%{buildroot} install %__install -m 755 %{S:2} $RPM_BUILD_ROOT%{_sbindir}/csync2_create_ssl.sh %__install -m 644 %{S:3} paper.pdf %__install -m 644 csync2.xinetd $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/csync2 %__install -m 644 %{S:4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/csync2 %__install -m 644 %{S:5} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/csync2 rm -rf %{buildroot}/usr/share/doc/csync2 %clean [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT make clean %post if ! grep -q "^csync2" %{_sysconfdir}/services ; then echo "csync2 30865/tcp" >>%{_sysconfdir}/services fi if [ $1 == 2 ] ; then for DB in `ls -1A /var/lib/csync2/*.db 2>/dev/null` ; do # find sqlite2 databases file ${DB} | grep -i "sqlite 2" >/dev/null if [ $? == 0 ] ; then # save sqlite2 databases mv ${DB} ${DB}.rpmsave # migrate sqlite2 databases to sqlite3 if [ -x %{_sbindir}/csync2-sqlite2 ] && [ -x %{_bindir}/sqlite3 ] ; then %{_sbindir}/csync2-sqlite2 ${DB}.rpmsave .dump | %{_bindir}/sqlite3 ${DB}3 fi elif [ ! -f ${DB}3 ] ; then mv ${DB} ${DB}3 fi done fi %files %defattr(-,root,root) %doc ChangeLog README NEWS INSTALL AUTHORS paper.pdf %{_sbindir}/csync2 %{_sbindir}/csync2-compare %{_sbindir}/csync2_create_ssl.sh %{_var}/lib/csync2 %{_mandir}/man1/csync2.1.gz %config(noreplace) %{_sysconfdir}/xinetd.d/csync2 %config(noreplace) %{_sysconfdir}/csync2.cfg %config %{_sysconfdir}/logrotate.d/csync2 %config %{_sysconfdir}/cron.d/csync2 %dir /var/backups %dir /var/backups/csync2 %changelog