+++ /dev/null
-=== modified file 'src/location-geoclue.c'
---- src/location-geoclue.c 2011-03-27 22:14:58 +0000
-+++ src/location-geoclue.c 2011-07-12 20:30:30 +0000
-@@ -50,14 +50,20 @@
- int
- location_geoclue_start(location_geoclue_state_t *state)
- {
-- GeoclueMaster *master = NULL;
-- GeoclueMasterClient *client = NULL;
-- GError *error = NULL;
-- gchar *name = NULL;
-+ if (state->provider && state->provider_path) {
-+ state->position = geoclue_position_new(state->provider,
-+ state->provider_path);
-+ } else {
-+ GeoclueMaster *master = geoclue_master_get_default();
-+ GeoclueMasterClient *client = geoclue_master_create_client(master,
-+ NULL, NULL);
-+ GError *error = NULL;
-
-- if (!(state->provider && state->provider_path)) {
-- master = geoclue_master_get_default();
-- client = geoclue_master_create_client(master, NULL, NULL);
-+ if (client == NULL) {
-+ g_printerr(_("Unable to obtain master client.\n"));
-+ g_object_unref(master);
-+ return -1;
-+ }
-
- if (!geoclue_master_client_set_requirements(client,
- GEOCLUE_ACCURACY_LEVEL_REGION,
-@@ -68,15 +74,18 @@
- error->message);
- g_error_free(error);
- g_object_unref(client);
-+ g_object_unref(master);
-
- return -1;
- }
-
- state->position = geoclue_master_client_create_position(client, NULL);
-- } else {
-- state->position = geoclue_position_new(state->provider,
-- state->provider_path);
-- }
-+
-+ g_object_unref(client);
-+ g_object_unref(master);
-+ }
-+
-+ gchar *name = NULL;
-
- if (geoclue_provider_get_provider_info(GEOCLUE_PROVIDER(state->position),
- &name, NULL, NULL)) {
-
Summary: Adjusts the color temperature of your screen according to time of day
Name: redshift
-Version: 1.7
+Version: 1.9.1
Release: 1
License: GPL v3+
Group: Applications/System
-Source0: http://launchpad.net/redshift/trunk/%{version}/+download/%{name}-%{version}.tar.bz2
-# Source0-md5: c56512afa292b5a94b715ed4a1841d4c
+Source0: http://launchpad.net/redshift/trunk/%{version}/+download/%{name}-%{version}.tar.xz
+# Source0-md5: 4c5dd6ea043116f9c15a9d5ec4c608de
# Remove Ubuntu specific geoclue provider
Patch0: %{name}-geoclue-provider.patch
# https://bugs.launchpad.net/redshift/+bug/888661
# http://bazaar.launchpad.net/~jonls/redshift/trunk/revision/165
-Patch1: %{name}-geoclue-client-check.patch
URL: http://jonls.dk/redshift/
BuildRequires: GConf2-devel
BuildRequires: desktop-file-utils
BuildRequires: geoclue-devel
BuildRequires: gettext-devel
BuildRequires: pkgconfig
-BuildRequires: sed >= 4.0
-BuildRequires: python
+BuildRequires: python3 >= 3.2
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: sed >= 4.0
BuildRequires: xorg-lib-libXxf86vm-devel
+Requires: python3 >= 3.2
+Requires: python3-pyxdg
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This package provides the base program.
-%package -n gtk-%{name}
+%package -n %{name}-gtk
Summary: GTK integration for Redshift
Group: Applications/System
Requires: %{name} = %{version}-%{release}
Requires: python-pygtk-gtk
Requires: python-pyxdg
+Obsoletes: gtk-redshift
-%description -n gtk-%{name}
+%description -n %{name}-gtk
This package provides GTK integration for Redshift, a screen color
temperature adjustment program.
%prep
%setup -q
%patch0 -p1
-%patch1 -p0
-%{__sed} -i -e '1s,^#!.*python,#!%{__python},' src/gtk-redshift/gtk-redshift
+%{__sed} -i -e '1s,^#!.*python,#!%{__python},' src/redshift-gtk/redshift-gtk.in
%build
%configure \
%py_postclean
%find_lang %{name}
-desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/gtk-redshift.desktop
+desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/redshift-gtk.desktop
%clean
rm -rf $RPM_BUILD_ROOT
-%post -n gtk-%{name}
+%post -n %{name}-gtk
%update_icon_cache hicolor
-%postun -n gtk-%{name}
+%postun -n %{name}-gtk
%update_icon_cache hicolor
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README
+%doc DESIGN HACKING NEWS README README-colorramp
%attr(755,root,root) %{_bindir}/redshift
%{_mandir}/man1/redshift.1*
-%files -n gtk-%{name}
+%files -n %{name}-gtk
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/gtk-redshift
-%{py_sitescriptdir}/gtk_redshift
+%attr(755,root,root) %{_bindir}/redshift-gtk
+%{py3_sitescriptdir}/redshift_gtk
%{_iconsdir}/hicolor/scalable/apps/redshift*.svg
-%{_desktopdir}/gtk-redshift.desktop
+%{_desktopdir}/redshift-gtk.desktop
+%{systemduserunitdir}/redshift.service
+%{systemduserunitdir}/redshift-gtk.service