%define pkg_name    povray
%define short_version 3.7
%define pkg_version   3.7.0.7
%define pkg_release 2%{?_dist_release}

Summary: A widely used ray tracing package
Summary(ja): 広く使用されているレイトレーシングソフトウェア
Name:    %{pkg_name}
Version: %{pkg_version}
Release: %{pkg_release}

License: AGPLv3+
Group:   Applications/Multimedia
URL:     http://www.povray.org/

Source0: %{name}-%{version}.tar.gz

Buildroot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: libjpeg-turbo-devel libpng-devel libtiff-devel
BuildRequires: zlib-devel
BuildRequires: libboost-devel
BuildRequires: libboost-date-time
BuildRequires: libboost-thread
BuildRequires: OpenEXR-devel

Vendor: Project Vine
Distribution: Vine Linux


%description
A widely used ray tracing package, Persistence of Vision's Ray Tracer
(POV-ray) is based on David Buck's original ray tracer, DKB-Trace.
POV-ray is currently developed and supported by members of CompuServe
Graphics Developers' Forum.  The first stage of the process is
describing what you want to depict, either by using an interactive
modeling system like a CAD package, or by creating a text file which
uses a programming language-like syntax to describe the elements of
the image.  In both cases, you have to specify the objects, their
shape, their location, their color, their texture and their
illumination. Then you input the information to the raytracer program
and wait (and wait and wait...raytracing isn't speedy) for its
output (the image).


%prep
%setup -q

%build
pushd unix/
./prebuild.sh
popd

%configure COMPILED_BY="Project Vine" CXXFLAGS="-std=c++11"
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}
%{__rm} -rf ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{short_version}

%post -p %{_syssbindir}/ldconfig

%postun -p %{_syssbindir}/ldconfig

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc LICENSE README.md unix/AUTHORS unix/COPYING unix/ChangeLog unix/NEWS
%doc doc/*
%{_bindir}/*
%{_mandir}/man?/*
%{_datadir}/%{name}-%{short_version}
%config(noreplace) %{_sysconfdir}/%{name}/%{short_version}/povray.*


%changelog
* Tue Jan 16 2018 Toshiaki Ara <ara_t@384.jp> 3.7.0.7-2
- correct SPEC file name

* Tue Jan 16 2018 Toshiaki Ara <ara_t@384.jp> 3.7.0.7-1
- update to 3.7.0.7
- delete old ChangeLog

* Fri Oct 10 2008 Shu KONNO <owa@bg.wakwak.com> 3.6.1-1vl5
- applied new versioning policy

* Fri Dec 28 2007 Shu KONNO <owa@bg.wakwak.com> 3.6.1-0vl2
- added x86_64 to ExclusiveArch

* Sat Oct 15 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 3.6.1-0vl1
- new upstream release

* Thu Feb 07 2002 Toru Sagami <sagami@vinelinux.org> 3.1g-1vl3
- a bit tweak spec
- s/Buildarch/ExclusiveArch/ and enabled it for %%{ix86}
- install man pages into %%{_mandir}

* Sun Oct 15 2000 MACHINO, Satoshi <machino@vinelinux.org> 3.1g-1vl2
- added sparc in Buildarch
- fixed for brp-redhat scripts

* Sun Jun 11 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 3.1g-1vl1
- added a small patch for non-ix86 archtectures

