3 %bcond_without nvidia_settings # build the main package
4 %bcond_without utils # build utils from samples dir
5 %bcond_without libXNVCtrl # build libXNVCtrl for http://websvn.kde.org/trunk/kdenonbeta/nvidia/
7 Summary: Tool for configuring the NVIDIA driver
8 Summary(pl.UTF-8): Narzędzie do konfigurowania sterownika NVIDIA
10 # keep the version in sync with xorg-driver-video-nvidia.spec
15 Source0: ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
16 # Source0-md5: f2ac57a1e659549555205bbb3815dd37
17 Source1: %{name}.desktop
19 Source3: %{name}-autostart.desktop
20 URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
21 BuildRequires: OpenGL-devel
22 BuildRequires: xorg-lib-libX11-devel
23 BuildRequires: xorg-lib-libXext-devel
24 BuildRequires: xorg-lib-libXv-devel
25 BuildRequires: xorg-lib-libXxf86vm-devel
26 %if %{with nvidia_settings}
27 BuildRequires: gtk+2-devel
29 BuildRequires: pkgconfig
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 The nvidia-settings utility is a tool for configuring the NVIDIA Linux
35 graphics driver. It operates by communicating with the NVIDIA X
36 driver, querying and updating state as appropriate. This communication
37 is done with the NV-CONTROL X extension.
39 Values such as brightness and gamma, XVideo attributes, temperature,
40 and OpenGL settings can be queried and configured via nvidia-settings.
42 When nvidia-settings starts, it reads the current settings from its
43 configuration file and sends those settings to the X server. Then, it
44 displays a graphical user interface (GUI) interface for configuring
45 the current settings. When nvidia-settings exits, it queries the
46 current settings from the X server and saves them to the configuration
49 %description -l pl.UTF-8
50 Narzędzie nvidia-settings służy do konfiguracji sterownika do kart
51 graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X
52 NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja
53 odbywa się poprzez rozszerzenie X NV-CONTROL.
55 Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
56 jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
59 Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku
60 konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie
61 wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji
62 ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
63 z serwera X i zapisuje je do pliku konfiguracyjnego.
65 %package -n libXNVCtrl-devel
66 Summary: libXNVCtrl development headers
67 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libXNVCtrl
68 Group: Development/Libraries
69 Requires: xorg-lib-libX11-devel
70 Requires: xorg-lib-libXext-devel
71 Requires: xorg-lib-libXxf86vm-devel
72 Obsoletes: libXNVCtrl-static
74 %description -n libXNVCtrl-devel
75 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
77 %description -n libXNVCtrl-devel -l pl.UTF-8
78 Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
84 %{__rm} src/libXNVCtrl/libXNVCtrl.a
87 %if %{with libXNVCtrl}
88 %{__make} -C src/libXNVCtrl \
91 X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
95 %{__make} -C samples \
98 OUTPUTDIR=$(pwd)/_out/utils \
99 X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
102 %if %{with nvidia_settings}
107 X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
108 X_LDFLAGS="%{rpmldflags}"
112 rm -rf $RPM_BUILD_ROOT
113 %if %{with nvidia_settings}
114 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
116 INSTALL="install -p" \
118 DESTDIR=$RPM_BUILD_ROOT
119 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
120 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
121 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
124 %if %{with libXNVCtrl}
125 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
126 $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
127 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
128 rm -r $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}/_out
129 cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
130 cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
131 cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
132 cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
134 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
135 cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
138 includedir=${prefix}/include/NVCtrl
141 Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
143 Libs: -L${libdir} -lXNVCtrl
144 Cflags: -I${includedir}
150 install -d $RPM_BUILD_ROOT%{_bindir}
151 for prog in _out/utils/nv-control-*; do
157 install -p $prog $RPM_BUILD_ROOT%{_bindir}
162 rm -rf $RPM_BUILD_ROOT
164 %if %{with nvidia_settings}
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_bindir}/nvidia-settings
168 %{_mandir}/man1/nvidia-settings.1*
169 %{_desktopdir}/nvidia-settings.desktop
170 %{_pixmapsdir}/nvidia-settings.png
171 /etc/xdg/autostart/%{name}.desktop
175 %attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
176 %attr(755,root,root) %{_bindir}/nv-control-dpy
177 %attr(755,root,root) %{_bindir}/nv-control-dvc
178 %attr(755,root,root) %{_bindir}/nv-control-events
179 %attr(755,root,root) %{_bindir}/nv-control-framelock
180 %attr(755,root,root) %{_bindir}/nv-control-gvi
181 %attr(755,root,root) %{_bindir}/nv-control-info
182 %attr(755,root,root) %{_bindir}/nv-control-targets
185 %if %{with libXNVCtrl}
186 %files -n libXNVCtrl-devel
187 %defattr(644,root,root,755)
188 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
189 %{_libdir}/libXNVCtrl.a
190 %{_includedir}/NVCtrl
191 %{_pkgconfigdir}/libXNVCtrl.pc
192 %{_examplesdir}/libXNVCtrl-%{version}