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