File backintime.spec of Package backintime
#
# spec file for package backintime
#
# Copyright (c) 2014 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/
#
Name: backintime
Version: 1.0.34
Release: 0
Summary: Back In Time is a simple backup system for GNOME/KDE4 desktop
License: GPL-2.0+
Group: Productivity/Archiving/Backup
Url: http://backintime.le-web.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Source0: http://www.le-web.org/download/%{name}/%{name}-%{version}.tar.gz
Source1: %{name}.png
# PATCH-FEATURE-OPENSUSE %{name}-ssh-agent_only_if_password.patch -- kdupke@suse.com
Patch0: %{name}-ssh-agent_only_if_password.patch
BuildRequires: cron
BuildRequires: fdupes
BuildRequires: gnome-session
BuildRequires: kdebase4-runtime
BuildRequires: libkde4-devel
BuildRequires: openssh
BuildRequires: python-gnome-devel
BuildRequires: python-gtk
BuildRequires: python-kde4
BuildRequires: python-qt4
BuildRequires: rsync
BuildRequires: update-desktop-files
%if 0%{?suse_version} > 1110
BuildRequires: encfs
BuildRequires: kompare
BuildRequires: libnotify-devel
BuildRequires: libnotify-tools
BuildRequires: meld
BuildRequires: python-gnomekeyring
BuildRequires: python-notify-devel
BuildRequires: sshfs
%endif
%if 0%{?suse_version} > 1220
BuildRequires: python-keyring
%endif
Requires: cron
Requires: libnotify-tools
Requires: openssh
Requires: python
Requires: python-notify
Requires: rsync
Recommends: encfs
Recommends: python-keyring
Recommends: sshfs
%description
Back In Time is a simple backup system for GNOME/KDE4 desktop inspired from
"flyback project" and "TimeVault". The backup is done by taking snapshots
of a specified set of directories.
All you have to do is configure:
* Where to save snapshot
* What directories to backup
* When backup should be done (manual,
every hour, every day, every week, every month)
%package doc
Summary: Documentation for %{name}
Group: Productivity/Archiving/Backup
Requires: %{name} = %{version}
BuildArch: noarch
%description doc
Documentation and help files for %{name}
%package gnome
Summary: Back In Time is a simple backup system for GNOME desktop
Group: Productivity/Archiving/Backup
Requires: %{name} = %{version}
Requires: python-gnome
Requires: python-gtk
Recommends: meld
Recommends: python-gnomekeyring
%description gnome
Back In Time is a simple backup system for GNOMEdesktop inspired from
"flyback project" and "TimeVault". The backup is done by taking snapshots
of a specified set of directories.
All you have to do is configure:
* Where to save snapshot
* What directories to backup
* When backup should be done (manual,
every hour, every day, every week, every month)
%package kde
Summary: Back In Time is a simple backup system for KDE4 desktop
Group: Productivity/Archiving/Backup
Requires: %{name} = %{version}
Requires: kdebase4-runtime
Requires: python-kde4
Requires: python-qt4
Recommends: kompare
%description kde
Back In Time is a simple backup system for KDE4 desktop inspired from
"flyback project" and "TimeVault". The backup is done by taking snapshots
of a specified set of directories.
All you have to do is configure:
* Where to save snapshot
* What directories to backup
* When backup should be done (manual,
every hour, every day, every week, every month)
%lang_package
%prep
%setup -q -c
%patch0 -p1
%build
sed -i -e "s|/share/doc/backintime|/share/doc/packages/backintime|g" common/config.py */Makefile.template
sed -i -e "s|gtk-save|%{name}|g" gnome/%{name}-gnome.desktop \
gnome/%{name}-gnome-root.desktop
sed -i -e "s|document-save|%{name}|g" kde4/%{name}-kde4.desktop \
kde4/%{name}-kde4-root.desktop
pushd common
%configure
make %{?_smp_mflags}
popd
pushd gnome
%configure
make %{?_smp_mflags}
popd
pushd kde4
%configure --kdesu
make %{?_smp_mflags}
popd
%if 0%{?suse_version} > 1110
pushd notify
%configure
make %{?_smp_mflags}
popd
%endif
%install
pushd common
%{?make_install} %{!?make_install:%makeinstall}
popd
pushd gnome
%{?make_install} %{!?make_install:%makeinstall}
popd
pushd kde4
%{?make_install} %{!?make_install:%makeinstall}
popd
%if 0%{?suse_version} > 1200
pushd notify
%{?make_install} %{!?make_install:%makeinstall}
popd
%endif
install -D -m 644 %{SOURCE1} %{buildroot}/%{_datadir}/pixmaps/%{name}.png
# fix executable permissions
chmod a+x %{buildroot}%{_datadir}/%{name}/common/askpass.py
chmod a+x %{buildroot}%{_datadir}/%{name}/common/create-manpage-backintime-config.py
%fdupes -s %{buildroot}%{_docdir}
%suse_update_desktop_file %{name}-gnome System Backup
%suse_update_desktop_file %{name}-gnome-root System Backup
%suse_update_desktop_file %{name}-kde4 System Backup
%suse_update_desktop_file %{name}-kde4-root System Backup
%find_lang %{name} --without-kde --without-gnome
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS LICENSE VERSION
%{_sysconfdir}/xdg/autostart/backintime.desktop
%{_bindir}/%{name}
%{_bindir}/%{name}-askpass
%{_datadir}/%{name}/
%{_datadir}/pixmaps/%{name}.png
%dir %{_datadir}/omf/
%{_datadir}/omf/%{name}/
%{_mandir}/man1/%{name}.1.gz
%{_mandir}/man1/%{name}-config.1.gz
%exclude %{_docdir}/%{name}/
%exclude %{_docdir}/%{name}-*/
%files doc
%defattr(-,root,root)
%doc CHANGES README TODO
%exclude %{_docdir}/%{name}/AUTHORS
%exclude %{_docdir}/%{name}/LICENSE
%exclude %{_docdir}/%{name}/VERSION
%{_docdir}/%{name}/
%{_docdir}/%{name}-common/
%if 0%{?suse_version} > 1200
%{_docdir}/%{name}-notify/
%endif
%files lang -f %{name}.lang
%defattr(-,root,root)
%if 0%{?suse_version} < 1120
%lang(jv) %dir %{_datadir}/locale/jv
%lang(jv) %dir %{_datadir}/locale/jv/LC_MESSAGES
%endif
%files gnome
%defattr(-,root,root)
%{_bindir}/%{name}-gnome
%{_datadir}/applications/%{name}-gnome.desktop
%{_datadir}/applications/%{name}-gnome-root.desktop
%doc %{_datadir}/gnome/help/%{name}/
%{_docdir}/%{name}-gnome/
%{_mandir}/man1/%{name}-gnome.1.gz
%files kde
%defattr(-,root,root)
%{_bindir}/%{name}-kde4
%{_datadir}/applications/kde4/%{name}-kde4.desktop
%{_datadir}/applications/kde4/%{name}-kde4-root.desktop
%{_docdir}/%{name}-kde4/
%{_kde4_htmldir}/en/%{name}
%{_mandir}/man1/%{name}-kde4.1.gz
%changelog