]>
Commit | Line | Data |
---|---|---|
836c5156 | 1 | # |
8594399f | 2 | # Conditional build: |
836c5156 | 3 | %bcond_without gtk3 # GTK+ 3.x GUI library for nvidia-settings |
5985f375 | 4 | %bcond_without nvidia_settings # build the main package |
d206696e JB |
5 | %bcond_without utils # build utils from samples dir |
6 | %bcond_without libXNVCtrl # build libXNVCtrl for external packages | |
59b8d072 | 7 | |
b27b2c83 | 8 | Summary: Tool for configuring the NVIDIA driver |
b7eb71c7 | 9 | Summary(pl.UTF-8): Narzędzie do konfigurowania sterownika NVIDIA |
b27b2c83 | 10 | Name: nvidia-settings |
702ac7b4 | 11 | # keep the version in sync with xorg-driver-video-nvidia.spec |
59c4e8f4 | 12 | Version: 535.104.05 |
8a101f3b | 13 | Release: 1 |
d206696e JB |
14 | License: GPL v2 (with MIT parts) |
15 | Group: X11/Applications | |
cc1cb27f | 16 | Source0: https://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2 |
59c4e8f4 | 17 | # Source0-md5: 7b1855d9a291754a750906cdb84770af |
1851a39d ER |
18 | Source1: %{name}.desktop |
19 | Source2: %{name}.png | |
a604bf49 | 20 | Source3: %{name}-autostart.desktop |
8594399f | 21 | URL: ftp://download.nvidia.com/XFree86/nvidia-settings/ |
ebe7e748 | 22 | BuildRequires: OpenGL-devel |
03034218 | 23 | BuildRequires: libvdpau-devel >= 1.0 |
fe2f88cc JR |
24 | BuildRequires: xorg-lib-libX11-devel |
25 | BuildRequires: xorg-lib-libXext-devel | |
ebe7e748 | 26 | BuildRequires: xorg-lib-libXv-devel |
765f7fba | 27 | BuildRequires: xorg-lib-libXxf86vm-devel |
b27b2c83 | 28 | %if %{with nvidia_settings} |
d206696e | 29 | BuildRequires: gtk+2-devel >= 2.0 |
836c5156 | 30 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0} |
1426af00 | 31 | BuildRequires: jansson-devel >= 2.2 |
728ab98a | 32 | BuildRequires: m4 |
4a9d0e43 | 33 | BuildRequires: pkgconfig |
5e499781 | 34 | BuildRequires: wayland-devel |
b27b2c83 | 35 | %endif |
e3a40cfa | 36 | Requires(post,postun): desktop-file-utils |
836c5156 | 37 | Requires: %{name}-guilib = %{version}-%{release} |
03034218 | 38 | Requires: libvdpau >= 1.0 |
b27b2c83 ER |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
20678b9b | 41 | # requires symbols from main binary |
836c5156 | 42 | %define skip_post_check_so libnvidia-gtk[23].so.* |
20678b9b | 43 | |
f87abd90 MK |
44 | %if !%{with utils} |
45 | %define _enable_debug_packages 0 | |
46 | %endif | |
47 | ||
b27b2c83 | 48 | %description |
e7c6a80e ER |
49 | The nvidia-settings utility is a tool for configuring the NVIDIA Linux |
50 | graphics driver. It operates by communicating with the NVIDIA X | |
b27b2c83 ER |
51 | driver, querying and updating state as appropriate. This communication |
52 | is done with the NV-CONTROL X extension. | |
53 | ||
54 | Values such as brightness and gamma, XVideo attributes, temperature, | |
55 | and OpenGL settings can be queried and configured via nvidia-settings. | |
56 | ||
57 | When nvidia-settings starts, it reads the current settings from its | |
58 | configuration file and sends those settings to the X server. Then, it | |
59 | displays a graphical user interface (GUI) interface for configuring | |
60 | the current settings. When nvidia-settings exits, it queries the | |
61 | current settings from the X server and saves them to the configuration | |
62 | file. | |
63 | ||
8798252c JR |
64 | %description -l pl.UTF-8 |
65 | Narzędzie nvidia-settings służy do konfiguracji sterownika do kart | |
66 | graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X | |
67 | NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja | |
68 | odbywa się poprzez rozszerzenie X NV-CONTROL. | |
8594399f | 69 | |
8798252c JR |
70 | Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie |
71 | jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i | |
8594399f JB |
72 | ustawienia OpenGL. |
73 | ||
8798252c JR |
74 | Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku |
75 | konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie | |
76 | wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji | |
77 | ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia | |
8594399f JB |
78 | z serwera X i zapisuje je do pliku konfiguracyjnego. |
79 | ||
836c5156 JB |
80 | %package gtk2 |
81 | Summary: GTK+ 2.x GUI library for nvidia-settings | |
82 | Summary(pl.UTF-8): Biblioteka interfejsu graficznego GTK+ 2.x dla nvidia-settings | |
83 | Group: X11/Libraries | |
84 | Requires: %{name} = %{version}-%{release} | |
85 | Provides: %{name}-guilib = %{version}-%{release} | |
86 | ||
87 | %description gtk2 | |
88 | GTK+ 2.x GUI library for nvidia-settings. | |
89 | ||
90 | %description gtk2 -l pl.UTF-8 | |
91 | Biblioteka interfejsu graficznego GTK+ 2.x dla nvidia-settings. | |
92 | ||
93 | %package gtk3 | |
94 | Summary: GTK+ 3.x GUI library for nvidia-settings | |
95 | Summary(pl.UTF-8): Biblioteka interfejsu graficznego GTK+ 3.x dla nvidia-settings | |
96 | Group: X11/Libraries | |
97 | Requires: %{name} = %{version}-%{release} | |
98 | Provides: %{name}-guilib = %{version}-%{release} | |
99 | ||
100 | %description gtk3 | |
101 | GTK+ 3.x GUI library for nvidia-settings. | |
102 | ||
103 | %description gtk3 -l pl.UTF-8 | |
104 | Biblioteka interfejsu graficznego GTK+ 3.x dla nvidia-settings. | |
105 | ||
b27b2c83 | 106 | %package -n libXNVCtrl-devel |
d206696e JB |
107 | Summary: libXNVCtrl development files |
108 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libXNVCtrl | |
109 | License: MIT | |
b27b2c83 | 110 | Group: Development/Libraries |
765f7fba JR |
111 | Requires: xorg-lib-libX11-devel |
112 | Requires: xorg-lib-libXext-devel | |
113 | Requires: xorg-lib-libXxf86vm-devel | |
230f6309 | 114 | Obsoletes: libXNVCtrl-static < 195.36.24 |
b27b2c83 ER |
115 | |
116 | %description -n libXNVCtrl-devel | |
765f7fba | 117 | Library for accessing NV-CONTROL extension in NVIDIA's latest drivers. |
8594399f | 118 | |
8798252c | 119 | %description -n libXNVCtrl-devel -l pl.UTF-8 |
765f7fba JR |
120 | Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych |
121 | sterowników NVIDIA. | |
8594399f | 122 | |
b27b2c83 | 123 | %prep |
b83fa72b ER |
124 | %setup -q |
125 | ||
b27b2c83 ER |
126 | %build |
127 | %if %{with libXNVCtrl} | |
5ae1b032 | 128 | CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \ |
b83fa72b | 129 | %{__make} -C src/libXNVCtrl \ |
1426af00 | 130 | NV_VERBOSE=1 \ |
4a9d0e43 | 131 | CC="%{__cc}" \ |
7f54d198 | 132 | OUTPUTDIR=. |
b27b2c83 ER |
133 | %endif |
134 | ||
2dece988 | 135 | %if %{with utils} |
5ae1b032 | 136 | CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \ |
2dece988 ER |
137 | %{__make} -C samples \ |
138 | NV_VERBOSE=1 \ | |
139 | CC="%{__cc}" \ | |
140 | OUTPUTDIR=$(pwd)/_out/utils \ | |
2dece988 ER |
141 | %endif |
142 | ||
b27b2c83 | 143 | %if %{with nvidia_settings} |
5ae1b032 JP |
144 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ |
145 | LDFLAGS="%{rpmldflags}" \ | |
1426af00 | 146 | %{__make} -C src \ |
836c5156 | 147 | %{!?with_gtk3:BUILD_GTK3LIB=} \ |
1426af00 | 148 | NV_USE_BUNDLED_LIBJANSSON=0 \ |
b83fa72b ER |
149 | NV_VERBOSE=1 \ |
150 | STRIP_CMD=: \ | |
5ae1b032 | 151 | CC="%{__cc}" |
1426af00 JB |
152 | |
153 | %{__make} -C doc \ | |
154 | NV_VERBOSE=1 | |
b27b2c83 ER |
155 | %endif |
156 | ||
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | %if %{with nvidia_settings} | |
a604bf49 | 160 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart} |
b83fa72b | 161 | %{__make} install \ |
1426af00 JB |
162 | NV_USE_BUNDLED_LIBJANSSON=0 \ |
163 | NV_VERBOSE=1 \ | |
b83fa72b | 164 | INSTALL="install -p" \ |
20678b9b | 165 | LIBDIR="$RPM_BUILD_ROOT%{_libdir}" \ |
702ac7b4 ER |
166 | PREFIX=%{_prefix} \ |
167 | DESTDIR=$RPM_BUILD_ROOT | |
1851a39d ER |
168 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
169 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} | |
a604bf49 | 170 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop |
20678b9b | 171 | |
836c5156 JB |
172 | # let RPM autogenerate deps |
173 | chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so* | |
b27b2c83 ER |
174 | %endif |
175 | ||
176 | %if %{with libXNVCtrl} | |
765f7fba JR |
177 | install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \ |
178 | $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl} | |
eac12459 | 179 | cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} |
958f068f | 180 | cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl |
3917229f ER |
181 | cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl |
182 | cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl | |
183 | cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir} | |
958f068f ER |
184 | |
185 | install -d $RPM_BUILD_ROOT%{_pkgconfigdir} | |
186 | cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc | |
187 | prefix=%{_prefix} | |
188 | libdir=%{_libdir} | |
189 | includedir=${prefix}/include/NVCtrl | |
190 | ||
191 | Name: libXNVCtrl | |
192 | Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers. | |
193 | Version: %{version} | |
194 | Libs: -L${libdir} -lXNVCtrl | |
195 | Cflags: -I${includedir} | |
196 | EOF | |
197 | #' | |
b27b2c83 ER |
198 | %endif |
199 | ||
2dece988 ER |
200 | %if %{with utils} |
201 | install -d $RPM_BUILD_ROOT%{_bindir} | |
202 | for prog in _out/utils/nv-control-*; do | |
203 | case "$prog" in | |
204 | *.*) | |
205 | continue | |
206 | ;; | |
207 | esac | |
208 | install -p $prog $RPM_BUILD_ROOT%{_bindir} | |
209 | done | |
210 | %endif | |
211 | ||
b27b2c83 ER |
212 | %clean |
213 | rm -rf $RPM_BUILD_ROOT | |
214 | ||
e3a40cfa JP |
215 | %post |
216 | /sbin/ldconfig | |
217 | %update_desktop_database_post | |
218 | ||
219 | %postun | |
220 | /sbin/ldconfig | |
221 | %update_desktop_database_postun | |
5e499781 | 222 | |
836c5156 JB |
223 | %post gtk2 -p /sbin/ldconfig |
224 | %postun gtk2 -p /sbin/ldconfig | |
225 | ||
226 | %post gtk3 -p /sbin/ldconfig | |
227 | %postun gtk3 -p /sbin/ldconfig | |
228 | ||
b27b2c83 ER |
229 | %if %{with nvidia_settings} |
230 | %files | |
231 | %defattr(644,root,root,755) | |
1851a39d | 232 | %attr(755,root,root) %{_bindir}/nvidia-settings |
2dece988 ER |
233 | %if %{with utils} |
234 | %attr(755,root,root) %{_bindir}/nv-control-3dvisionpro | |
235 | %attr(755,root,root) %{_bindir}/nv-control-dpy | |
236 | %attr(755,root,root) %{_bindir}/nv-control-dvc | |
237 | %attr(755,root,root) %{_bindir}/nv-control-events | |
238 | %attr(755,root,root) %{_bindir}/nv-control-framelock | |
2dece988 ER |
239 | %attr(755,root,root) %{_bindir}/nv-control-info |
240 | %attr(755,root,root) %{_bindir}/nv-control-targets | |
c7c6d261 | 241 | %attr(755,root,root) %{_bindir}/nv-control-warpblend |
2dece988 | 242 | %endif |
5e499781 | 243 | %attr(755,root,root) %{_libdir}/libnvidia-wayland-client.so.* |
d206696e JB |
244 | %{_mandir}/man1/nvidia-settings.1* |
245 | %{_desktopdir}/nvidia-settings.desktop | |
246 | %{_pixmapsdir}/nvidia-settings.png | |
247 | /etc/xdg/autostart/%{name}.desktop | |
836c5156 JB |
248 | |
249 | %files gtk2 | |
250 | %defattr(644,root,root,755) | |
251 | %attr(755,root,root) %{_libdir}/libnvidia-gtk2.so.%{version} | |
252 | ||
253 | %if %{with gtk3} | |
254 | %files gtk3 | |
255 | %defattr(644,root,root,755) | |
256 | %attr(755,root,root) %{_libdir}/libnvidia-gtk3.so.%{version} | |
257 | %endif | |
d206696e | 258 | %endif |
2dece988 | 259 | |
8594399f | 260 | %if %{with libXNVCtrl} |
b27b2c83 ER |
261 | %files -n libXNVCtrl-devel |
262 | %defattr(644,root,root,755) | |
eac12459 | 263 | %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt |
765f7fba | 264 | %{_libdir}/libXNVCtrl.a |
958f068f ER |
265 | %{_includedir}/NVCtrl |
266 | %{_pkgconfigdir}/libXNVCtrl.pc | |
eac12459 | 267 | %{_examplesdir}/libXNVCtrl-%{version} |
8594399f | 268 | %endif |