2 # - use system jansson >= 2.6 library
5 %bcond_without nvidia_settings # build the main package
6 %bcond_without utils # build utils from samples dir
7 %bcond_without libXNVCtrl # build libXNVCtrl for external packages
9 Summary: Tool for configuring the NVIDIA driver
10 Summary(pl.UTF-8): Narzędzie do konfigurowania sterownika NVIDIA
12 # keep the version in sync with xorg-driver-video-nvidia.spec
15 License: GPL v2 (with MIT parts)
16 Group: X11/Applications
17 Source0: ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
18 # Source0-md5: 5d6ab3437d6a8fc0a0a30d7d4f43c11d
19 Source1: %{name}.desktop
21 Source3: %{name}-autostart.desktop
22 URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
23 BuildRequires: OpenGL-devel
24 BuildRequires: libvdpau-devel
25 BuildRequires: xorg-lib-libX11-devel
26 BuildRequires: xorg-lib-libXext-devel
27 BuildRequires: xorg-lib-libXv-devel
28 BuildRequires: xorg-lib-libXxf86vm-devel
29 %if %{with nvidia_settings}
30 BuildRequires: gtk+2-devel >= 2.0
32 BuildRequires: pkgconfig
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 The nvidia-settings utility is a tool for configuring the NVIDIA Linux
38 graphics driver. It operates by communicating with the NVIDIA X
39 driver, querying and updating state as appropriate. This communication
40 is done with the NV-CONTROL X extension.
42 Values such as brightness and gamma, XVideo attributes, temperature,
43 and OpenGL settings can be queried and configured via nvidia-settings.
45 When nvidia-settings starts, it reads the current settings from its
46 configuration file and sends those settings to the X server. Then, it
47 displays a graphical user interface (GUI) interface for configuring
48 the current settings. When nvidia-settings exits, it queries the
49 current settings from the X server and saves them to the configuration
52 %description -l pl.UTF-8
53 Narzędzie nvidia-settings służy do konfiguracji sterownika do kart
54 graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X
55 NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja
56 odbywa się poprzez rozszerzenie X NV-CONTROL.
58 Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
59 jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
62 Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku
63 konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie
64 wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji
65 ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
66 z serwera X i zapisuje je do pliku konfiguracyjnego.
68 %package -n libXNVCtrl-devel
69 Summary: libXNVCtrl development files
70 Summary(pl.UTF-8): Pliki programistyczne biblioteki libXNVCtrl
72 Group: Development/Libraries
73 Requires: xorg-lib-libX11-devel
74 Requires: xorg-lib-libXext-devel
75 Requires: xorg-lib-libXxf86vm-devel
76 Obsoletes: libXNVCtrl-static
78 %description -n libXNVCtrl-devel
79 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
81 %description -n libXNVCtrl-devel -l pl.UTF-8
82 Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
88 %{__rm} src/libXNVCtrl/libXNVCtrl.a
91 %if %{with libXNVCtrl}
92 %{__make} -C src/libXNVCtrl \
94 CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
98 %{__make} -C samples \
101 OUTPUTDIR=$(pwd)/_out/utils \
102 X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
105 %if %{with nvidia_settings}
110 X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
111 X_LDFLAGS="%{rpmldflags}"
115 rm -rf $RPM_BUILD_ROOT
116 %if %{with nvidia_settings}
117 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
119 INSTALL="install -p" \
121 DESTDIR=$RPM_BUILD_ROOT
122 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
123 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
124 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
127 %if %{with libXNVCtrl}
128 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
129 $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
130 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
131 rm -r $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}/_out
132 cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
133 cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
134 cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
135 cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
137 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
138 cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
141 includedir=${prefix}/include/NVCtrl
144 Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
146 Libs: -L${libdir} -lXNVCtrl
147 Cflags: -I${includedir}
153 install -d $RPM_BUILD_ROOT%{_bindir}
154 for prog in _out/utils/nv-control-*; do
160 install -p $prog $RPM_BUILD_ROOT%{_bindir}
165 rm -rf $RPM_BUILD_ROOT
167 %if %{with nvidia_settings}
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/nvidia-settings
172 %attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
173 %attr(755,root,root) %{_bindir}/nv-control-dpy
174 %attr(755,root,root) %{_bindir}/nv-control-dvc
175 %attr(755,root,root) %{_bindir}/nv-control-events
176 %attr(755,root,root) %{_bindir}/nv-control-framelock
177 %attr(755,root,root) %{_bindir}/nv-control-gvi
178 %attr(755,root,root) %{_bindir}/nv-control-info
179 %attr(755,root,root) %{_bindir}/nv-control-targets
180 %attr(755,root,root) %{_bindir}/nv-control-warpblend
182 %{_mandir}/man1/nvidia-settings.1*
183 %{_desktopdir}/nvidia-settings.desktop
184 %{_pixmapsdir}/nvidia-settings.png
185 /etc/xdg/autostart/%{name}.desktop
188 %if %{with libXNVCtrl}
189 %files -n libXNVCtrl-devel
190 %defattr(644,root,root,755)
191 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
192 %{_libdir}/libXNVCtrl.a
193 %{_includedir}/NVCtrl
194 %{_pkgconfigdir}/libXNVCtrl.pc
195 %{_examplesdir}/libXNVCtrl-%{version}