]> git.pld-linux.org Git - packages/nvidia-settings.git/blame - nvidia-settings.spec
up to 510.54
[packages/nvidia-settings.git] / nvidia-settings.spec
CommitLineData
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 8Summary: Tool for configuring the NVIDIA driver
b7eb71c7 9Summary(pl.UTF-8): Narzędzie do konfigurowania sterownika NVIDIA
b27b2c83 10Name: nvidia-settings
702ac7b4 11# keep the version in sync with xorg-driver-video-nvidia.spec
f73ec7ff 12Version: 510.54
8a101f3b 13Release: 1
d206696e
JB
14License: GPL v2 (with MIT parts)
15Group: X11/Applications
cc1cb27f 16Source0: https://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
f73ec7ff 17# Source0-md5: c5f2575d0b9f538a588e0f9ba4caea4b
1851a39d
ER
18Source1: %{name}.desktop
19Source2: %{name}.png
a604bf49 20Source3: %{name}-autostart.desktop
8594399f 21URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
ebe7e748 22BuildRequires: OpenGL-devel
03034218 23BuildRequires: libvdpau-devel >= 1.0
fe2f88cc
JR
24BuildRequires: xorg-lib-libX11-devel
25BuildRequires: xorg-lib-libXext-devel
ebe7e748 26BuildRequires: xorg-lib-libXv-devel
765f7fba 27BuildRequires: xorg-lib-libXxf86vm-devel
b27b2c83 28%if %{with nvidia_settings}
d206696e 29BuildRequires: gtk+2-devel >= 2.0
836c5156 30%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
1426af00 31BuildRequires: jansson-devel >= 2.2
728ab98a 32BuildRequires: m4
4a9d0e43 33BuildRequires: pkgconfig
b27b2c83 34%endif
836c5156 35Requires: %{name}-guilib = %{version}-%{release}
03034218 36Requires: libvdpau >= 1.0
b27b2c83
ER
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
20678b9b 39# requires symbols from main binary
836c5156 40%define skip_post_check_so libnvidia-gtk[23].so.*
20678b9b 41
b27b2c83 42%description
e7c6a80e
ER
43The nvidia-settings utility is a tool for configuring the NVIDIA Linux
44graphics driver. It operates by communicating with the NVIDIA X
b27b2c83
ER
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
8798252c
JR
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.
8594399f 63
8798252c
JR
64Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
65jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
8594399f
JB
66ustawienia OpenGL.
67
8798252c
JR
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
8594399f
JB
72z serwera X i zapisuje je do pliku konfiguracyjnego.
73
836c5156
JB
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
b27b2c83 100%package -n libXNVCtrl-devel
d206696e
JB
101Summary: libXNVCtrl development files
102Summary(pl.UTF-8): Pliki programistyczne biblioteki libXNVCtrl
103License: MIT
b27b2c83 104Group: Development/Libraries
765f7fba
JR
105Requires: xorg-lib-libX11-devel
106Requires: xorg-lib-libXext-devel
107Requires: xorg-lib-libXxf86vm-devel
108Obsoletes: libXNVCtrl-static
b27b2c83
ER
109
110%description -n libXNVCtrl-devel
765f7fba 111Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
8594399f 112
8798252c 113%description -n libXNVCtrl-devel -l pl.UTF-8
765f7fba
JR
114Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
115sterowników NVIDIA.
8594399f 116
b27b2c83 117%prep
b83fa72b
ER
118%setup -q
119
b27b2c83
ER
120%build
121%if %{with libXNVCtrl}
5ae1b032 122CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \
b83fa72b 123%{__make} -C src/libXNVCtrl \
1426af00 124 NV_VERBOSE=1 \
4a9d0e43 125 CC="%{__cc}" \
7f54d198 126 OUTPUTDIR=.
b27b2c83
ER
127%endif
128
2dece988 129%if %{with utils}
5ae1b032 130CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC" \
2dece988
ER
131%{__make} -C samples \
132 NV_VERBOSE=1 \
133 CC="%{__cc}" \
134 OUTPUTDIR=$(pwd)/_out/utils \
2dece988
ER
135%endif
136
b27b2c83 137%if %{with nvidia_settings}
5ae1b032
JP
138CFLAGS="%{rpmcppflags} %{rpmcflags}" \
139LDFLAGS="%{rpmldflags}" \
1426af00 140%{__make} -C src \
836c5156 141 %{!?with_gtk3:BUILD_GTK3LIB=} \
1426af00 142 NV_USE_BUNDLED_LIBJANSSON=0 \
b83fa72b
ER
143 NV_VERBOSE=1 \
144 STRIP_CMD=: \
5ae1b032 145 CC="%{__cc}"
1426af00
JB
146
147%{__make} -C doc \
148 NV_VERBOSE=1
b27b2c83
ER
149%endif
150
151%install
152rm -rf $RPM_BUILD_ROOT
153%if %{with nvidia_settings}
a604bf49 154install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
b83fa72b 155%{__make} install \
1426af00
JB
156 NV_USE_BUNDLED_LIBJANSSON=0 \
157 NV_VERBOSE=1 \
b83fa72b 158 INSTALL="install -p" \
20678b9b 159 LIBDIR="$RPM_BUILD_ROOT%{_libdir}" \
702ac7b4
ER
160 PREFIX=%{_prefix} \
161 DESTDIR=$RPM_BUILD_ROOT
1851a39d
ER
162cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
163cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
a604bf49 164cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
20678b9b 165
836c5156
JB
166# let RPM autogenerate deps
167chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
b27b2c83
ER
168%endif
169
170%if %{with libXNVCtrl}
765f7fba
JR
171install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
172 $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
eac12459 173cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
958f068f 174cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
3917229f
ER
175cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
176cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
177cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
958f068f
ER
178
179install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
180cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
181prefix=%{_prefix}
182libdir=%{_libdir}
183includedir=${prefix}/include/NVCtrl
184
185Name: libXNVCtrl
186Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
187Version: %{version}
188Libs: -L${libdir} -lXNVCtrl
189Cflags: -I${includedir}
190EOF
191#'
b27b2c83
ER
192%endif
193
2dece988
ER
194%if %{with utils}
195install -d $RPM_BUILD_ROOT%{_bindir}
196for prog in _out/utils/nv-control-*; do
197 case "$prog" in
198 *.*)
199 continue
200 ;;
201 esac
202 install -p $prog $RPM_BUILD_ROOT%{_bindir}
203done
204%endif
205
b27b2c83
ER
206%clean
207rm -rf $RPM_BUILD_ROOT
208
836c5156
JB
209%post gtk2 -p /sbin/ldconfig
210%postun gtk2 -p /sbin/ldconfig
211
212%post gtk3 -p /sbin/ldconfig
213%postun gtk3 -p /sbin/ldconfig
214
b27b2c83
ER
215%if %{with nvidia_settings}
216%files
217%defattr(644,root,root,755)
1851a39d 218%attr(755,root,root) %{_bindir}/nvidia-settings
2dece988
ER
219%if %{with utils}
220%attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
221%attr(755,root,root) %{_bindir}/nv-control-dpy
222%attr(755,root,root) %{_bindir}/nv-control-dvc
223%attr(755,root,root) %{_bindir}/nv-control-events
224%attr(755,root,root) %{_bindir}/nv-control-framelock
2dece988
ER
225%attr(755,root,root) %{_bindir}/nv-control-info
226%attr(755,root,root) %{_bindir}/nv-control-targets
c7c6d261 227%attr(755,root,root) %{_bindir}/nv-control-warpblend
2dece988 228%endif
d206696e
JB
229%{_mandir}/man1/nvidia-settings.1*
230%{_desktopdir}/nvidia-settings.desktop
231%{_pixmapsdir}/nvidia-settings.png
232/etc/xdg/autostart/%{name}.desktop
836c5156
JB
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
d206696e 243%endif
2dece988 244
8594399f 245%if %{with libXNVCtrl}
b27b2c83
ER
246%files -n libXNVCtrl-devel
247%defattr(644,root,root,755)
eac12459 248%doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
765f7fba 249%{_libdir}/libXNVCtrl.a
958f068f
ER
250%{_includedir}/NVCtrl
251%{_pkgconfigdir}/libXNVCtrl.pc
eac12459 252%{_examplesdir}/libXNVCtrl-%{version}
8594399f 253%endif
This page took 0.108706 seconds and 4 git commands to generate.