3 %bcond_without nvidia_settings # build the main package
4 %bcond_without libXNVCtrl # build libXNVCtrl for http://websvn.kde.org/trunk/kdenonbeta/nvidia/
6 Summary: Tool for configuring the NVIDIA driver
7 Summary(pl.UTF-8): Narzędzie do konfigurowania sterownika NVIDIA
13 Source0: ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.gz
14 # Source0-md5: 43008cf2cec84fa27ee6f315845d50f7
15 Patch0: %{name}-xlibs.patch
16 URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
17 BuildRequires: xorg-lib-libX11-devel
18 BuildRequires: xorg-lib-libXext-devel
19 BuildRequires: xorg-lib-libXxf86vm-devel
20 %if %{with nvidia_settings}
21 BuildRequires: gtk+2-devel
23 BuildRequires: pkgconfig
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The `nvidia-settings` utility is a tool for configuring the NVIDIA
29 Linux graphics driver. It operates by communicating with the NVIDIA X
30 driver, querying and updating state as appropriate. This communication
31 is done with the NV-CONTROL X extension.
33 Values such as brightness and gamma, XVideo attributes, temperature,
34 and OpenGL settings can be queried and configured via nvidia-settings.
36 When nvidia-settings starts, it reads the current settings from its
37 configuration file and sends those settings to the X server. Then, it
38 displays a graphical user interface (GUI) interface for configuring
39 the current settings. When nvidia-settings exits, it queries the
40 current settings from the X server and saves them to the configuration
43 %description -l pl.UTF-8
44 Narzędzie nvidia-settings służy do konfiguracji sterownika do kart
45 graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X
46 NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja
47 odbywa się poprzez rozszerzenie X NV-CONTROL.
49 Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
50 jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
53 Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku
54 konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie
55 wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji
56 ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
57 z serwera X i zapisuje je do pliku konfiguracyjnego.
59 %package -n libXNVCtrl-devel
60 Summary: libXNVCtrl development headers
61 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libXNVCtrl
62 Group: Development/Libraries
63 Requires: xorg-lib-libX11-devel
64 Requires: xorg-lib-libXext-devel
65 Requires: xorg-lib-libXxf86vm-devel
66 Obsoletes: libXNVCtrl-static
68 %description -n libXNVCtrl-devel
69 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
71 %description -n libXNVCtrl-devel -l pl.UTF-8
72 Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
76 %setup -q -n %{name}-1.0
80 %if %{with libXNVCtrl}
85 CFLAGS="%{rpmcflags} -fPIC"
89 %if %{with nvidia_settings}
92 CFLAGS="%{rpmcflags}" \
93 LDFLAGS="%{rpmldflags}"
97 rm -rf $RPM_BUILD_ROOT
98 %if %{with nvidia_settings}
99 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
100 install nvidia-settings $RPM_BUILD_ROOT%{_bindir}
101 install doc/nvidia-settings.1 $RPM_BUILD_ROOT%{_mandir}/man1/nvidia-settings.1
104 %if %{with libXNVCtrl}
105 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
106 $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
107 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
108 install -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
109 install -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
110 install -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
114 rm -rf $RPM_BUILD_ROOT
116 %if %{with nvidia_settings}
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_bindir}/%{name}
123 %if %{with libXNVCtrl}
124 %files -n libXNVCtrl-devel
125 %defattr(644,root,root,755)
126 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
127 %{_includedir}/NVCtrl/NVCtrl.h
128 %{_includedir}/NVCtrl/NVCtrlLib.h
129 %{_libdir}/libXNVCtrl.a
130 %{_examplesdir}/libXNVCtrl-%{version}