File backintime.spec of Package backintime

# spec file for package backintime
# Copyright (c) 2015 SUSE LINUX 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

Name:           backintime
Version:        1.1.6
Release:        0
Summary:        Back In Time is a simple backup tool for Linux, inspired by "flyback project"
License:        GPL-2.0+
Group:          Productivity/Archiving/Backup
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Source1:        %{name}.png
Source99:       %{name}.rpmlintrc
# PATCH-FEATURE-OPENSUSE %%{name}-ssh-agent_only_if_password.patch --
Patch0:         %{name}-ssh-agent_only_if_password.patch

BuildRequires:  fdupes
BuildRequires:  openssh
BuildRequires:  python3-devel
BuildRequires:  sshfs
BuildRequires:  update-desktop-files
Requires:       cron
Requires:       libnotify-tools
Requires:       openssh
Requires:       python-notify
Requires:       python3
Requires:       rsync
Recommends:     encfs
Recommends:     python-keyring
Recommends:     sshfs

Conflicts:      backintime-kde
Conflicts:      backintime-gnome

Back In Time is a simple backup tool for Linux, inspired by "flyback project".

It provides a command line client 'backintime' and a Qt4 GUI 'backintime-qt4'
both written in Python3.

You only need to specify 3 things:
    * where to save snapshots;
    * what folders to backup; and
    * backup frequency (manual, every hour, every day, 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 qt4

Summary:        Back In Time Qt4 GUI
Group:          Productivity/Archiving/Backup
Requires:       %{name} = %{version}
Requires:       polkit
Requires:       python3-qt4

%description qt4
This package has a Qt4 GUI for %{name}.

%setup -q -n %{name}-%{version}
%patch0 -p1


sed -i -e "s|/share/doc/backintime|/share/doc/packages/backintime|g" common/ */Makefile.template

# Fix icon name.
sed -i 's/Icon=document-save/Icon=backintime/g' qt4/backintime-qt4.desktop
sed -i 's/Icon=document-save/Icon=backintime/g' qt4/backintime-qt4-root.desktop

pushd common
./configure --python3
make %{?_smp_mflags}
pushd  qt4
./configure --python3
make %{?_smp_mflags}

pushd common
%{?make_install} %{!?make_install:%makeinstall}
pushd qt4
%{?make_install} %{!?make_install:%makeinstall}

# Fix doc directory.
mkdir -p %{buildroot}/%{_docdir}/%{name}
cp -rf  %{buildroot}/%{_docdir}/%{name}-common/* %{buildroot}/%{_docdir}/%{name}/

# Remove unneeded files.
rm -r %{buildroot}%{_datadir}/doc/qt

install -D -m 644 %{SOURCE1} %{buildroot}/%{_datadir}/pixmaps/%{name}.png

# Fix executable permissions.
chmod a+x %{buildroot}%{_datadir}/%{name}/common/
chmod a+x %{buildroot}%{_datadir}/%{name}/common/

%suse_update_desktop_file %{name}-qt4 System Backup
%suse_update_desktop_file %{name}-qt4-root System Backup

%find_lang %{name} --without-kde --without-gnome

rm -rf %{buildroot}

%exclude %{_docdir}/%{name}-*/
%exclude %{_datadir}/%{name}/qt4
%exclude %{_datadir}/%{name}/plugins

%files doc
%exclude %{_docdir}/%{name}/AUTHORS
%exclude %{_docdir}/%{name}/CHANGES
%exclude %{_docdir}/%{name}/LICENSE
%exclude %{_docdir}/%{name}/README
%exclude %{_docdir}/%{name}/VERSION

%files lang -f %{name}.lang
%if 0%{?suse_version} < 1120
%lang(jv) %dir %{_datadir}/locale/jv
%lang(jv) %dir %{_datadir}/locale/jv/LC_MESSAGES

%files qt4
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/system-services
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%dir %{_sysconfdir}/dbus-1
%dir %{_sysconfdir}/dbus-1/system.d
%config %{_sysconfdir}/dbus-1/system.d/net.launchpad.backintime.serviceHelper.conf

openSUSE Build Service is sponsored by