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