]> git.pld-linux.org Git - packages/nvidia-settings.git/blob - nvidia-settings.spec
- up to 325.15
[packages/nvidia-settings.git] / nvidia-settings.spec
1 #
2 # Conditional build:
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 http://websvn.kde.org/trunk/kdenonbeta/nvidia/
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:        325.15
12 Release:        1
13 License:        GPL
14 Group:          X11
15 Source0:        ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
16 # Source0-md5:  28a244467a1cca12270729458d86e99a
17 Source1:        %{name}.desktop
18 Source2:        %{name}.png
19 Source3:        %{name}-autostart.desktop
20 Patch0:         %{name}-wsecurity.patch
21 URL:            ftp://download.nvidia.com/XFree86/nvidia-settings/
22 BuildRequires:  OpenGL-devel
23 BuildRequires:  libvdpau-devel
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
30 BuildRequires:  m4
31 BuildRequires:  pkgconfig
32 %endif
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 The nvidia-settings utility is a tool for configuring the NVIDIA Linux
37 graphics driver. It operates by communicating with the NVIDIA X
38 driver, querying and updating state as appropriate. This communication
39 is done with the NV-CONTROL X extension.
40
41 Values such as brightness and gamma, XVideo attributes, temperature,
42 and OpenGL settings can be queried and configured via nvidia-settings.
43
44 When nvidia-settings starts, it reads the current settings from its
45 configuration file and sends those settings to the X server. Then, it
46 displays a graphical user interface (GUI) interface for configuring
47 the current settings. When nvidia-settings exits, it queries the
48 current settings from the X server and saves them to the configuration
49 file.
50
51 %description -l pl.UTF-8
52 Narzędzie nvidia-settings służy do konfiguracji sterownika do kart
53 graficznych firmy NVIDIA. Działa komunikując się ze sterownikiem X
54 NVIDIA, sprawdzając i uaktualniając stan w razie potrzeby. Komunikacja
55 odbywa się poprzez rozszerzenie X NV-CONTROL.
56
57 Za pomocą nvidia-settings można odczytywać i zmieniać wartości takie
58 jak jasność i korekcja gamma, atrybuty XVideo, temperatura barw i
59 ustawienia OpenGL.
60
61 Przy uruchamianiu nvidia-settings odczytuje bieżące ustawienia z pliku
62 konfiguracyjnego i wysyła te ustawienia do serwera X. Następnie
63 wyświetla graficzny interfejs użytkownika (GUI) do konfiguracji
64 ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
65 z serwera X i zapisuje je do pliku konfiguracyjnego.
66
67 %package -n libXNVCtrl-devel
68 Summary:        libXNVCtrl development headers
69 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libXNVCtrl
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 %patch0 -p1
86
87 %{__rm} src/libXNVCtrl/libXNVCtrl.a
88
89 %build
90 %if %{with libXNVCtrl}
91 %{__make} -C src/libXNVCtrl \
92         NV_VERBOSE=1 \
93         CC="%{__cc}" \
94         X_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} \
107         NV_VERBOSE=1 \
108         STRIP_CMD=: \
109         CC="%{__cc}" \
110         X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
111         X_LDFLAGS="%{rpmldflags}"
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 %if %{with nvidia_settings}
117 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
118 %{__make} install \
119         INSTALL="install -p" \
120         PREFIX=%{_prefix} \
121         DESTDIR=$RPM_BUILD_ROOT
122 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
123 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
124 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
125 %endif
126
127 %if %{with libXNVCtrl}
128 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
129         $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
130 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
131 rm -r $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}/_out
132 cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
133 cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
134 cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
135 cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
136
137 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
138 cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
139 prefix=%{_prefix}
140 libdir=%{_libdir}
141 includedir=${prefix}/include/NVCtrl
142
143 Name: libXNVCtrl
144 Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
145 Version: %{version}
146 Libs: -L${libdir} -lXNVCtrl
147 Cflags: -I${includedir}
148 EOF
149 #'
150 %endif
151
152 %if %{with utils}
153 install -d $RPM_BUILD_ROOT%{_bindir}
154 for prog in _out/utils/nv-control-*; do
155         case "$prog" in
156         *.*)
157                 continue
158                 ;;
159         esac
160         install -p $prog $RPM_BUILD_ROOT%{_bindir}
161 done
162 %endif
163
164 %clean
165 rm -rf $RPM_BUILD_ROOT
166
167 %if %{with nvidia_settings}
168 %files
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/nvidia-settings
171 %{_mandir}/man1/nvidia-settings.1*
172 %{_desktopdir}/nvidia-settings.desktop
173 %{_pixmapsdir}/nvidia-settings.png
174 /etc/xdg/autostart/%{name}.desktop
175 %endif
176
177 %if %{with utils}
178 %attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
179 %attr(755,root,root) %{_bindir}/nv-control-dpy
180 %attr(755,root,root) %{_bindir}/nv-control-dvc
181 %attr(755,root,root) %{_bindir}/nv-control-events
182 %attr(755,root,root) %{_bindir}/nv-control-framelock
183 %attr(755,root,root) %{_bindir}/nv-control-gvi
184 %attr(755,root,root) %{_bindir}/nv-control-info
185 %attr(755,root,root) %{_bindir}/nv-control-targets
186 %attr(755,root,root) %{_bindir}/nv-control-warpblend
187 %endif
188
189 %if %{with libXNVCtrl}
190 %files -n libXNVCtrl-devel
191 %defattr(644,root,root,755)
192 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
193 %{_libdir}/libXNVCtrl.a
194 %{_includedir}/NVCtrl
195 %{_pkgconfigdir}/libXNVCtrl.pc
196 %{_examplesdir}/libXNVCtrl-%{version}
197 %endif
This page took 0.068194 seconds and 4 git commands to generate.