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