]> git.pld-linux.org Git - packages/nvidia-settings.git/blame - nvidia-settings.spec
- up to 340.32
[packages/nvidia-settings.git] / nvidia-settings.spec
CommitLineData
7b18b7ce
ER
1# TODO:
2# - use system jansson >= 2.6 library
8594399f
JB
3#
4# Conditional build:
5985f375 5%bcond_without nvidia_settings # build the main package
d206696e
JB
6%bcond_without utils # build utils from samples dir
7%bcond_without libXNVCtrl # build libXNVCtrl for external packages
59b8d072 8
b27b2c83 9Summary: Tool for configuring the NVIDIA driver
b7eb71c7 10Summary(pl.UTF-8): Narzędzie do konfigurowania sterownika NVIDIA
b27b2c83 11Name: nvidia-settings
702ac7b4 12# keep the version in sync with xorg-driver-video-nvidia.spec
f8970ae0 13Version: 340.32
b83fa72b 14Release: 1
d206696e
JB
15License: GPL v2 (with MIT parts)
16Group: X11/Applications
b83fa72b 17Source0: ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
f8970ae0 18# Source0-md5: 420c47af4ec52ca6b458859bf9312afe
1851a39d
ER
19Source1: %{name}.desktop
20Source2: %{name}.png
a604bf49 21Source3: %{name}-autostart.desktop
8594399f 22URL: ftp://download.nvidia.com/XFree86/nvidia-settings/
ebe7e748 23BuildRequires: OpenGL-devel
987f172e 24BuildRequires: libvdpau-devel
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
1426af00 31BuildRequires: jansson-devel >= 2.2
728ab98a 32BuildRequires: m4
4a9d0e43 33BuildRequires: pkgconfig
b27b2c83
ER
34%endif
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
e7c6a80e
ER
38The nvidia-settings utility is a tool for configuring the NVIDIA Linux
39graphics driver. It operates by communicating with the NVIDIA X
b27b2c83
ER
40driver, querying and updating state as appropriate. This communication
41is done with the NV-CONTROL X extension.
42
43Values such as brightness and gamma, XVideo attributes, temperature,
44and OpenGL settings can be queried and configured via nvidia-settings.
45
46When nvidia-settings starts, it reads the current settings from its
47configuration file and sends those settings to the X server. Then, it
48displays a graphical user interface (GUI) interface for configuring
49the current settings. When nvidia-settings exits, it queries the
50current settings from the X server and saves them to the configuration
51file.
52
8798252c
JR
53%description -l pl.UTF-8
54Narzędzie nvidia-settings służy do konfiguracji sterownika do kart
55graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X
56NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja
57odbywa się poprzez rozszerzenie X NV-CONTROL.
8594399f 58
8798252c
JR
59Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
60jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
8594399f
JB
61ustawienia OpenGL.
62
8798252c
JR
63Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku
64konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie
65wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji
66ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
8594399f
JB
67z serwera X i zapisuje je do pliku konfiguracyjnego.
68
b27b2c83 69%package -n libXNVCtrl-devel
d206696e
JB
70Summary: libXNVCtrl development files
71Summary(pl.UTF-8): Pliki programistyczne biblioteki libXNVCtrl
72License: MIT
b27b2c83 73Group: Development/Libraries
765f7fba
JR
74Requires: xorg-lib-libX11-devel
75Requires: xorg-lib-libXext-devel
76Requires: xorg-lib-libXxf86vm-devel
77Obsoletes: libXNVCtrl-static
b27b2c83
ER
78
79%description -n libXNVCtrl-devel
765f7fba 80Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
8594399f 81
8798252c 82%description -n libXNVCtrl-devel -l pl.UTF-8
765f7fba
JR
83Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
84sterowników NVIDIA.
8594399f 85
b27b2c83 86%prep
b83fa72b
ER
87%setup -q
88
b27b2c83
ER
89%build
90%if %{with libXNVCtrl}
b83fa72b 91%{__make} -C src/libXNVCtrl \
1426af00 92 NV_VERBOSE=1 \
4a9d0e43 93 CC="%{__cc}" \
d206696e 94 CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
b27b2c83
ER
95%endif
96
2dece988
ER
97%if %{with utils}
98%{__make} -C samples \
99 NV_VERBOSE=1 \
100 CC="%{__cc}" \
101 OUTPUTDIR=$(pwd)/_out/utils \
102 X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
103%endif
104
b27b2c83 105%if %{with nvidia_settings}
1426af00
JB
106%{__make} -C src \
107 NV_USE_BUNDLED_LIBJANSSON=0 \
b83fa72b
ER
108 NV_VERBOSE=1 \
109 STRIP_CMD=: \
b27b2c83 110 CC="%{__cc}" \
b83fa72b
ER
111 X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
112 X_LDFLAGS="%{rpmldflags}"
1426af00
JB
113
114%{__make} -C doc \
115 NV_VERBOSE=1
b27b2c83
ER
116%endif
117
118%install
119rm -rf $RPM_BUILD_ROOT
120%if %{with nvidia_settings}
a604bf49 121install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
b83fa72b 122%{__make} install \
1426af00
JB
123 NV_USE_BUNDLED_LIBJANSSON=0 \
124 NV_VERBOSE=1 \
b83fa72b 125 INSTALL="install -p" \
702ac7b4
ER
126 PREFIX=%{_prefix} \
127 DESTDIR=$RPM_BUILD_ROOT
1851a39d
ER
128cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
129cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
a604bf49 130cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
b27b2c83
ER
131%endif
132
133%if %{with libXNVCtrl}
765f7fba
JR
134install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
135 $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
eac12459 136cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
958f068f 137cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
3917229f
ER
138cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
139cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
140cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
958f068f
ER
141
142install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
143cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
144prefix=%{_prefix}
145libdir=%{_libdir}
146includedir=${prefix}/include/NVCtrl
147
148Name: libXNVCtrl
149Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
150Version: %{version}
151Libs: -L${libdir} -lXNVCtrl
152Cflags: -I${includedir}
153EOF
154#'
b27b2c83
ER
155%endif
156
2dece988
ER
157%if %{with utils}
158install -d $RPM_BUILD_ROOT%{_bindir}
159for prog in _out/utils/nv-control-*; do
160 case "$prog" in
161 *.*)
162 continue
163 ;;
164 esac
165 install -p $prog $RPM_BUILD_ROOT%{_bindir}
166done
167%endif
168
b27b2c83
ER
169%clean
170rm -rf $RPM_BUILD_ROOT
171
b27b2c83
ER
172%if %{with nvidia_settings}
173%files
174%defattr(644,root,root,755)
1851a39d 175%attr(755,root,root) %{_bindir}/nvidia-settings
2dece988
ER
176%if %{with utils}
177%attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
178%attr(755,root,root) %{_bindir}/nv-control-dpy
179%attr(755,root,root) %{_bindir}/nv-control-dvc
180%attr(755,root,root) %{_bindir}/nv-control-events
181%attr(755,root,root) %{_bindir}/nv-control-framelock
182%attr(755,root,root) %{_bindir}/nv-control-gvi
183%attr(755,root,root) %{_bindir}/nv-control-info
184%attr(755,root,root) %{_bindir}/nv-control-targets
c7c6d261 185%attr(755,root,root) %{_bindir}/nv-control-warpblend
2dece988 186%endif
d206696e
JB
187%{_mandir}/man1/nvidia-settings.1*
188%{_desktopdir}/nvidia-settings.desktop
189%{_pixmapsdir}/nvidia-settings.png
190/etc/xdg/autostart/%{name}.desktop
191%endif
2dece988 192
8594399f 193%if %{with libXNVCtrl}
b27b2c83
ER
194%files -n libXNVCtrl-devel
195%defattr(644,root,root,755)
eac12459 196%doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
765f7fba 197%{_libdir}/libXNVCtrl.a
958f068f
ER
198%{_includedir}/NVCtrl
199%{_pkgconfigdir}/libXNVCtrl.pc
eac12459 200%{_examplesdir}/libXNVCtrl-%{version}
8594399f 201%endif
This page took 0.069249 seconds and 4 git commands to generate.