]> git.pld-linux.org Git - packages/nvidia-settings.git/blobdiff - nvidia-settings.spec
- up to 340.32
[packages/nvidia-settings.git] / nvidia-settings.spec
index a5e00b771161aeb9a4e65b4fb492aa7c241bfecc..705f91228d1fed396651e0b63b919db99ed0b785 100644 (file)
@@ -1,37 +1,42 @@
+# TODO:
+# - use system jansson >= 2.6 library
 #
 # Conditional build:
 %bcond_without nvidia_settings # build the main package
-%bcond_without utils   # build utils from samples dir
-%bcond_without libXNVCtrl      # build libXNVCtrl for http://websvn.kde.org/trunk/kdenonbeta/nvidia/
+%bcond_without utils           # build utils from samples dir
+%bcond_without libXNVCtrl      # build libXNVCtrl for external packages
 
 Summary:       Tool for configuring the NVIDIA driver
 Summary(pl.UTF-8):     Narzędzie do konfigurowania sterownika NVIDIA
 Name:          nvidia-settings
 # keep the version in sync with xorg-driver-video-nvidia.spec
-Version:       304.43
+Version:       340.32
 Release:       1
-License:       GPL
-Group:         X11
+License:       GPL v2 (with MIT parts)
+Group:         X11/Applications
 Source0:       ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
-# Source0-md5: 5f3b63a621897e5b32e13de114aa58db
+# Source0-md5: 420c47af4ec52ca6b458859bf9312afe
 Source1:       %{name}.desktop
 Source2:       %{name}.png
+Source3:       %{name}-autostart.desktop
 URL:           ftp://download.nvidia.com/XFree86/nvidia-settings/
 BuildRequires: OpenGL-devel
+BuildRequires: libvdpau-devel
 BuildRequires: xorg-lib-libX11-devel
 BuildRequires: xorg-lib-libXext-devel
 BuildRequires: xorg-lib-libXv-devel
 BuildRequires: xorg-lib-libXxf86vm-devel
 %if %{with nvidia_settings}
-BuildRequires: gtk+2-devel
+BuildRequires: gtk+2-devel >= 2.0
+BuildRequires: jansson-devel >= 2.2
 BuildRequires: m4
 BuildRequires: pkgconfig
 %endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-The `nvidia-settings` utility is a tool for configuring the NVIDIA
-Linux graphics driver. It operates by communicating with the NVIDIA X
+The nvidia-settings utility is a tool for configuring the NVIDIA Linux
+graphics driver. It operates by communicating with the NVIDIA X
 driver, querying and updating state as appropriate. This communication
 is done with the NV-CONTROL X extension.
 
@@ -62,8 +67,9 @@ ustawień. Przy wyłączniu nvidia-settings odczytuje bieżące ustawienia
 z serwera X i zapisuje je do pliku konfiguracyjnego.
 
 %package -n libXNVCtrl-devel
-Summary:       libXNVCtrl development headers
-Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libXNVCtrl
+Summary:       libXNVCtrl development files
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki libXNVCtrl
+License:       MIT
 Group:         Development/Libraries
 Requires:      xorg-lib-libX11-devel
 Requires:      xorg-lib-libXext-devel
@@ -80,14 +86,12 @@ sterowników NVIDIA.
 %prep
 %setup -q
 
-%{__rm} src/libXNVCtrl/libXNVCtrl.a
-
 %build
 %if %{with libXNVCtrl}
 %{__make} -C src/libXNVCtrl \
        NV_VERBOSE=1 \
        CC="%{__cc}" \
-       X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
+       CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
 %endif
 
 %if %{with utils}
@@ -99,34 +103,55 @@ sterowników NVIDIA.
 %endif
 
 %if %{with nvidia_settings}
-%{__make} \
+%{__make} -C src \
+       NV_USE_BUNDLED_LIBJANSSON=0 \
        NV_VERBOSE=1 \
        STRIP_CMD=: \
        CC="%{__cc}" \
        X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
        X_LDFLAGS="%{rpmldflags}"
+
+%{__make} -C doc \
+       NV_VERBOSE=1
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %if %{with nvidia_settings}
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
 %{__make} install \
+       NV_USE_BUNDLED_LIBJANSSON=0 \
+       NV_VERBOSE=1 \
        INSTALL="install -p" \
        PREFIX=%{_prefix} \
        DESTDIR=$RPM_BUILD_ROOT
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/%{name}.desktop
 %endif
 
 %if %{with libXNVCtrl}
 install -d $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version} \
        $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/NVCtrl}
 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}
-rm -r $RPM_BUILD_ROOT%{_examplesdir}/libXNVCtrl-%{version}/_out
+cp -p src/libXNVCtrl/nv_control.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
 cp -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
 cp -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
 cp -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
+
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/libXNVCtrl.pc
+prefix=%{_prefix}
+libdir=%{_libdir}
+includedir=${prefix}/include/NVCtrl
+
+Name: libXNVCtrl
+Description: Library for accessing NV-CONTROL extension in NVIDIA's latest drivers.
+Version: %{version}
+Libs: -L${libdir} -lXNVCtrl
+Cflags: -I${includedir}
+EOF
+#'
 %endif
 
 %if %{with utils}
@@ -148,11 +173,6 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/nvidia-settings
-%{_mandir}/man1/nvidia-settings.1*
-%{_desktopdir}/nvidia-settings.desktop
-%{_pixmapsdir}/nvidia-settings.png
-%endif
-
 %if %{with utils}
 %attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
 %attr(755,root,root) %{_bindir}/nv-control-dpy
@@ -162,15 +182,20 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/nv-control-gvi
 %attr(755,root,root) %{_bindir}/nv-control-info
 %attr(755,root,root) %{_bindir}/nv-control-targets
+%attr(755,root,root) %{_bindir}/nv-control-warpblend
+%endif
+%{_mandir}/man1/nvidia-settings.1*
+%{_desktopdir}/nvidia-settings.desktop
+%{_pixmapsdir}/nvidia-settings.png
+/etc/xdg/autostart/%{name}.desktop
 %endif
 
 %if %{with libXNVCtrl}
 %files -n libXNVCtrl-devel
 %defattr(644,root,root,755)
 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
-%dir %{_includedir}/NVCtrl
-%{_includedir}/NVCtrl/NVCtrl.h
-%{_includedir}/NVCtrl/NVCtrlLib.h
 %{_libdir}/libXNVCtrl.a
+%{_includedir}/NVCtrl
+%{_pkgconfigdir}/libXNVCtrl.pc
 %{_examplesdir}/libXNVCtrl-%{version}
 %endif
This page took 0.125867 seconds and 4 git commands to generate.