]>
Commit | Line | Data |
---|---|---|
f16f24f7 ER |
1 | Summary: Adjusts the color temperature of your screen according to time of day |
2 | Name: redshift | |
7e8dc93f | 3 | Version: 1.12 |
5020299d | 4 | Release: 8 |
f16f24f7 ER |
5 | License: GPL v3+ |
6 | Group: Applications/System | |
53fd8a1a | 7 | Source0: https://github.com/jonls/redshift/releases/download/v%{version}/%{name}-%{version}.tar.xz |
7e8dc93f | 8 | # Source0-md5: 5d04f2413dacdf3434cb86f373842462 |
f16f24f7 | 9 | URL: http://jonls.dk/redshift/ |
b3b8c222 JP |
10 | BuildRequires: autoconf >= 2.69 |
11 | BuildRequires: automake | |
f16f24f7 | 12 | BuildRequires: desktop-file-utils |
b3b8c222 JP |
13 | BuildRequires: gettext-tools >= 0.17 |
14 | BuildRequires: glib2-devel >= 1:2.26 | |
15 | BuildRequires: intltool >= 0.50 | |
16 | BuildRequires: libdrm-devel | |
7e8dc93f | 17 | BuildRequires: libtool |
b3b8c222 | 18 | BuildRequires: libxcb-devel |
6412d4fd | 19 | BuildRequires: pkgconfig |
a3b98209 | 20 | BuildRequires: python3 >= 3.2 |
f16f24f7 | 21 | BuildRequires: rpm-pythonprov |
5e94f8ec | 22 | BuildRequires: rpmbuild(macros) >= 2.011 |
a3b98209 | 23 | BuildRequires: sed >= 4.0 |
7e8dc93f | 24 | BuildRequires: xorg-lib-libX11-devel |
f16f24f7 | 25 | BuildRequires: xorg-lib-libXxf86vm-devel |
5e94f8ec JR |
26 | Requires(post,preun): systemd-units >= 1:250.1 |
27 | Requires: systemd-units >= 1:250.1 | |
f16f24f7 ER |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | Redshift adjusts the color temperature of your screen according to | |
32 | your surroundings. This may help your eyes hurt less if you are | |
33 | working in front of the screen at night. | |
34 | ||
35 | The color temperature is set according to the position of the sun. A | |
36 | different color temperature is set during night and daytime. During | |
37 | twilight and early morning, the color temperature transitions smoothly | |
38 | from night to daytime temperature to allow your eyes to slowly adapt. | |
39 | ||
40 | This package provides the base program. | |
41 | ||
5e94f8ec | 42 | %package gtk |
f16f24f7 ER |
43 | Summary: GTK integration for Redshift |
44 | Group: Applications/System | |
45 | Requires: %{name} = %{version}-%{release} | |
b3b8c222 JP |
46 | Requires: gtk+3 |
47 | Requires: python3 >= 3.2 | |
48 | Requires: python3-pyxdg | |
a3b98209 | 49 | Obsoletes: gtk-redshift |
f16f24f7 | 50 | |
5e94f8ec | 51 | %description gtk |
f16f24f7 ER |
52 | This package provides GTK integration for Redshift, a screen color |
53 | temperature adjustment program. | |
54 | ||
55 | %prep | |
56 | %setup -q | |
f16f24f7 | 57 | |
53fd8a1a | 58 | %{__sed} -i -e '1s,^#!.*python3,#!%{__python3},' src/redshift-gtk/redshift-gtk.in |
916dff9a | 59 | |
f16f24f7 | 60 | %build |
b3b8c222 JP |
61 | %{__gettextize} |
62 | %{__intltoolize} | |
63 | %{__aclocal} -I m4 | |
64 | %{__autoheader} | |
65 | %{__automake} | |
66 | %{__autoconf} | |
f16f24f7 | 67 | %configure \ |
53fd8a1a | 68 | am_cv_python_pythondir=%{py3_sitescriptdir} \ |
b3b8c222 JP |
69 | --disable-silent-rules \ |
70 | --enable-drm \ | |
71 | --enable-geoclue \ | |
72 | --enable-geoclue2 \ | |
73 | --enable-gui \ | |
74 | --enable-randr \ | |
7e8dc93f JP |
75 | --enable-vidmode \ |
76 | --with-systemduserunitdir=%{systemduserunitdir} | |
f16f24f7 ER |
77 | %{__make} |
78 | ||
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | %{__make} install \ | |
82 | INSTALL="install -p" \ | |
83 | DESTDIR=$RPM_BUILD_ROOT | |
84 | ||
85 | %py_postclean | |
86 | ||
87 | %find_lang %{name} | |
a3b98209 | 88 | desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/redshift-gtk.desktop |
f16f24f7 ER |
89 | |
90 | %clean | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
5e94f8ec | 93 | %post gtk |
f16f24f7 | 94 | %update_icon_cache hicolor |
5e94f8ec | 95 | %systemd_user_post redshift-gtk.service |
f16f24f7 | 96 | |
5e94f8ec JR |
97 | %preun gtk |
98 | %systemd_user_preun redshift-gtk.service | |
99 | ||
100 | %postun gtk | |
f16f24f7 ER |
101 | %update_icon_cache hicolor |
102 | ||
103 | %files -f %{name}.lang | |
104 | %defattr(644,root,root,755) | |
7e8dc93f | 105 | %doc CONTRIBUTING.md DESIGN NEWS README README-colorramp redshift.conf.sample |
f16f24f7 ER |
106 | %attr(755,root,root) %{_bindir}/redshift |
107 | %{_mandir}/man1/redshift.1* | |
108 | ||
5e94f8ec | 109 | %files gtk |
f16f24f7 | 110 | %defattr(644,root,root,755) |
a3b98209 | 111 | %attr(755,root,root) %{_bindir}/redshift-gtk |
b3b8c222 | 112 | %{_datadir}/appdata/redshift-gtk.appdata.xml |
a3b98209 | 113 | %{py3_sitescriptdir}/redshift_gtk |
f16f24f7 | 114 | %{_iconsdir}/hicolor/scalable/apps/redshift*.svg |
53fd8a1a | 115 | %{_desktopdir}/redshift.desktop |
a3b98209 JP |
116 | %{_desktopdir}/redshift-gtk.desktop |
117 | %{systemduserunitdir}/redshift.service | |
118 | %{systemduserunitdir}/redshift-gtk.service |