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