]> git.pld-linux.org Git - packages/redshift.git/blob - redshift.spec
rebuild with python 3.10
[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:        8
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) >= 2.011
23 BuildRequires:  sed >= 4.0
24 BuildRequires:  xorg-lib-libX11-devel
25 BuildRequires:  xorg-lib-libXxf86vm-devel
26 Requires(post,preun):   systemd-units >= 1:250.1
27 Requires:       systemd-units >= 1:250.1
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
42 %package gtk
43 Summary:        GTK integration for Redshift
44 Group:          Applications/System
45 Requires:       %{name} = %{version}-%{release}
46 Requires:       gtk+3
47 Requires:       python3 >= 3.2
48 Requires:       python3-pyxdg
49 Obsoletes:      gtk-redshift
50
51 %description gtk
52 This package provides GTK integration for Redshift, a screen color
53 temperature adjustment program.
54
55 %prep
56 %setup -q
57
58 %{__sed} -i -e '1s,^#!.*python3,#!%{__python3},' src/redshift-gtk/redshift-gtk.in
59
60 %build
61 %{__gettextize}
62 %{__intltoolize}
63 %{__aclocal} -I m4
64 %{__autoheader}
65 %{__automake}
66 %{__autoconf}
67 %configure \
68         am_cv_python_pythondir=%{py3_sitescriptdir} \
69         --disable-silent-rules \
70         --enable-drm \
71         --enable-geoclue \
72         --enable-geoclue2 \
73         --enable-gui \
74         --enable-randr \
75         --enable-vidmode \
76         --with-systemduserunitdir=%{systemduserunitdir}
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}
88 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/redshift-gtk.desktop
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post gtk
94 %update_icon_cache hicolor
95 %systemd_user_post redshift-gtk.service
96
97 %preun gtk
98 %systemd_user_preun redshift-gtk.service
99
100 %postun gtk
101 %update_icon_cache hicolor
102
103 %files -f %{name}.lang
104 %defattr(644,root,root,755)
105 %doc CONTRIBUTING.md DESIGN NEWS README README-colorramp redshift.conf.sample
106 %attr(755,root,root) %{_bindir}/redshift
107 %{_mandir}/man1/redshift.1*
108
109 %files gtk
110 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_bindir}/redshift-gtk
112 %{_datadir}/appdata/redshift-gtk.appdata.xml
113 %{py3_sitescriptdir}/redshift_gtk
114 %{_iconsdir}/hicolor/scalable/apps/redshift*.svg
115 %{_desktopdir}/redshift.desktop
116 %{_desktopdir}/redshift-gtk.desktop
117 %{systemduserunitdir}/redshift.service
118 %{systemduserunitdir}/redshift-gtk.service
This page took 0.047138 seconds and 3 git commands to generate.