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