File csync.spec of Package csync

#
# spec file for package csync (Version 0.43.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           csync
BuildRequires:  cmake doxygen gcc-c++ libiniparser-devel liblog4c-devel
BuildRequires:  libsmbclient-devel
%if 0%{?opensuse_bs}
BuildRequires:  libssh-devel
%endif
%if 0%{?suse_version}
BuildRequires:  sqlite3-devel
%else
BuildRequires:  sqlite-devel
%endif
License:        GPL v2 or later
Group:          Productivity/Networking/Other
Version:        0.43.0
Release:        1
Summary:        A user level bidirectional client only file synchronizer
Url:            http://www.csync.org/
Source0:        %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
csync is an implementation of a file synchronizer which provides the
feature of roaming home directories for Linux clients. csync makes use
of libsmbclient in Samba/Windows environments.



Authors:
--------
    Andreas Schneider <mail@cynapses.org>

%package -n libcsync0
License:        GPL v2 or later
Summary:        A user level bidirectional client only file synchronizer
Group:          System/Libraries
%if 0%{?suse_version} > 1030
Recommends:     libcsync-plugin-smb
Recommends:     libcsync-plugin-sftp
%endif

%description -n libcsync0
csync is an implementation of a file synchronizer which provides the
feature of roaming home directories for Linux clients. csync makes use
of libsmbclient in Samba/Windows environments.



Authors:
--------
    Andreas Schneider <mail@cynapses.org>

%package -n libcsync-plugin-smb
License:        GPL v2 or later
Summary:        SMB plugin for csync
Group:          System/Libraries
Requires:       libcsync0 = %{version}

%description -n libcsync-plugin-smb
This plug-in allows applications using csync to synchronize with a
Samba or Windows server.



Authors:
--------
    Andreas Schneider <mail@cynapses.org>

%if 0%{?opensuse_bs}

%package -n libcsync-plugin-sftp
License:        GPL v2 or later
Summary:        A user level bidirectional client only file synchronizer
Group:          Productivity/Networking/Other
Requires:       libcsync0 = %{version}

%description -n libcsync-plugin-sftp
csync is an implementation of a file synchronizer which provides the
feature of roaming home directories for Linux clients. csync makes use
of libsmbclient in Samba/Windows environments.



Authors:
--------
    Andreas Schneider <mail@cynapses.org>

%endif

%package -n libcsync-devel
License:        GPL v2 or later
Summary:        Development files for csync
Group:          Development/Libraries/C and C++
Requires:       libcsync0 = %{version}

%description -n libcsync-devel
The libcsync-devel package contains the static libraries and header
files needed for development with csync.



Authors:
--------
    Andreas Schneider <mail@cynapses.org>

%package -n libcsync-devel-doc
License:        GPL v2 or later
Summary:        Developer documentation for csync
Group:          Development/Languages/C and C++

%description -n libcsync-devel-doc
The libcsync-devel-doc package provides documentation for csync
development.



Authors:
--------
    Andreas Schneider <mail@cynapses.org>

%package -n libcsync-doc
License:        GPL v2 or later
Summary:        User documentation for csync
Group:          Development/Languages/C and C++

%description -n libcsync-doc
The libcsync-doc package provides user documentation for csync.



Authors:
--------
    Andreas Schneider <mail@cynapses.org>

%prep
%setup -q

%build
if test ! -e "build"; then
  %{__mkdir} build
fi
pushd build
cmake \
  -DCMAKE_C_FLAGS:STRING="%{optflags}" \
  -DCMAKE_CXX_FLAGS:STRING="%{optflags}" \
  -DCMAKE_SKIP_RPATH=ON \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  -DSYSCONF_INSTALL_DIR=%{_sysconfdir} \
%if %{_lib} == lib64
  -DLIB_SUFFIX=64 \
%endif
  %{_builddir}/%{name}-%{version}
%__make %{?jobs:-j%jobs} VERBOSE=1
%__make doc
popd build

%install
pushd build
%if 0%{?suse_version}
%makeinstall
%else
make DESTDIR=%{buildroot} install
%endif
popd build

%post -n libcsync0
/sbin/ldconfig

%postun -n libcsync0
/sbin/ldconfig

%clean
%__rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/csync
%{_mandir}/man?/csync.*

%files -n libcsync0
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL README
%dir %{_sysconfdir}/csync
%config(noreplace) %{_sysconfdir}/csync/csync.conf
%config(noreplace) %{_sysconfdir}/csync/csync_exclude.conf
%config(noreplace) %{_sysconfdir}/csync/csync_log.conf
%{_libdir}/libcsync.so.*
%dir %{_libdir}/csync-0

%files -n libcsync-plugin-smb
%defattr(-,root,root)
%{_libdir}/csync-0/csync_smb.so
%if 0%{?opensuse_bs}

%files -n libcsync-plugin-sftp
%defattr(-,root,root)
%{_libdir}/csync-0/csync_sftp.so
%endif

%files -n libcsync-devel
%defattr(-,root,root)
%{_includedir}/csync
%{_libdir}/libcsync.so

%files -n libcsync-devel-doc
%defattr(-,root,root)
%doc build/doc/html

%files -n libcsync-doc
%defattr(-,root,root)
%{_datadir}/doc/csync

%changelog
* Mon May 25 2009 anschneider@exsuse.de
- Update to version 0.42.0.
  * Added SFTP support with libssh 0.3.
  * Added possibility to pass userdata to the auth function.
  * Added a better version function.
  * Fixed CMake build.
  * Fixed CMake find modules.
  * Fixed some flaws in cstd functions.
  * Documented all public functions.
* Fri Apr 17 2009 anschneider@exsuse.de
- Fix Fedora build.
- Change the way how to set CFLAGS.
* Thu Feb 26 2009 anschneider@suse.de
- Update to version 0.42.0
  * Small fix in the userguide.
* Fri Jan 23 2009 anschneider@suse.de
- Update to version 0.42.0 rc3
  * Added checks for unix extensions.
  * Added more documentation to the userguide.
  * Fixed loading of plugins.
  * Fixed call for deletion functions.
  * Normalize the path to <hostname>/<path> for the statedb filename.
  * More change name of client options to be more descriptive.
- Add recommends for the plugins.
* Thu Jan 08 2009 anschneider@suse.de
- Fix loading of plugins.
- Add requires to the plugins.
* Thu Jan 08 2009 anschneider@suse.de
- Update to version 0.42.0 rc2
  * Reduced syscalls
  * Fixed a bug in the state database
  * Fixed libsmbclient support
  * Completed userguide
* Fri Dec 05 2008 anschneider@suse.de
- Update to version 0.42.0 rc1
  libcsync:
  * Reduced calls of syscall functions.
  * Added own function to create a temporary filename.
  * Fixed libsmbclient 3.0.x support.
* Wed Sep 10 2008 anschneider@suse.de
- Created a subpackage for each plugin and for the user guide
- Update to version 0.42.0 beta1
  libcsync:
  * Added a sftp module using libssh
  * Added user guide (just a start)
  * Added testcase for update detection
  * Added a function to parse an uri to cstdlib
  * Updated the manpage
  * Fixed some segfaults in cstdlib
  * Fixed some memory leaks
  csync:
  * Improved the auth callback
* Thu Jul 03 2008 anschneider@suse.de
- Set the right group for the different packages
* Wed Jul 02 2008 anschneider@suse.de
- Update to version 0.42.0 alpha4
  libcsync:
  * Added the possibility to run csync completely without a journal
  * Improved chmod calls during propagation. Most of the time we use the
  default mode and don't need to call chmod.
  * Improved the exclude list handling in the file tree walker. This
  increased the speed of the update detection.
  * Fixed csync on PPC
  * Fixed serveral small bugs
  csync:
  * Added commandline option to run csync completely without a journal
* Fri Jun 27 2008 anschneider@suse.de
- Fixed csync on PPC
* Wed Jun 25 2008 anschneider@suse.de
- Update to version 0.42.0 alpha3
  libcsync:
  * Added a tree merger to write a complete journal
  * Added support to run csync without a journal
  * Fixed kerberos support in csync_smb module
  * Fixed closing of files after the copy
  * Fixed update detection to detect special files (fifo, pipes,
  char devices, ..)
  * Fixed O_NOATIME flag on open() if we don't have the permission
  csync:
  * Add a variable to run csync completely without a journal
* Tue Jun 17 2008 anschneider@suse.de
- Fix update detection for special files (fifo, char device, ..)
- Fix propagation for files the user doesn't own
* Mon Jun 16 2008 anschneider@suse.de
- Update to version 0.41.92 (0.42.0 alpha2)
  libcsync:
  * Peformance improvements
  * Add more directories to the standard exclude file
  * Bugfixes
* Wed Jun 04 2008 anschneider@suse.de
- Build for redhat based distributions
* Mon Jun 02 2008 anschneider@suse.de
- Update to version 0.41.91 (0.42.0 alpha1)
* Mon May 05 2008 anschneider@suse.de
- Initial verison 0.41.90
openSUSE Build Service is sponsored by