File gwget.spec of Package gwget

#
# spec file for package gwget
#
# 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/
#


%define build_epiphany %{?favor_gtk2}

Name:           gwget
%if 0%{?build_epiphany}
BuildRequires:  epiphany-devel
%endif
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  libgnomeui-devel
BuildRequires:  libnotify-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
Requires:       wget
Version:        1.0.4
Release:        0
# FIXME: on version upgrade, check if build_epiphany is still needed (last checked: 1.0.4)
Summary:        GTK+ Front-End to wget
License:        GPL-2.0+
Group:          Productivity/Networking/Web/Utilities
Url:            http://gnome.org/projects/gwget/
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gwget-epiphany-2.29.patch bgo609544 vuntz@opensuse.org -- Fix build against newer epiphany
Patch0:         gwget-epiphany-2.29.patch
# PATCH-FIX-UPSTREAM gwget-libnotify-0.7.patch bgo#634170 vuntz@opensuse.org -- Fix build with libnotify 0.7
Patch1:         gwget-libnotify-0.7.patch
# PATCH-FIX-UPSTREAM gwget-glib-2.31.patch bgo#665286 dimstar@opensuse.org -- Fix build with glib 2.31
Patch2:         gwget-glib-2.31.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Recommends:     %{name}-lang
%gconf_schemas_prereq

%description
This package contains a graphical user interface for wget.

%lang_package
%prep
%setup -q
translation-update-upstream
%if 0%{?build_epiphany}
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1

%build
%configure \
        --disable-static \
%if 0%{?build_epiphany}
        --enable-epiphany-extension \
%endif
        --disable-schemas-install
make %{?jobs:-j%jobs}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file gwget Network FileTransfer
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
# No library is installed, don't install headers:
rm -rf $RPM_BUILD_ROOT/%{_includedir}
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%if 0%{?suse_version} > 1130

%post
%desktop_database_post
%endif

%if 0%{?suse_version} > 1130

%postun
%desktop_database_postun
%endif

%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO THANKS
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/gwget
%{_datadir}/pixmaps/%{name}*.*
%{_datadir}/dbus-1/services/org.gnome.gwget.service
%if 0%{?build_epiphany}
%dir %{_libdir}/epiphany/*/extensions
%{_libdir}/epiphany/*/*/*.*
%endif

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by