Blob Blame History Raw
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
# The debuginfo package is empty because of python.
%define debug_package %{nil}

Name:           gget
Version:        0.0.4
Release:        15%{?dist}
Summary:        Download Manager for the GNOME desktop
Group:          Applications/Internet
License:        GPLv2+
URL:            http://live.gnome.org/GGet
Source0:        ftp://ftp.gnome.org/pub/GNOME/sources/gget/0.0/%{name}-%{version}.tar.bz2
# Detects Epiphany 2.26/2.25 for rawhide
# http://bugzilla.gnome.org/show_bug.cgi?id=572602
Patch0:         gget-0.0.4-epiphany.patch
Patch1:         gget-0.0.4-remove-python-version.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  pygtk2-devel >= 2.10.0
BuildRequires:  pygobject2-devel >= 2.12.0
BuildRequires:  gnome-python2-devel >= 2.16.0
BuildRequires:  gnome-python2-extras >= 2.14.2
BuildRequires:  dbus-python-devel >= 0.82
BuildRequires:  notify-python >= 0.1.1
BuildRequires:  intltool
BuildRequires:  gtk2-devel
BuildRequires:  desktop-file-utils
Requires:       python
Requires:       gnome-python2-gnomedesktop
Requires:       gnome-python2-extras
Requires:       dbus
Requires:       dbus-python
Requires:       notify-python
Requires(post): GConf2
Requires(preun):GConf2

%description
GGet is a download manager for Gnome. It supports FTP, HTTP,
and Metalink downloads.

%prep
%setup -q
%patch0 -p1 -b .epiphany

# Fix rhbz#702159 (hardcoded "python2.5" in shebang):
%patch1 -p1 -b .remove-python-version

%build
# There is no python support in epiphany >= 2.27
# Read http://live.gnome.org/TwoPointTwentyseven/ReleaseNotes
# and http://bugzilla.gnome.org/show_bug.cgi?id=572602
%configure --disable-epiphany-extension
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
# For GConf apps: prevent schemas from being installed at this stage
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
chmod +x $RPM_BUILD_ROOT%{python_sitelib}/%{name}/metalink.py
desktop-file-install --add-category=FileTransfer    \
--remove-category="Application"    \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
%{buildroot}/%{_datadir}/applications/gget.desktop



%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
# For GConf apps: install schemas as system default
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
/usr/bin/gconftool-2 --makefile-install-rule \
	%{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null || :

%preun
# For GConf apps: uninstall app's system default schemas
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
/usr/bin/gconftool-2 --makefile-uninstall-rule \
	%{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :

%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
update-mime-database %{_datadir}/mime &> /dev/null || :

%files -f gget.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS TODO
%{_sysconfdir}/gconf/schemas/gget.schemas
%{_datadir}/%name
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/org.gnome.gget.service
%{_datadir}/icons/hicolor/*/apps/gget.*
# For noarch packages: sitelib
%{python_sitelib}/%{name}
%{_bindir}/%{name}

%changelog
* Wed Jun  1 2011 David Malcolm <dmalcolm@redhat.com> - 0.0.4-15
- fix hardcoded python2.5 in /usr/bin/gget's shebang (rhbz#702159)

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.0.4-13
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Sep  4 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0.0.4-12
- Fix FTBFS: 
- Disabled epiphany extension as epiphany >= 2.27 has no python support
- Updated gget-0.0.4-epiphany.patch just in case the extension would be enabled
  in the future.
- Added BR: gtk2-devel, desktop-file-utils (was pulled in by epiphany-devel previously)

* Mon Aug 10 2009 Ville Skyttä <ville.skytta@iki.fi> - 0.0.4-11
- Use bzipped upstream tarball.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-9
- Remove other chmod.

* Fri Feb 20 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-8
- Include Epiphany 2.26/2.25 patch by Christoph Wickert
and other review issues.

* Mon Jan 19 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-7
- Include Epiphany extension correctly.

* Thu Jan 15 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-6
- Address issues from preliminary review.

* Thu Jan 11 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-5
- Address more spec file issues.

* Thu Jan 09 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-4
- Fix GTK+ icon cache issue.

* Thu Jan 08 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-3
- gget-epiphany-extension: subpackage for the epiphany extension.

* Thu Jan 08 2009 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-2
- Add Epiphany extension.

* Mon Dec 29 2008 Ant Bryan <anthonybryan at gmail.com> - 0.0.4-1
- 0.0.4