File deja-dup.spec of Package deja-dup

#
# spec file for package deja-dup
#
# Copyright (c) 2011 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:           deja-dup
Version:        20.1
Release:        1
# FIXME: the %%{_datadir}/help/$locale/ files be found by %%find_lang
# FIXME: check if python-cloudfiles is packaged, and if yes, uncomment Recommends
License:        GPLv3+
Summary:        Simple backup tool and frontend for duplicity
Url:            https://launchpad.net/deja-dup
Group:          Productivity/Archiving/Backup
Source0:        %{name}-%{version}.tar.bz2
BuildRequires:  fdupes
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
BuildRequires:  itstool
BuildRequires:  perl-gettext
BuildRequires:  update-desktop-files
BuildRequires:  vala >= 0.11.6
BuildRequires:  pkgconfig(gnome-keyring-1)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libnautilus-extension)
BuildRequires:  pkgconfig(libnotify)
Requires:       duplicity
Recommends:     %{name}-lang
Recommends:     python-boto
# Needed for Rackspace Cloud Files support, but not packaged :/
#Recommends:     python-cloudfiles
%glib2_gsettings_schema_requires

%description
Déjà  Dup is a simple backup tool. It hides the complexity of doing
backups the 'right way' (encrypted, off-site, and regular) and uses
duplicity as the backend.

Features:
 * Support for local or remote backup locations, including Amazon S3
 * Securely encrypts and compresses your data
 * Incrementally backs up, letting you restore from any particular backup
 * Schedules regular backups
 * Integrates well into your GNOME desktop

%package -n nautilus-deja-dup
License:        GPLv3+
Summary:        Déjà Dup Plugin for Nautilus
Group:          Productivity/Archiving/Backup
Requires:       %{name} = %{version}
Supplements:    packageand(%{name}:nautilus}

%description -n nautilus-deja-dup
Déjà  Dup is a simple backup tool. It hides the complexity of doing
backups the 'right way' (encrypted, off-site, and regular) and uses
duplicity as the backend.

Features:
 * Support for local or remote backup locations, including Amazon S3
 * Securely encrypts and compresses your data
 * Incrementally backs up, letting you restore from any particular backup
 * Schedules regular backups
 * Integrates well into your GNOME desktop

This package contains a plugin to integrate Déjà Dup into Nautilus.

%lang_package
%prep
%setup -q

%build
%configure --disable-static
%__make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file deja-dup
%suse_update_desktop_file deja-dup-monitor
%suse_update_desktop_file -r deja-dup-preferences GTK GNOME System Archiving X-SuSE-Backup
%find_lang %{name} %{?no_lang_C}
# Localized help
for help in %{buildroot}%{_datadir}/help/*/deja-dup/; do
    LOCALE=`echo $help | sed "s:.*%{_datadir}/help/\([^/]*\)/deja-dup/:\1:g"`
    echo "%%lang($LOCALE) %%dir %%{_datadir}/help/$LOCALE" >> %{name}.help-lang.tmp
    echo "%%lang($LOCALE) %%doc /${help##%{buildroot}}" >> %{name}.help-lang.tmp
done
sort -u %{name}.help-lang.tmp | grep -v "^%%lang(C)" > %{name}.help-lang
rm %{name}.help-lang.tmp
# Localized man pages
for man in %{buildroot}%{_mandir}/*/man1/*; do
    LOCALE=`echo $man | sed "s:.*%{_mandir}/\([^/]*\)/man1/.*:\1:g"`
    echo "%%lang($LOCALE) %%dir %%{_mandir}/$LOCALE" >> %{name}.man-lang.tmp
    echo "%%lang($LOCALE) %%dir %%{_mandir}/$LOCALE/man1" >> %{name}.man-lang.tmp
    echo "%%lang($LOCALE) %%doc /${man##%{buildroot}}*" >> %{name}.man-lang.tmp
done
sort -u %{name}.man-lang.tmp > %{name}.man-lang
rm %{name}.man-lang.tmp
# create symlinks for man pages
%fdupes -s %{buildroot}%{_mandir}
# create hardlinks for the rest
%fdupes %{buildroot}

%if 0%{?suse_version} > 1130

%post
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post
%endif

%if 0%{?suse_version} > 1130

%postun
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files -f %{name}.man-lang
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS
%doc %{_datadir}/help/C/%{name}/
%{_bindir}/deja-dup
%{_bindir}/deja-dup-preferences
%{_mandir}/man1/deja-dup.*
%{_mandir}/man1/deja-dup-preferences.*
%{_sysconfdir}/xdg/autostart/deja-dup-monitor.desktop
# We explicitly list the content of %%{_libexecdir}/deja-dup to make sure we
# put the files in the right subpackage
%dir %{_libexecdir}/deja-dup
%{_libexecdir}/deja-dup/deja-dup-monitor
%{_datadir}/applications/deja-dup.desktop
%{_datadir}/applications/deja-dup-preferences.desktop
%{_datadir}/%{name}/
%{_datadir}/GConf/gsettings/deja-dup.convert
%{_datadir}/glib-2.0/schemas/org.gnome.DejaDup.gschema.xml
%{_datadir}/icons/hicolor/scalable/apps/deja-dup-symbolic.svg
%{_datadir}/icons/hicolor/scalable/devices/deja-dup-cloud.svg
%{_datadir}/icons/hicolor/*/apps/deja-dup.png

%files -n nautilus-deja-dup
%defattr(-,root,root)
%{_libdir}/nautilus/extensions-3.0/libdeja-dup.so

%files lang -f %{name}.lang -f %{name}.help-lang

%changelog
openSUSE Build Service is sponsored by