]> git.pld-linux.org Git - packages/redshift.git/blob - redshift.spec
97283a4490e59602342dc22707f81f6aa2380da3
[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.11
4 Release:        2
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:  a31d768b0348c5202e58612855a9027e
9 # Remove Ubuntu specific geoclue provider
10 Patch0:         %{name}-geoclue-provider.patch
11 # https://bugs.launchpad.net/redshift/+bug/888661
12 # http://bazaar.launchpad.net/~jonls/redshift/trunk/revision/165
13 URL:            http://jonls.dk/redshift/
14 BuildRequires:  GConf2-devel
15 BuildRequires:  autoconf >= 2.69
16 BuildRequires:  automake
17 BuildRequires:  desktop-file-utils
18 BuildRequires:  geoclue-devel
19 BuildRequires:  gettext-tools >= 0.17
20 BuildRequires:  glib2-devel >= 1:2.26
21 BuildRequires:  intltool >= 0.50
22 BuildRequires:  libdrm-devel
23 BuildRequires:  libxcb-devel
24 BuildRequires:  pkgconfig
25 BuildRequires:  python3 >= 3.2
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.219
28 BuildRequires:  sed >= 4.0
29 BuildRequires:  xorg-lib-libXxf86vm-devel
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Redshift adjusts the color temperature of your screen according to
34 your surroundings. This may help your eyes hurt less if you are
35 working in front of the screen at night.
36
37 The color temperature is set according to the position of the sun. A
38 different color temperature is set during night and daytime. During
39 twilight and early morning, the color temperature transitions smoothly
40 from night to daytime temperature to allow your eyes to slowly adapt.
41
42 This package provides the base program.
43
44 %package -n %{name}-gtk
45 Summary:        GTK integration for Redshift
46 Group:          Applications/System
47 Requires:       %{name} = %{version}-%{release}
48 Requires:       gtk+3
49 Requires:       python3 >= 3.2
50 Requires:       python3-pyxdg
51 Obsoletes:      gtk-redshift
52
53 %description -n %{name}-gtk
54 This package provides GTK integration for Redshift, a screen color
55 temperature adjustment program.
56
57 %prep
58 %setup -q
59 %patch0 -p1
60
61 %{__sed} -i -e '1s,^#!.*python3,#!%{__python3},' src/redshift-gtk/redshift-gtk.in
62
63 %build
64 %{__gettextize}
65 %{__intltoolize}
66 %{__aclocal} -I m4
67 %{__autoheader}
68 %{__automake}
69 %{__autoconf}
70 %configure \
71         am_cv_python_pythondir=%{py3_sitescriptdir} \
72         --disable-silent-rules \
73         --enable-drm \
74         --enable-geoclue \
75         --enable-geoclue2 \
76         --enable-gui \
77         --enable-randr \
78         --enable-vidmode
79 %{__make}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 %{__make} install \
84         INSTALL="install -p" \
85         DESTDIR=$RPM_BUILD_ROOT
86
87 %py_postclean
88
89 %find_lang %{name}
90 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/redshift-gtk.desktop
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %post -n %{name}-gtk
96 %update_icon_cache hicolor
97
98 %postun -n %{name}-gtk
99 %update_icon_cache hicolor
100
101 %files -f %{name}.lang
102 %defattr(644,root,root,755)
103 %doc DESIGN HACKING NEWS README README-colorramp redshift.conf.sample
104 %attr(755,root,root) %{_bindir}/redshift
105 %{_mandir}/man1/redshift.1*
106
107 %files -n %{name}-gtk
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_bindir}/redshift-gtk
110 %{_datadir}/appdata/redshift-gtk.appdata.xml
111 %{py3_sitescriptdir}/redshift_gtk
112 %{_iconsdir}/hicolor/scalable/apps/redshift*.svg
113 %{_desktopdir}/redshift.desktop
114 %{_desktopdir}/redshift-gtk.desktop
115 %{systemduserunitdir}/redshift.service
116 %{systemduserunitdir}/redshift-gtk.service
This page took 0.038923 seconds and 2 git commands to generate.