]> git.pld-linux.org Git - packages/redshift.git/blame - redshift.spec
rebuild with python 3.10
[packages/redshift.git] / redshift.spec
CommitLineData
f16f24f7
ER
1Summary: Adjusts the color temperature of your screen according to time of day
2Name: redshift
7e8dc93f 3Version: 1.12
5020299d 4Release: 8
f16f24f7
ER
5License: GPL v3+
6Group: Applications/System
53fd8a1a 7Source0: https://github.com/jonls/redshift/releases/download/v%{version}/%{name}-%{version}.tar.xz
7e8dc93f 8# Source0-md5: 5d04f2413dacdf3434cb86f373842462
f16f24f7 9URL: http://jonls.dk/redshift/
b3b8c222
JP
10BuildRequires: autoconf >= 2.69
11BuildRequires: automake
f16f24f7 12BuildRequires: desktop-file-utils
b3b8c222
JP
13BuildRequires: gettext-tools >= 0.17
14BuildRequires: glib2-devel >= 1:2.26
15BuildRequires: intltool >= 0.50
16BuildRequires: libdrm-devel
7e8dc93f 17BuildRequires: libtool
b3b8c222 18BuildRequires: libxcb-devel
6412d4fd 19BuildRequires: pkgconfig
a3b98209 20BuildRequires: python3 >= 3.2
f16f24f7 21BuildRequires: rpm-pythonprov
5e94f8ec 22BuildRequires: rpmbuild(macros) >= 2.011
a3b98209 23BuildRequires: sed >= 4.0
7e8dc93f 24BuildRequires: xorg-lib-libX11-devel
f16f24f7 25BuildRequires: xorg-lib-libXxf86vm-devel
5e94f8ec
JR
26Requires(post,preun): systemd-units >= 1:250.1
27Requires: systemd-units >= 1:250.1
f16f24f7
ER
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31Redshift adjusts the color temperature of your screen according to
32your surroundings. This may help your eyes hurt less if you are
33working in front of the screen at night.
34
35The color temperature is set according to the position of the sun. A
36different color temperature is set during night and daytime. During
37twilight and early morning, the color temperature transitions smoothly
38from night to daytime temperature to allow your eyes to slowly adapt.
39
40This package provides the base program.
41
5e94f8ec 42%package gtk
f16f24f7
ER
43Summary: GTK integration for Redshift
44Group: Applications/System
45Requires: %{name} = %{version}-%{release}
b3b8c222
JP
46Requires: gtk+3
47Requires: python3 >= 3.2
48Requires: python3-pyxdg
a3b98209 49Obsoletes: gtk-redshift
f16f24f7 50
5e94f8ec 51%description gtk
f16f24f7
ER
52This package provides GTK integration for Redshift, a screen color
53temperature 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
80rm -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 88desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/redshift-gtk.desktop
f16f24f7
ER
89
90%clean
91rm -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
This page took 0.119187 seconds and 4 git commands to generate.