3 %bcond_without gtk3 # GTK+ 3.x GUI library for nvidia-settings
4 %bcond_without nvidia_settings # build the main package
5 %bcond_without utils # build utils from samples dir
6 %bcond_without libXNVCtrl # build libXNVCtrl for external packages
8 Summary: Tool for configuring the NVIDIA driver
9 Summary(pl.UTF-8): Narzędzie do konfigurowania sterownika NVIDIA
11 # keep the version in sync with xorg-driver-video-nvidia.spec
14 License: GPL v2 (with MIT parts)
15 Group: X11/Applications
16 Source0: https://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
17 # Source0-md5: fbd7109b7be233abfee967c1f4166e1a
18 Source1: %{name}.desktop
20 Source3: %{name}-autostart.desktop
21 URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
22 BuildRequires: OpenGL-devel
23 BuildRequires: libvdpau-devel >= 1.0
24 BuildRequires: xorg-lib-libX11-devel
25 BuildRequires: xorg-lib-libXext-devel
26 BuildRequires: xorg-lib-libXv-devel
27 BuildRequires: xorg-lib-libXxf86vm-devel
28 %if %{with nvidia_settings}
29 BuildRequires: gtk+2-devel >= 2.0
30 %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
31 BuildRequires: jansson-devel >= 2.2
33 BuildRequires: pkgconfig
34 BuildRequires: wayland-devel
36 Requires: %{name}-guilib = %{version}-%{release}
37 Requires: libvdpau >= 1.0
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 # requires symbols from main binary
41 %define skip_post_check_so libnvidia-gtk[23].so.*
44 %define _enable_debug_packages 0
48 The nvidia-settings utility is a tool for configuring the NVIDIA Linux
49 graphics driver. It operates by communicating with the NVIDIA X
50 driver, querying and updating state as appropriate. This communication
51 is done with the NV-CONTROL X extension.
53 Values such as brightness and gamma, XVideo attributes, temperature,
54 and OpenGL settings can be queried and configured via nvidia-settings.
56 When nvidia-settings starts, it reads the current settings from its
57 configuration file and sends those settings to the X server. Then, it
58 displays a graphical user interface (GUI) interface for configuring
59 the current settings. When nvidia-settings exits, it queries the
60 current settings from the X server and saves them to the configuration
63 %description -l pl.UTF-8
64 Narzędzie nvidia-settings służy do konfiguracji sterownika do kart
65 graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X
66 NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja
67 odbywa się poprzez rozszerzenie X NV-CONTROL.
69 Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
70 jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
73 Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku
74 konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie
75 wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji
76 ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
77 z serwera X i zapisuje je do pliku konfiguracyjnego.
80 Summary: GTK+ 2.x GUI library for nvidia-settings
81 Summary(pl.UTF-8): Biblioteka interfejsu graficznego GTK+ 2.x dla nvidia-settings
83 Requires: %{name} = %{version}-%{release}
84 Provides: %{name}-guilib = %{version}-%{release}
87 GTK+ 2.x GUI library for nvidia-settings.
89 %description gtk2 -l pl.UTF-8
90 Biblioteka interfejsu graficznego GTK+ 2.x dla nvidia-settings.
93 Summary: GTK+ 3.x GUI library for nvidia-settings
94 Summary(pl.UTF-8): Biblioteka interfejsu graficznego GTK+ 3.x dla nvidia-settings
96 Requires: %{name} = %{version}-%{release}
97 Provides: %{name}-guilib = %{version}-%{release}
100 GTK+ 3.x GUI library for nvidia-settings.
102 %description gtk3 -l pl.UTF-8
103 Biblioteka interfejsu graficznego GTK+ 3.x dla nvidia-settings.
105 %package -n libXNVCtrl-devel
106 Summary: libXNVCtrl development files
107 Summary(pl.UTF-8): Pliki programistyczne biblioteki libXNVCtrl
109 Group: Development/Libraries
110 Requires: xorg-lib-libX11-devel
111 Requires: xorg-lib-libXext-devel
112 Requires: xorg-lib-libXxf86vm-devel
113 Obsoletes: libXNVCtrl-static < 195.36.24
115 %description -n libXNVCtrl-devel
116 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
118 %description -n libXNVCtrl-devel -l pl.UTF-8
119 Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
126 %if %{with libXNVCtrl}
127 CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \
128 %{__make} -C src/libXNVCtrl \
135 CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \
136 %{__make} -C samples \
139 OUTPUTDIR=$(pwd)/_out/utils \
142 %if %{with nvidia_settings}
143 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
144 LDFLAGS="%{rpmldflags}" \
146 %{!?with_gtk3:BUILD_GTK3LIB=} \
147 NV_USE_BUNDLED_LIBJANSSON=0 \
157 rm -rf $RPM_BUILD_ROOT
158 %if %{with nvidia_settings}
159 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
161 NV_USE_BUNDLED_LIBJANSSON=0 \
163 INSTALL="install -p" \
164 LIBDIR="$RPM_BUILD_ROOT%{_libdir}" \
166 DESTDIR=$RPM_BUILD_ROOT
167 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
168 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
169 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
171 # let RPM autogenerate deps
172 chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
175 %if %{with libXNVCtrl}
176 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
177 $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
178 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
179 cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
180 cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
181 cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
182 cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
184 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
185 cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
188 includedir=${prefix}/include/NVCtrl
191 Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
193 Libs: -L${libdir} -lXNVCtrl
194 Cflags: -I${includedir}
200 install -d $RPM_BUILD_ROOT%{_bindir}
201 for prog in _out/utils/nv-control-*; do
207 install -p $prog $RPM_BUILD_ROOT%{_bindir}
212 rm -rf $RPM_BUILD_ROOT
214 %post -p /sbin/ldconfig
215 %postun -p /sbin/ldconfig
217 %post gtk2 -p /sbin/ldconfig
218 %postun gtk2 -p /sbin/ldconfig
220 %post gtk3 -p /sbin/ldconfig
221 %postun gtk3 -p /sbin/ldconfig
223 %if %{with nvidia_settings}
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_bindir}/nvidia-settings
228 %attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
229 %attr(755,root,root) %{_bindir}/nv-control-dpy
230 %attr(755,root,root) %{_bindir}/nv-control-dvc
231 %attr(755,root,root) %{_bindir}/nv-control-events
232 %attr(755,root,root) %{_bindir}/nv-control-framelock
233 %attr(755,root,root) %{_bindir}/nv-control-info
234 %attr(755,root,root) %{_bindir}/nv-control-targets
235 %attr(755,root,root) %{_bindir}/nv-control-warpblend
237 %attr(755,root,root) %{_libdir}/libnvidia-wayland-client.so.*
238 %{_mandir}/man1/nvidia-settings.1*
239 %{_desktopdir}/nvidia-settings.desktop
240 %{_pixmapsdir}/nvidia-settings.png
241 /etc/xdg/autostart/%{name}.desktop
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libnvidia-gtk2.so.%{version}
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/libnvidia-gtk3.so.%{version}
254 %if %{with libXNVCtrl}
255 %files -n libXNVCtrl-devel
256 %defattr(644,root,root,755)
257 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
258 %{_libdir}/libXNVCtrl.a
259 %{_includedir}/NVCtrl
260 %{_pkgconfigdir}/libXNVCtrl.pc
261 %{_examplesdir}/libXNVCtrl-%{version}