File sparkleshare.spec of Package sparkleshare

#
# spec file for package sparkleshare
#
# Copyright (c) 2013 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/
#


%define         with_translations 0

Name:           sparkleshare
Version:        1.0.0
Release:        0
Summary:        A file sharing and collaboration tool
License:        GPL-3.0+
Group:          Productivity/Archiving/Backup
Url:            http://sparkleshare.org
Source:         https://github.com/downloads/hbons/SparkleShare/%{name}-linux-%{version}.tar.gz
BuildRequires:  fdupes
%if %{with_translations}
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
%endif
BuildRequires:  mono-devel
BuildRequires:  nant
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(glib-sharp-2.0) >= 2.12.2
BuildRequires:  pkgconfig(gtk-sharp-2.0) >= 2.12.2
BuildRequires:  pkgconfig(notify-sharp)
BuildRequires:  pkgconfig(webkit-sharp-1.0)
Requires:       git-core >= 1.7.1
Requires:       gvfs
Requires:       mono-core
Requires:       openssh
Obsoletes:      nautilus-sparkleshare < %{version}
Recommends:     %{name}-lang
%if ! %{with_translations}
Obsoletes:      %{name}-lang < %{version}
Provides:       %{name}-lang = %{version}
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
SparkleShare is a file sharing and collaboration tool inspired by Dropbox.

SparkleShare isn't just a piece of software, it's part of your workflow.
It's designed to make sharing documents and collaboration easier,
and to make peers aware of what you are doing. It allows you to instantly
sync with any Git repository you have access to. The user interface and
features are made to support this goal.

Though SparkleShare is not made to be a graphical frontend for git or a
backup tool, it may be useful for other kinds of purposes as well, like
backing up small files or monitoring your favourite project.

%if with_translations
%lang_package
%endif
%prep
%setup -q

# Fail when legal/License.txt, News.txt or legal/Authors.txt are no longer executable, so this can be dropped
test -x legal/License.txt -a -x News.txt -a -x legal/Authors.txt
chmod a-x legal/*.txt News.txt

%build
%configure \
    --disable-appindicator
# check on update if parallel builds are supported; currently broken
make V=1 #%{?_smp_mflags} 

%install
%makeinstall
%if %{?with_translations}
%find_lang %{name} %{?no_lang_C}
%endif
%suse_update_desktop_file -G "Synchronization Tool" %{name} FileTransfer
%suse_update_desktop_file sparkleshare-invite-opener
%fdupes %{buildroot}%{_datadir}

# There is no real reason to install the ubuntu-themed icons, as we are not Ubuntu
find %{buildroot}%{_datadir}/icons/ -type d -name ubuntu* -maxdepth 1 -exec rm -r {} \;

%clean
rm -rf %{buildroot}

%post
%desktop_database_post
%icon_theme_cache_post
%icon_theme_cache_post gnome

%postun
%desktop_database_postun
%icon_theme_cache_postun
%icon_theme_cache_postun gnome

%files
%defattr(-,root,root)
%doc legal/* News.txt
%{_bindir}/sparkleshare
%{_datadir}/applications/sparkleshare.desktop
%{_datadir}/applications/sparkleshare-invite-opener.desktop
%{_datadir}/icons/hicolor/*/*/*.png
%dir %{_datadir}/icons/gnome
%dir %{_datadir}/icons/gnome/*
%dir %{_datadir}/icons/gnome/*/*
%{_datadir}/icons/gnome/*/*/*
%{_datadir}/sparkleshare/
%{_libdir}/sparkleshare/

%if %{with_translations}
%files lang -f %{name}.lang
%endif

%changelog
openSUSE Build Service is sponsored by