1 Summary: Adjusts the color temperature of your screen according to time of day
6 Group: Applications/System
7 Source0: https://github.com/jonls/redshift/releases/download/v%{version}/%{name}-%{version}.tar.xz
8 # Source0-md5: 5d04f2413dacdf3434cb86f373842462
9 URL: http://jonls.dk/redshift/
10 BuildRequires: autoconf >= 2.69
11 BuildRequires: automake
12 BuildRequires: desktop-file-utils
13 BuildRequires: gettext-tools >= 0.17
14 BuildRequires: glib2-devel >= 1:2.26
15 BuildRequires: intltool >= 0.50
16 BuildRequires: libdrm-devel
17 BuildRequires: libtool
18 BuildRequires: libxcb-devel
19 BuildRequires: pkgconfig
20 BuildRequires: python3 >= 3.2
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.219
23 BuildRequires: sed >= 4.0
24 BuildRequires: xorg-lib-libX11-devel
25 BuildRequires: xorg-lib-libXxf86vm-devel
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Redshift adjusts the color temperature of your screen according to
30 your surroundings. This may help your eyes hurt less if you are
31 working in front of the screen at night.
33 The color temperature is set according to the position of the sun. A
34 different color temperature is set during night and daytime. During
35 twilight and early morning, the color temperature transitions smoothly
36 from night to daytime temperature to allow your eyes to slowly adapt.
38 This package provides the base program.
40 %package -n %{name}-gtk
41 Summary: GTK integration for Redshift
42 Group: Applications/System
43 Requires: %{name} = %{version}-%{release}
45 Requires: python3 >= 3.2
46 Requires: python3-pyxdg
47 Obsoletes: gtk-redshift
49 %description -n %{name}-gtk
50 This package provides GTK integration for Redshift, a screen color
51 temperature adjustment program.
56 %{__sed} -i -e '1s,^#!.*python3,#!%{__python3},' src/redshift-gtk/redshift-gtk.in
66 am_cv_python_pythondir=%{py3_sitescriptdir} \
67 --disable-silent-rules \
74 --with-systemduserunitdir=%{systemduserunitdir}
78 rm -rf $RPM_BUILD_ROOT
80 INSTALL="install -p" \
81 DESTDIR=$RPM_BUILD_ROOT
86 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/redshift-gtk.desktop
89 rm -rf $RPM_BUILD_ROOT
92 %update_icon_cache hicolor
94 %postun -n %{name}-gtk
95 %update_icon_cache hicolor
97 %files -f %{name}.lang
98 %defattr(644,root,root,755)
99 %doc CONTRIBUTING.md DESIGN NEWS README README-colorramp redshift.conf.sample
100 %attr(755,root,root) %{_bindir}/redshift
101 %{_mandir}/man1/redshift.1*
103 %files -n %{name}-gtk
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_bindir}/redshift-gtk
106 %{_datadir}/appdata/redshift-gtk.appdata.xml
107 %{py3_sitescriptdir}/redshift_gtk
108 %{_iconsdir}/hicolor/scalable/apps/redshift*.svg
109 %{_desktopdir}/redshift.desktop
110 %{_desktopdir}/redshift-gtk.desktop
111 %{systemduserunitdir}/redshift.service
112 %{systemduserunitdir}/redshift-gtk.service