X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=povray.spec;h=c22cdb00173e7ce8dc87875a29f4920bb5ef6874;hb=497517478e6c40b46e1e0337ce8de9346c98984c;hp=12df64bc5e5fe4726ae4ec610a3400d6f325c525;hpb=d806ef1b8aa252e9486b93f7953a15091e3f2399;p=packages%2Fpovray.git diff --git a/povray.spec b/povray.spec index 12df64b..c22cdb0 100644 --- a/povray.spec +++ b/povray.spec @@ -1,20 +1,43 @@ + +# +# todo: +# patch for s#/usr/local#/usr# in povray.ini +# (no)svga version +# + +# Conditional build: +# _without_x - without X11 subpackage +# _without_pvm - without PVM support +# +%define snap 20030110 Summary: Persistence of Vision Ray Tracer Summary(pl): Persistence of Vision Ray Tracer Name: povray -Version: 3.1g -Release: 4 -Copyright: distrituable +Version: 3.50c +Release: 1 +License: distributable Group: Applications/Graphics -Group(pl): Aplikacje/Grafika -Source0: ftp://ftp.povray.org/pub/povray/Official/Unix/povuni_s.tgz -Source1: ftp://ftp.povray.org/pub/povray/Official/Unix/povuni_d.tgz -Patch0: povray-makefile_and_config.patch +#Source0: ftp://ftp.povray.org/pub/povray/Official/Unix/povuni_s.tgz +# based on sources from CVS at http://pvmpov.sourceforge.net/ +Source0: %{name}-%{version}-%{snap}.tar.gz +# Source0-md5: 4dc3a74c6182e9f9cb2fc46187fe7e6b +Patch0: %{name}-legal.patch URL: http://www.povray.org/ +%{!?_without_x:BuildRequires:XFree86-devel} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel >= 1.0.8 +BuildRequires: libstdc++-devel +BuildRequires: libtiff-devel +%{!?_without_pvm:BuildRequires:pvm-devel >= 3.4.3-24 } BuildRequires: zlib-devel -BuildRequires: libpng >= 1.0.8 -BuildRequires: XFree86-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define _libdir %{_datadir} +%define _pvmarch %(/usr/bin/pvmgetarch) +%define _pvmroot /usr/lib/pvm3 + %description The Persistence of Vision(tm) Ray-Tracer creates three-dimensional, photo-realistic images using a rendering technique called ray-tracing. @@ -37,48 +60,138 @@ efektami, tj. odbicia %package X11 Summary: X Window povray executable +Summary(pl): povray pod X Window Group: Applications/Graphics -Group(pl): Aplikacje/Grafika Requires: %{name} = %{version} %description X11 The Persistence of Vision(tm) Ray-Tracer X Window executable. -%prep -%setup -q -n povray31 -b 1 +%description X11 -l pl +Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla X +Window. + +%package pvm +Summary: PVM/unix povray executable +Summary(pl): Plik wykonywalny povray dla PVM/unix +Group: Applications/Graphics +Requires: %{name} = %{version} + +%description pvm +The Persistence of Vision(tm) Ray-Tracer PVM/unix executable. + +%description pvm -l pl +Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla +PVM/unix. + +%package pvm-X11 +Summary: PVM/xwin povray executable +Summary(pl): Plik wykonywalny povray dla PVM/xwin +Group: Applications/Graphics +Requires: %{name} = %{version} + +%description pvm-X11 +The Persistence of Vision(tm) Ray-Tracer PVM/xwin executable. -%patch0 -p1 +%description pvm-X11 -l pl +Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla +PVM/xwin. + +%prep +%setup -q %build -cd source/unix -%{__make} newunix newxwin OPT_FLAGS="$RPM_OPT_FLAGS" +%{__aclocal} +%{__autoconf} +%{__automake} +%if %{!?_without_pvm:%{!?_without_x:1}%{?_without_x:0}}%{?_without_pvm:0} +%configure \ + --enable-pvm \ + --with-pvm-arch=%{_pvmarch} \ + --x-includes=/usr/X11R6/include \ + --x-libraries=/usr/X11R6/lib +%{__make} +install src/povray x-pvmpov +%endif + +%if %{!?_without_pvm:1}%{?_without_pvm:0} +%{__make} clean + +%configure \ + --enable-pvm \ + --with-pvm-arch=%{_pvmarch} \ + --without-x +%{__make} +install src/povray pvmpov +%endif + +%if %{!?_without_x:1}%{?_without_x:0} +%configure \ + --x-includes=/usr/X11R6/include \ + --x-libraries=/usr/X11R6/lib +%{__make} +install src/povray x-povray +%{__make} clean +%endif + +%configure \ + --without-x +%{__make} + %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_bindir},/etc/skel,%{_mandir}/man1,%{_datadir}/povray31} +install -d $RPM_BUILD_ROOT{%{_sysconfdir},/usr/X11R6/bin} \ + $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch} + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT -install -s source/unix/{povray,x-povray} $RPM_BUILD_ROOT%{_bindir} -install source/unix/povrayrc $RPM_BUILD_ROOT/etc/skel/.povrayrc +%if %{!?_without_x:1}%{?_without_x:0} +install x-povray $RPM_BUILD_ROOT%{_bindir} +%endif -install povray.1 $RPM_BUILD_ROOT%{_mandir}/man1 +%if %{!?_without_pvm:%{!?_without_x:1}%{?_without_x:0}}%{?_without_pvm:0} +install x-pvmpov $RPM_BUILD_ROOT%{_bindir}/x-pvmpov +ln -s %{_binir}/x-pvmpov $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}/x-pvmpov +%endif -cp -r allscene include scenes $RPM_BUILD_ROOT%{_datadir}/povray31 -install *.ini *.pov $RPM_BUILD_ROOT%{_datadir}/povray31 +%if %{!?_without_pvm:1}%{?_without_pvm:0} +install pvmpov $RPM_BUILD_ROOT%{_bindir}/pvmpov +ln -s %{_binir}/pvmpov $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}/pvmpov +%endif -gzip -9nf gamma.gif.txt povlegal.doc povuser.txt \ - $RPM_BUILD_ROOT%{_mandir}/man1/* +install povray.ini $RPM_BUILD_ROOT%{_sysconfdir} +install povray.conf $RPM_BUILD_ROOT%{_sysconfdir} +ln -sf %{_sysconfdir}/povray.ini $RPM_BUILD_ROOT%{_datadir}/povray-3.5/povray.ini %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc gamma.gif.txt.gz povuser.txt.gz gamma.gif povlegal.doc.gz +%doc AUTHORS ChangeLog NEWS README* povlegal.doc *.txt doc/html %attr(755,root,root) %{_bindir}/povray -%{_datadir}/povray31 -/etc/skel/.povrayrc -%{_mandir}/man1/* +%{_libdir}/povray* +%{_mandir}/man?/* +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/povray.* +%if %{!?_without_x:1}%{?_without_x:0} %files X11 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/x-povray +%endif + +%if %{!?_without_pvm:1}%{?_without_pvm:0} +%files pvm +%defattr(644,root,root,755) +%attr(755,root,root) %{_pvmroot}/bin/%{_pvmarch}/pvmpov +%attr(755,root,root) %{_bindir}/pvmpov +%endif + +%if %{!?_without_pvm:%{!?_without_x:1}%{?_without_x:0}}%{?_without_pvm:0} +%files pvm-X11 +%defattr(644,root,root,755) +%attr(755,root,root) %{_pvmroot}/bin/%{_pvmarch}/x-pvmpov +%attr(755,root,root) %{_bindir}/x-pvmpov +%endif