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