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