]> git.pld-linux.org Git - packages/nvidia-settings.git/blobdiff - nvidia-settings.spec
- up to 331.20
[packages/nvidia-settings.git] / nvidia-settings.spec
index 6c495263ce0f39ac5f5f41c77c757b817cdd3b53..ba835b8ac2fb38419f763796f33e5ca91963be55 100644 (file)
@@ -1,21 +1,28 @@
 #
 # 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/
-#
+
 Summary:       Tool for configuring the NVIDIA driver
 Summary(pl.UTF-8):     Narzędzie do konfigurowania sterownika NVIDIA
 Name:          nvidia-settings
-Version:       195.36.24
+# keep the version in sync with xorg-driver-video-nvidia.spec
+Version:       331.20
 Release:       1
 License:       GPL
 Group:         X11
-Source0:       ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.gz
-# Source0-md5: 43008cf2cec84fa27ee6f315845d50f7
-Patch0:                %{name}-xlibs.patch
+Source0:       ftp://download.nvidia.com/XFree86/nvidia-settings/%{name}-%{version}.tar.bz2
+# Source0-md5: bbe5b7beaedb274d4dc81640f8e561ce
+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
@@ -25,8 +32,8 @@ BuildRequires:        pkgconfig
 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.
 
@@ -73,41 +80,83 @@ Biblioteka do obsługi rozszerzenia NV-CONTROL z najnowszych
 sterowników NVIDIA.
 
 %prep
-%setup -q -n %{name}-1.0
-%patch0 -p1
+%setup -q
+
+%{__rm} src/libXNVCtrl/libXNVCtrl.a
 
 %build
 %if %{with libXNVCtrl}
-cd src/libXNVCtrl
-%{__make} clean
-%{__make} \
+%{__make} -C src/libXNVCtrl \
+       NV_VERBOSE=1 \
        CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -fPIC"
-cd ../..
+       X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
+%endif
+
+%if %{with utils}
+%{__make} -C samples \
+       NV_VERBOSE=1 \
+       CC="%{__cc}" \
+       OUTPUTDIR=$(pwd)/_out/utils \
+       X_CFLAGS="%{rpmcppflags} %{rpmcflags} -fPIC"
 %endif
 
 %if %{with nvidia_settings}
 %{__make} \
+       NV_VERBOSE=1 \
+       STRIP_CMD=: \
        CC="%{__cc}" \
-       CFLAGS="%{rpmcflags}" \
-       LDFLAGS="%{rpmldflags}"
+       X_CFLAGS="%{rpmcppflags} %{rpmcflags}" \
+       X_LDFLAGS="%{rpmldflags}"
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %if %{with nvidia_settings}
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
-install nvidia-settings $RPM_BUILD_ROOT%{_bindir}
-install doc/nvidia-settings.1 $RPM_BUILD_ROOT%{_mandir}/man1/nvidia-settings.1
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_pixmapsdir},/etc/xdg/autostart}
+%{__make} install \
+       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}
-install -p src/libXNVCtrl/NVCtrl.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
-install -p src/libXNVCtrl/NVCtrlLib.h $RPM_BUILD_ROOT%{_includedir}/NVCtrl
-install -p src/libXNVCtrl/libXNVCtrl.a $RPM_BUILD_ROOT%{_libdir}
+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}
+install -d $RPM_BUILD_ROOT%{_bindir}
+for prog in _out/utils/nv-control-*; do
+       case "$prog" in
+       *.*)
+               continue
+               ;;
+       esac
+       install -p $prog $RPM_BUILD_ROOT%{_bindir}
+done
 %endif
 
 %clean
@@ -116,16 +165,31 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with nvidia_settings}
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/%{name}
-%{_mandir}/man1/*
+%attr(755,root,root) %{_bindir}/nvidia-settings
+%{_mandir}/man1/nvidia-settings.1*
+%{_desktopdir}/nvidia-settings.desktop
+%{_pixmapsdir}/nvidia-settings.png
+/etc/xdg/autostart/%{name}.desktop
+%endif
+
+%if %{with utils}
+%attr(755,root,root) %{_bindir}/nv-control-3dvisionpro
+%attr(755,root,root) %{_bindir}/nv-control-dpy
+%attr(755,root,root) %{_bindir}/nv-control-dvc
+%attr(755,root,root) %{_bindir}/nv-control-events
+%attr(755,root,root) %{_bindir}/nv-control-framelock
+%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
 
 %if %{with libXNVCtrl}
 %files -n libXNVCtrl-devel
 %defattr(644,root,root,755)
 %doc doc/{FRAMELOCK,NV-CONTROL-API}.txt
-%{_includedir}/NVCtrl/NVCtrl.h
-%{_includedir}/NVCtrl/NVCtrlLib.h
 %{_libdir}/libXNVCtrl.a
+%{_includedir}/NVCtrl
+%{_pkgconfigdir}/libXNVCtrl.pc
 %{_examplesdir}/libXNVCtrl-%{version}
 %endif
This page took 0.07884 seconds and 4 git commands to generate.