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