]> git.pld-linux.org Git - packages/redshift.git/blob - redshift.spec
- rebuild with python 3.8
[packages/redshift.git] / redshift.spec
1 Summary:        Adjusts the color temperature of your screen according to time of day
2 Name:           redshift
3 Version:        1.12
4 Release:        3
5 License:        GPL v3+
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)
27
28 %description
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.
32
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.
37
38 This package provides the base program.
39
40 %package -n %{name}-gtk
41 Summary:        GTK integration for Redshift
42 Group:          Applications/System
43 Requires:       %{name} = %{version}-%{release}
44 Requires:       gtk+3
45 Requires:       python3 >= 3.2
46 Requires:       python3-pyxdg
47 Obsoletes:      gtk-redshift
48
49 %description -n %{name}-gtk
50 This package provides GTK integration for Redshift, a screen color
51 temperature adjustment program.
52
53 %prep
54 %setup -q
55
56 %{__sed} -i -e '1s,^#!.*python3,#!%{__python3},' src/redshift-gtk/redshift-gtk.in
57
58 %build
59 %{__gettextize}
60 %{__intltoolize}
61 %{__aclocal} -I m4
62 %{__autoheader}
63 %{__automake}
64 %{__autoconf}
65 %configure \
66         am_cv_python_pythondir=%{py3_sitescriptdir} \
67         --disable-silent-rules \
68         --enable-drm \
69         --enable-geoclue \
70         --enable-geoclue2 \
71         --enable-gui \
72         --enable-randr \
73         --enable-vidmode \
74         --with-systemduserunitdir=%{systemduserunitdir}
75 %{__make}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 %{__make} install \
80         INSTALL="install -p" \
81         DESTDIR=$RPM_BUILD_ROOT
82
83 %py_postclean
84
85 %find_lang %{name}
86 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/redshift-gtk.desktop
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post -n %{name}-gtk
92 %update_icon_cache hicolor
93
94 %postun -n %{name}-gtk
95 %update_icon_cache hicolor
96
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*
102
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
This page took 0.05575 seconds and 3 git commands to generate.