File nvidia-texture-tools.spec of Package nvidia-texture-tools

#
# spec file for package nvidia-texture-tools
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           nvidia-texture-tools
Summary:        NVIDIA Texture Tools
License:        MIT
Group:          Development/Tools/Other
Version:        2.0.6
Release:        0
BuildRequires:  Mesa-devel
BuildRequires:  cmake
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  zlib-devel
# BuildRequires:  cg-devel
Source0:        http://nvidia-texture-tools.googlecode.com/files/%name-%version.tar.bz2
Patch0:         nvidia-texture-tools-gcc47.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc

%description
This is the first alpha release of the new NVIDIA Texture Tools. The main highlights of 
this release are support for all DX10 texture formats, higher speed and improved
compression quality.

In addition to that it also comes with a hardware accelerated compressor that 
uses CUDA to compress blocks in parallel on the GPU and runs around 10 times 
faster than the CPU counterpart.

You can obtain CUDA from our developer site at:

http://developer.nvidia.com/object/cuda.html

The source code of the Texture Tools is being released under the terms of 
the MIT license.


%prep
%setup -q -n %name
%patch0 -p1

%build
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CXXFLAGS="$CFLAGS"
cmake	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
     	-DDOC_INSTALL_DIR=%{_docdir} \
	-DCMAKE_BUILD_TYPE=Release \
	-DNVTT_SHARED=1
make VERBOSE=1

%install
make install DESTDIR=$RPM_BUILD_ROOT
if [ "%_lib" != "lib" ];
then
	mv $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/%_lib
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc NVIDIA_Texture_Tools_LICENSE.txt NVIDIA_Texture_Tools_README.txt ChangeLog
%{_bindir}/*
/usr/include/nvtt
%{_libdir}/libnv*

%changelog