]> git.pld-linux.org Git - packages/povray.git/blob - povray.spec
- cosmetics (spaces -> tabs)
[packages/povray.git] / povray.spec
1
2 #
3 # todo:
4 #      patch for s#/usr/local#/usr# in povray.ini
5 #
6 #
7 # Conditional build:
8 %bcond_without x        # - without X11 subpackage
9 %bcond_without pvm      # - without PVM support
10 %bcond_with svga        # - with svgalib support (doesn't work on many platforms)
11 #
12 %define         snap 20030110
13 Summary:        Persistence of Vision Ray Tracer
14 Summary(pl):    Persistence of Vision Ray Tracer
15 Name:           povray
16 Version:        3.50c
17 Release:        3
18 License:        distributable
19 Group:          Applications/Graphics
20 #Source0:       ftp://ftp.povray.org/pub/povray/Official/Unix/povuni_s.tgz
21 # based on sources from CVS at http://pvmpov.sourceforge.net/
22 Source0:        %{name}-%{version}-%{snap}.tar.gz
23 # Source0-md5:  4dc3a74c6182e9f9cb2fc46187fe7e6b
24 Patch0:         %{name}-legal.patch
25 Patch1:         %{name}-64bit.patch
26 Patch2:         %{name}-X-libs.patch
27 Patch3:         %{name}-lib64.patch
28 Patch4:         %{name}-no_svgalib.patch
29 URL:            http://www.povray.org/
30 %{?with_x:BuildRequires:        XFree86-devel}
31 BuildRequires:  autoconf
32 BuildRequires:  automake
33 BuildRequires:  libjpeg-devel
34 BuildRequires:  libpng-devel >= 1.0.8
35 BuildRequires:  libstdc++-devel
36 BuildRequires:  libtiff-devel
37 %{?with_pvm:BuildRequires:      pvm-devel >= 3.4.3-24}
38 %{?with_svga:BuildRequires:     svgalib-devel}
39 BuildRequires:  zlib-devel
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _pvmarch        %(/usr/bin/pvmgetarch)
43 %define         _pvmroot        /usr/%{_lib}/pvm3
44
45 %description
46 The Persistence of Vision(tm) Ray-Tracer creates three-dimensional,
47 photo-realistic images using a rendering technique called ray-tracing.
48 It reads in a text file containing information describing the objects
49 and lighting in a scene and generates an image of that scene from the
50 view point of a camera also described in the text file. Ray-tracing is
51 not a fast process by any means, but it produces very high quality
52 images with realistic reflections, shading, perspective and other
53 effects.
54
55 %description -l pl
56 Persistence of Vision(tm) Ray-Tracer tworzy trójwymiarowe,
57 fotorealistyczne obrazy za pomoc± techniki renderingu zwanej
58 ray-tracing. Program pobiera z pliku tekstowego informacje opisuj±ce
59 obiekty oraz ¶wiat³o przedstawianego ¶wiata, a nastêpnie generuje
60 rysunek z punktu widzenia kamery, która tak¿e jest definiowana w w/w
61 pliku tekstowym. Ray-tracing nie pozwala na szybkie tworzenie obrazów,
62 ale za to twórca otrzymuje wyskokiej jako¶ci bitmapy z realistycznymi
63 efektami, tj. odbicia ¶wiat³a, cienie, perspektywa i inne.
64
65 %package X11
66 Summary:        X Window povray executable
67 Summary(pl):    povray pod X Window
68 Group:          Applications/Graphics
69 Requires:       %{name} = %{version}
70
71 %description X11
72 The Persistence of Vision(tm) Ray-Tracer X Window executable.
73
74 %description X11 -l pl
75 Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla X
76 Window.
77
78 %package pvm
79 Summary:        PVM/unix povray executable
80 Summary(pl):    Plik wykonywalny povray dla PVM/unix
81 Group:          Applications/Graphics
82 Requires:       %{name} = %{version}
83
84 %description pvm
85 The Persistence of Vision(tm) Ray-Tracer PVM/unix executable.
86
87 %description pvm -l pl
88 Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla
89 PVM/unix.
90
91 %package pvm-X11
92 Summary:        PVM/xwin povray executable
93 Summary(pl):    Plik wykonywalny povray dla PVM/xwin
94 Group:          Applications/Graphics
95 Requires:       %{name} = %{version}
96
97 %description pvm-X11
98 The Persistence of Vision(tm) Ray-Tracer PVM/xwin executable.
99
100 %description pvm-X11 -l pl
101 Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla
102 PVM/xwin.
103
104 %prep
105 %setup -q
106 %patch1 -p1
107 %patch2 -p1
108 %if "%{_lib}" == "lib64"
109 %patch3 -p1
110 %endif
111 %if %{without svga}
112 %patch4 -p1
113 %endif
114
115 %build
116 %{__aclocal}
117 %{__autoconf}
118 %{__automake}
119 %if %{with x} && %{with pvm}
120 %configure \
121         --libdir=%{_datadir} \
122         --enable-pvm \
123         --with-pvm-arch=%{_pvmarch} \
124         --with-pvm-libs=%{_libdir} \
125         --x-includes=/usr/X11R6/include \
126         --x-libraries=/usr/X11R6/%{_lib}
127 %{__make}
128 install src/povray x-pvmpov
129 %endif
130
131 %if %{with pvm}
132 %{__make} clean
133
134 %configure \
135         --libdir=%{_datadir} \
136         --enable-pvm \
137         --with-pvm-arch=%{_pvmarch} \
138         --with-pvm-libs=%{_libdir} \
139         --without-x
140 %{__make}
141 install src/povray pvmpov
142 %endif
143
144 %if %{with x}
145 %configure \
146         --libdir=%{_datadir} \
147         --x-includes=/usr/X11R6/include \
148         --x-libraries=/usr/X11R6/%{_lib} 
149 %{__make}
150 install src/povray x-povray
151 %{__make} clean
152 %endif
153
154 %configure \
155         --libdir=%{_datadir} \
156         --without-x
157 %{__make}
158
159
160 %install
161 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/usr/X11R6/bin} \
163         $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}
164
165 %{__make} install \
166         DESTDIR=$RPM_BUILD_ROOT
167
168 %if %{with x}
169 install x-povray $RPM_BUILD_ROOT%{_bindir}
170 %endif
171
172 %if %{with x} && %{with pvm}
173 install x-pvmpov $RPM_BUILD_ROOT%{_bindir}/x-pvmpov
174 ln -s %{_bindir}/x-pvmpov $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}/x-pvmpov
175 %endif
176
177 %if %{with pvm}
178 install pvmpov $RPM_BUILD_ROOT%{_bindir}/pvmpov
179 ln -s %{_bindir}/pvmpov $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}/pvmpov
180 %endif
181
182 install povray.ini $RPM_BUILD_ROOT%{_sysconfdir}
183 install povray.conf $RPM_BUILD_ROOT%{_sysconfdir}
184 ln -sf %{_sysconfdir}/povray.ini $RPM_BUILD_ROOT%{_datadir}/povray-3.5/povray.ini
185
186 %clean
187 rm -rf $RPM_BUILD_ROOT
188
189 %files
190 %defattr(644,root,root,755)
191 %doc AUTHORS ChangeLog NEWS README* povlegal.doc *.txt doc/html
192 %attr(755,root,root) %{_bindir}/povray
193 %{_datadir}/povray*
194 %{_mandir}/man?/*
195 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/povray.*
196
197 %if %{with x}
198 %files X11
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/x-povray
201 %endif
202
203 %if %{with pvm}
204 %files pvm
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_pvmroot}/bin/%{_pvmarch}/pvmpov
207 %attr(755,root,root) %{_bindir}/pvmpov
208 %endif
209
210 %if %{with pvm} && %{with x}
211 %files pvm-X11
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_pvmroot}/bin/%{_pvmarch}/x-pvmpov
214 %attr(755,root,root) %{_bindir}/x-pvmpov
215 %endif
This page took 0.086179 seconds and 4 git commands to generate.