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