]> git.pld-linux.org Git - packages/nvidia-settings.git/blob - nvidia-settings.spec
- up to 319.32
[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:        319.32
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:  e79e4cae77ceaa8da8dbcaf6b3c9eb39
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:  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
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 headers
68 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libXNVCtrl
69 Group:          Development/Libraries
70 Requires:       xorg-lib-libX11-devel
71 Requires:       xorg-lib-libXext-devel
72 Requires:       xorg-lib-libXxf86vm-devel
73 Obsoletes:      libXNVCtrl-static
74
75 %description -n libXNVCtrl-devel
76 Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
77
78 %description -n libXNVCtrl-devel -l pl.UTF-8
79 Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
80 sterowników NVIDIA.
81
82 %prep
83 %setup -q
84 %patch -p1
85
86 %{__rm} src/libXNVCtrl/libXNVCtrl.a
87
88 %build
89 %if %{with libXNVCtrl}
90 %{__make} -C src/libXNVCtrl \
91         NV_VERBOSE=1 \
92         CC="%{__cc}" \
93         X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
94 %endif
95
96 %if %{with utils}
97 %{__make} -C samples \
98         NV_VERBOSE=1 \
99         CC="%{__cc}" \
100         OUTPUTDIR=$(pwd)/_out/utils \
101         X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
102 %endif
103
104 %if %{with nvidia_settings}
105 %{__make} \
106         NV_VERBOSE=1 \
107         STRIP_CMD=: \
108         CC="%{__cc}" \
109         X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
110         X_LDFLAGS="%{rpmldflags}"
111 %endif
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115 %if %{with nvidia_settings}
116 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
117 %{__make} install \
118         INSTALL="install -p" \
119         PREFIX=%{_prefix} \
120         DESTDIR=$RPM_BUILD_ROOT
121 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
122 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
123 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
124 %endif
125
126 %if %{with libXNVCtrl}
127 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
128         $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
129 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
130 rm -r $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}/_out
131 cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
132 cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
133 cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
134 cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
135
136 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
137 cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
138 prefix=%{_prefix}
139 libdir=%{_libdir}
140 includedir=${prefix}/include/NVCtrl
141
142 Name: libXNVCtrl
143 Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
144 Version: %{version}
145 Libs: -L${libdir} -lXNVCtrl
146 Cflags: -I${includedir}
147 EOF
148 #'
149 %endif
150
151 %if %{with utils}
152 install -d $RPM_BUILD_ROOT%{_bindir}
153 for prog in _out/utils/nv-control-*; do
154         case "$prog" in
155         *.*)
156                 continue
157                 ;;
158         esac
159         install -p $prog $RPM_BUILD_ROOT%{_bindir}
160 done
161 %endif
162
163 %clean
164 rm -rf $RPM_BUILD_ROOT
165
166 %if %{with nvidia_settings}
167 %files
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_bindir}/nvidia-settings
170 %{_mandir}/man1/nvidia-settings.1*
171 %{_desktopdir}/nvidia-settings.desktop
172 %{_pixmapsdir}/nvidia-settings.png
173 /etc/xdg/autostart/%{name}.desktop
174 %endif
175
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
188 %if %{with libXNVCtrl}
189 %files -n libXNVCtrl-devel
190 %defattr(644,root,root,755)
191 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
192 %{_libdir}/libXNVCtrl.a
193 %{_includedir}/NVCtrl
194 %{_pkgconfigdir}/libXNVCtrl.pc
195 %{_examplesdir}/libXNVCtrl-%{version}
196 %endif
This page took 0.044107 seconds and 4 git commands to generate.