File backintime.spec of Package backintime

#
# spec file for package backintime
#
# Copyright (c) 2012 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.20
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://www.le-web.org/back-in-time/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

Source0:        http://www.le-web.org/download/%{name}/%{name}-%{version}_src.tar.gz
Source1:        %{name}.png

BuildRequires:  gnome-session
BuildRequires:  libkde4-devel
BuildRequires:  python-gnome
BuildRequires:  python-kde4
BuildRequires:  python-qt4
BuildRequires:  update-desktop-files

Requires:       python
Requires:       python-notify
Requires:       rsync

%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 gnome

Summary:        Back In Time is a simple backup system for GNOME/KDE4 desktop
Group:          Productivity/Archiving/Backup
Requires:       %{name} = %{version}
Requires:       python-gnome

%description gnome
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 kde

Summary:        Back In Time is a simple backup system for GNOME/KDE4 desktop
Group:          Productivity/Archiving/Backup
Requires:       %{name} = %{version}
Requires:       python-kde4
Requires:       python-qt4

%description kde
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)

%prep
%setup -q

%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/backintime-gnome.desktop \
                                            gnome/backintime-gnome-root.desktop
sed -i -e "s|document-save|%{name}|g"    kde4/backintime-kde4.desktop
# kde4/backintime-kde4-root.desktop

pushd common
%configure
make %{?_smp_mflags}
popd
pushd gnome
%configure
make %{?_smp_mflags}
popd
pushd  kde4
%configure
make %{?_smp_mflags}
popd

%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

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

%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

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

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}/
%{_docdir}/%{name}/
%{_docdir}/%{name}-common/
%{_mandir}/man1/%{name}.1.gz
%dir %{_datadir}/omf
%dir %{_datadir}/omf/%{name}
%{_datadir}/omf/%{name}/backintime-C.omf
%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
%{_docdir}/%{name}-gnome/
%{_mandir}/man1/%{name}-gnome.1.gz
%dir %{_datadir}/gnome/help/%{name}
%dir %{_datadir}/gnome/help/%{name}/C
%doc %{_datadir}/gnome/help/%{name}/C/backintime.xml
%doc %{_datadir}/gnome/help/%{name}/C/legal.xml

%files kde
%defattr(-,root,root,-)
%{_bindir}/%{name}-kde4
%{_datadir}/applications/kde4/%{name}-kde4.desktop
%dir %{_docdir}/%{name}-kde4
%{_docdir}/%{name}-kde4/copyright
%{_kde4_htmldir}/en/%{name}
%{_mandir}/man1/%{name}-kde4.1.gz

%changelog
openSUSE Build Service is sponsored by