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