]> git.pld-linux.org Git - packages/nvidia-settings.git/blob - nvidia-settings.spec
up to 545.29.06
[packages/nvidia-settings.git] / nvidia-settings.spec
1 #
2 # Conditional build:
3 %bcond_without  gtk3            # GTK+ 3.x GUI library for nvidia-settings
4 %bcond_without  nvidia_settings # build the main package
5 %bcond_without  utils           # build utils from samples dir
6 %bcond_without  libXNVCtrl      # build libXNVCtrl for external packages
7
8 Summary:        Tool for configuring the NVIDIA driver
9 Summary(pl.UTF-8):      Narzędzie do konfigurowania sterownika NVIDIA
10 Name:           nvidia-settings
11 # keep the version in sync with xorg-driver-video-nvidia.spec
12 Version:        545.29.06
13 Release:        1
14 License:        GPL v2 (with MIT parts)
15 Group:          X11/Applications
16 Source0:        https://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
17 # Source0-md5:  b5bb34001d4312a0058461dea471918f
18 Source1:        %{name}.desktop
19 Source2:        %{name}.png
20 Source3:        %{name}-autostart.desktop
21 URL:            ftp://download.nvidia.com/XFree86/nvidia-settings/
22 BuildRequires:  OpenGL-devel
23 BuildRequires:  libvdpau-devel >= 1.0
24 BuildRequires:  xorg-lib-libX11-devel
25 BuildRequires:  xorg-lib-libXext-devel
26 BuildRequires:  xorg-lib-libXv-devel
27 BuildRequires:  xorg-lib-libXxf86vm-devel
28 %if %{with nvidia_settings}
29 BuildRequires:  gtk+2-devel >= 2.0
30 %{?with_gtk3:BuildRequires:     gtk+3-devel >= 3.0}
31 BuildRequires:  jansson-devel >= 2.2
32 BuildRequires:  m4
33 BuildRequires:  pkgconfig
34 BuildRequires:  wayland-devel
35 %endif
36 Requires(post,postun):  desktop-file-utils
37 Requires:       %{name}-guilib = %{version}-%{release}
38 Requires:       libvdpau >= 1.0
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 # requires symbols from main binary
42 %define         skip_post_check_so      libnvidia-gtk[23].so.*
43
44 %if !%{with utils}
45 %define         _enable_debug_packages  0
46 %endif
47
48 %description
49 The nvidia-settings utility is a tool for configuring the NVIDIA Linux
50 graphics driver. It operates by communicating with the NVIDIA X
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
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.
69
70 Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
71 jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
72 ustawienia OpenGL.
73
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
78 z serwera X i zapisuje je do pliku konfiguracyjnego.
79
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
106 %package -n libXNVCtrl-devel
107 Summary:        libXNVCtrl development files
108 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libXNVCtrl
109 License:        MIT
110 Group:          Development/Libraries
111 Requires:       xorg-lib-libX11-devel
112 Requires:       xorg-lib-libXext-devel
113 Requires:       xorg-lib-libXxf86vm-devel
114 Obsoletes:      libXNVCtrl-static < 195.36.24
115
116 %description -n libXNVCtrl-devel
117 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
118
119 %description -n libXNVCtrl-devel -l pl.UTF-8
120 Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
121 sterowników NVIDIA.
122
123 %prep
124 %setup -q
125
126 %build
127 %if %{with libXNVCtrl}
128 CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \
129 %{__make} -C src/libXNVCtrl \
130         NV_VERBOSE=1 \
131         CC="%{__cc}" \
132         OUTPUTDIR=.
133 %endif
134
135 %if %{with utils}
136 CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \
137 %{__make} -C samples \
138         NV_VERBOSE=1 \
139         CC="%{__cc}" \
140         OUTPUTDIR=$(pwd)/_out/utils \
141 %endif
142
143 %if %{with nvidia_settings}
144 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
145 LDFLAGS="%{rpmldflags}" \
146 %{__make} -C src \
147         %{!?with_gtk3:BUILD_GTK3LIB=} \
148         NV_USE_BUNDLED_LIBJANSSON=0 \
149         NV_VERBOSE=1 \
150         STRIP_CMD=: \
151         CC="%{__cc}"
152
153 %{__make} -C doc \
154         NV_VERBOSE=1
155 %endif
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159 %if %{with nvidia_settings}
160 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
161 %{__make} install \
162         NV_USE_BUNDLED_LIBJANSSON=0 \
163         NV_VERBOSE=1 \
164         INSTALL="install -p" \
165         LIBDIR="$RPM_BUILD_ROOT%{_libdir}" \
166         PREFIX=%{_prefix} \
167         DESTDIR=$RPM_BUILD_ROOT
168 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
169 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
170 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
171
172 # let RPM autogenerate deps
173 chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
174 %endif
175
176 %if %{with libXNVCtrl}
177 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
178         $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
179 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
180 cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
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}
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 #'
198 %endif
199
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
212 %clean
213 rm -rf $RPM_BUILD_ROOT
214
215 %post
216 /sbin/ldconfig
217 %update_desktop_database_post
218
219 %postun
220 /sbin/ldconfig
221 %update_desktop_database_postun
222
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
229 %if %{with nvidia_settings}
230 %files
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_bindir}/nvidia-settings
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
239 %attr(755,root,root) %{_bindir}/nv-control-info
240 %attr(755,root,root) %{_bindir}/nv-control-targets
241 %attr(755,root,root) %{_bindir}/nv-control-warpblend
242 %endif
243 %attr(755,root,root) %{_libdir}/libnvidia-wayland-client.so.*
244 %{_mandir}/man1/nvidia-settings.1*
245 %{_desktopdir}/nvidia-settings.desktop
246 %{_pixmapsdir}/nvidia-settings.png
247 /etc/xdg/autostart/%{name}.desktop
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
258 %endif
259
260 %if %{with libXNVCtrl}
261 %files -n libXNVCtrl-devel
262 %defattr(644,root,root,755)
263 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
264 %{_libdir}/libXNVCtrl.a
265 %{_includedir}/NVCtrl
266 %{_pkgconfigdir}/libXNVCtrl.pc
267 %{_examplesdir}/libXNVCtrl-%{version}
268 %endif
This page took 0.063404 seconds and 4 git commands to generate.