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