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