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