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