LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File tachyon.spec of Package tachyon (Project home:ealin:physics)

#
# spec file for package tachyon
#
# Copyright (c) 2011 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:           tachyon
%define lname	libtachyon-threads1
Version:        0.99_b6
Release:        0
Group:          Productivity/Graphics/Visualization/Raytracers
Summary:	Parallel ray tracing system
License:        BSD-3-Clause
URL:            http://jedi.ks.uiuc.edu/~johns/raytracer/

Source:         %name-0.99b6.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:	libjpeg-devel, Mesa-devel, libpng16-compat-devel
BuildRequires:	xz, make

%description
A high performance parallel ray tracing system supporting MPI and
multithreaded implementations.

Tachyon implements all of the basic geometric primitives such as
triangles, planes, spheres, cylinders, etc. Some of the goals in
developing Tachyon were to make it fast and for it to parallelize
well. These are what set it apart from more full-featured programs
like POV-Ray, Rayshade, and others. Tachyon supports enough features
to be an excellent alternative to slower programs for demanding
animation and scientific visualization tasks.

%package -n %lname
Summary:	Core library for the Tachyon Parallel Ray Tracing System
Group:		System/Libraries

%description -n %lname
A high performance parallel ray tracing system supporting MPI and
multithreaded implementations.

Tachyon implements all of the basic geometric primitives such as
triangles, planes, spheres, cylinders, etc. Some of the goals in
developing Tachyon were to make it fast and for it to parallelize
well. These are what set it apart from more full-featured programs
like POV-Ray, Rayshade, and others. Tachyon supports enough features
to be an excellent alternative to slower programs for demanding
animation and scientific visualization tasks.

%package -n libtachyon-devel
Summary:	Development files for the Tachyon Ray Tracing System
Group:		Development/Libraries/C and C++
Requires:	%lname = %version

%description -n libtachyon-devel
A high performance parallel ray tracing system supporting MPI and
multithreaded implementations.

Tachyon implements all of the basic geometric primitives such as
triangles, planes, spheres, cylinders, etc. Some of the goals in
developing Tachyon were to make it fast and for it to parallelize
well. These are what set it apart from more full-featured programs
like POV-Ray, Rayshade, and others. Tachyon supports enough features
to be an excellent alternative to slower programs for demanding
animation and scientific visualization tasks.

%prep
%setup -qn %name
sed  -i 's;\"CFLAGS =; \"CFLAGS = -fPIC ;g' unix/Make-arch
cd unix
cat > Make-config << EOF
SHELL=/bin/bash

X11INC= 
X11LIB= -lX11

#MOTIFINC= 
#MOTIFLIB= 
#MPIDIR=

FLT=
MBOX=

USEJPEG= -DUSEJPEG
JPEGINC=
JPEGLIB= -ljpeg

USEPNG=-DUSEPNG
PNGINC= 
PNGLIB= -lpng16 -lz 

#OMFDIR = 
#OMFINC = 
#OMFLIB =  
#OMFDEF = 

#SPACEBALL_HOME= 
#SPACEBALLINC=
#SPACEBALLLIB= 

#MGFDIR=
#MGFLIB=
#MGFLIBDIR=
#MGFINC=
SRCDIR=../src
DEMOSRC=../demosrc

EOF

%build
cd unix
%ifarch x86_64
  make %{?_smp_mflags}  linux-64-thr-ogl
  %define  flav linux-64-thr-ogl
%else
  make %{?_smp_mflags} linux-thr-ogl
  %define flav linux-thr-ogl
%endif

%install
mkdir -p %buildroot/%_includedir/tachyon
for i in tachyon.h tachyon_dep.h hash.h macros.h render.h quadric.h texture.h light.h util.h
	do
		install -m 0644 src/$i  %buildroot/%_includedir/tachyon/$i
	done
mkdir -p %buildroot/%_bindir
install -m 0755 compile/%flav/tachyon %buildroot/%_bindir/tachyon_threads
ls compile/%flav 
mkdir -p %buildroot/%_libdir
gcc -shared -Wl,-soname,libtachyon-threads.so.1  -o %buildroot/%_libdir/libtachyon-threads.so.1.0 compile/%flav/libtachyon/*.o
cd %buildroot/%_libdir
ln -s libtachyon-threads.so.1.0 libtachyon-threads.so

%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files 
%defattr(-,root,root) 
%_bindir/tachyon_threads

%files -n %lname
%defattr(-,root,root)
%_libdir/libtachyon-threads.so.*

%files -n libtachyon-devel
%defattr(-,root,root)
%_libdir/libtachyon-threads.so
%_includedir/tachyon/
%changelog