From 3e530402f32da7c404b73927075a336856f29c83 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Mon, 12 Dec 2022 15:54:45 +0800 Subject: [PATCH] remove python2 to fix compile error --- redshift-python2.patch | 19 ------------------- redshift.spec | 26 ++++---------------------- 2 files changed, 4 insertions(+), 41 deletions(-) delete mode 100644 redshift-python2.patch diff --git a/redshift-python2.patch b/redshift-python2.patch deleted file mode 100644 index 1ed748c..0000000 --- a/redshift-python2.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -78,7 +78,7 @@ AS_IF([test "x$have_objc_compiler" = xye - AC_CHECK_HEADER([windows.h], [have_windows_h=yes], [have_windows_h=no]) - - # Check for Python --AM_PATH_PYTHON([3.2], [have_python=yes], [have_python=no]) -+AM_PATH_PYTHON([2.7], [have_python=yes], [have_python=no]) - - # Check DRM method - AC_MSG_CHECKING([whether to enable DRM method]) ---- a/src/redshift-gtk/redshift-gtk.in -+++ b/src/redshift-gtk/redshift-gtk.in -@@ -1,4 +1,4 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python - # redshift-gtk -- GTK+ Redshift launcher script - # This file is part of Redshift. - diff --git a/redshift.spec b/redshift.spec index ea42a65..6b66128 100644 --- a/redshift.spec +++ b/redshift.spec @@ -1,19 +1,11 @@ -%if 0%{?rhel} >= 8 || 0%{?fedora} >= 19 -%bcond_without python3 -%else -%bcond_with python3 -%endif - Name: redshift Version: 1.12 -Release: 4 +Release: 5 Summary: Adjusts the color temperature of your screen according to time of day License: GPLv3+ URL: http://jonls.dk/redshift/ Source0: https://github.com/jonls/redshift/archive/v%{version}/%{name}-%{version}.tar.gz -# Make buildable on EPEL-7 -Patch0: redshift-python2.patch BuildRequires: libtool BuildRequires: intltool @@ -43,15 +35,9 @@ This package provides the base program. Summary: GTK integration for Redshift BuildRequires: desktop-file-utils -%if %{with python3} BuildRequires: python3-devel >= 3.2 Requires: python3-gobject Requires: python3-pyxdg -%else -BuildRequires: python2-devel -Requires: pygobject3 -Requires: pyxdg -%endif Requires: %{name} = %{version}-%{release} Obsoletes: gtk-%{name} < 1.7-7 @@ -61,9 +47,6 @@ temperature adjustment program. %prep %autosetup -N -n %{name}-%{version} -%if %{without python3} -%patch0 -p1 -%endif autopoint -f && AUTOPOINT="intltoolize --automake --copy" autoreconf -f -i %build @@ -97,17 +80,16 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/redshift-gtk.desktop %files -n %{name}-gtk %{_bindir}/redshift-gtk -%if %{with python3} %{python3_sitelib}/redshift_gtk/ -%else -%{python2_sitelib}/redshift_gtk/ -%endif %{_datadir}/icons/hicolor/scalable/apps/redshift*.svg %{_datadir}/applications/redshift-gtk.desktop %{_datadir}/appdata/redshift-gtk.appdata.xml %{_userunitdir}/%{name}-gtk.service %changelog +* Mon Dec 12 2022 peijiankang  - 1.12-5 +- remove python2 to fix compile error + * Tue Mar 08 2022 tanyulong  - 1.12-4 - add %post -n %{name}-gtk ;%preun -n %{name}-gtk to spec file -- Gitee