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.bz2
14 # Source0-md5: e9fd5dcb7f69c12334d199a783544d42
15 Source1: %{name}.desktop
17 URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
18 BuildRequires: OpenGL-devel
19 BuildRequires: xorg-lib-libX11-devel
20 BuildRequires: xorg-lib-libXext-devel
21 BuildRequires: xorg-lib-libXv-devel
22 BuildRequires: xorg-lib-libXxf86vm-devel
23 %if %{with nvidia_settings}
24 BuildRequires: gtk+2-devel
26 BuildRequires: pkgconfig
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 The `nvidia-settings` utility is a tool for configuring the NVIDIA
32 Linux graphics driver. It operates by communicating with the NVIDIA X
33 driver, querying and updating state as appropriate. This communication
34 is done with the NV-CONTROL X extension.
36 Values such as brightness and gamma, XVideo attributes, temperature,
37 and OpenGL settings can be queried and configured via nvidia-settings.
39 When nvidia-settings starts, it reads the current settings from its
40 configuration file and sends those settings to the X server. Then, it
41 displays a graphical user interface (GUI) interface for configuring
42 the current settings. When nvidia-settings exits, it queries the
43 current settings from the X server and saves them to the configuration
46 %description -l pl.UTF-8
47 Narzędzie nvidia-settings służy do konfiguracji sterownika do kart
48 graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X
49 NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja
50 odbywa się poprzez rozszerzenie X NV-CONTROL.
52 Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
53 jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
56 Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku
57 konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie
58 wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji
59 ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
60 z serwera X i zapisuje je do pliku konfiguracyjnego.
62 %package -n libXNVCtrl-devel
63 Summary: libXNVCtrl development headers
64 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libXNVCtrl
65 Group: Development/Libraries
66 Requires: xorg-lib-libX11-devel
67 Requires: xorg-lib-libXext-devel
68 Requires: xorg-lib-libXxf86vm-devel
69 Obsoletes: libXNVCtrl-static
71 %description -n libXNVCtrl-devel
72 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
74 %description -n libXNVCtrl-devel -l pl.UTF-8
75 Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
81 %{__rm} src/libXNVCtrl/libXNVCtrl.a
84 %if %{with libXNVCtrl}
85 %{__make} -C src/libXNVCtrl \
88 X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
91 %if %{with nvidia_settings}
96 X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
97 X_LDFLAGS="%{rpmldflags}"
101 rm -rf $RPM_BUILD_ROOT
102 %if %{with nvidia_settings}
103 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir}}
105 INSTALL="install -p" \
106 prefix=$RPM_BUILD_ROOT%{_prefix}
107 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
108 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
111 %if %{with libXNVCtrl}
112 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
113 $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
114 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
115 cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
116 cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
117 cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
121 rm -rf $RPM_BUILD_ROOT
123 %if %{with nvidia_settings}
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_bindir}/nvidia-settings
127 %{_mandir}/man1/nvidia-settings.1*
128 %{_desktopdir}/nvidia-settings.desktop
129 %{_pixmapsdir}/nvidia-settings.png
132 %if %{with libXNVCtrl}
133 %files -n libXNVCtrl-devel
134 %defattr(644,root,root,755)
135 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
136 %dir %{_includedir}/NVCtrl
137 %{_includedir}/NVCtrl/NVCtrl.h
138 %{_includedir}/NVCtrl/NVCtrlLib.h
139 %{_libdir}/libXNVCtrl.a
140 %{_examplesdir}/libXNVCtrl-%{version}