]> git.pld-linux.org Git - packages/povray.git/blob - povray.spec
96912d9134c60432f09392092eef74d8150dff74
[packages/povray.git] / povray.spec
1 #
2 # Conditional build:
3 %bcond_without  x       # - without X11 subpackage
4 %bcond_with     pvm     # - with PVM support
5 %bcond_with     svga    # - with svgalib support (doesn't work on many platforms)
6 #
7 %define subver  rc.1
8 %define rel     3
9 Summary:        Persistence of Vision Ray Tracer
10 Summary(pl.UTF-8):      Persistence of Vision Ray Tracer
11 Name:           povray
12 Version:        3.7.1
13 Release:        0.%{subver}.%{rel}
14 Epoch:          1
15 License:        AGPL v3+
16 Group:          Applications/Graphics
17 #Source0Download: https://github.com/POV-Ray/povray/releases
18 Source0:        https://github.com/POV-Ray/povray/archive/v%{version}-%{subver}/%{name}-%{version}-%{subver}.tar.gz
19 # Source0-md5:  6445dd620d709ad4b394aca1e7d976cb
20 Patch0:         %{name}-c++11.patch
21 Patch1:         x32.patch
22 URL:            http://www.povray.org/
23 BuildRequires:  OpenEXR-devel >= 1.2
24 BuildRequires:  SDL-devel >= 1.2
25 BuildRequires:  autoconf >= 2.59
26 BuildRequires:  automake >= 1:1.9
27 BuildRequires:  boost-devel >= 1.38
28 BuildRequires:  libjpeg-devel >= 6b
29 BuildRequires:  libpng-devel >= 2:1.4.0
30 BuildRequires:  libstdc++-devel
31 BuildRequires:  libtiff-devel >= 3.6.1
32 BuildRequires:  perl-base
33 %{?with_pvm:BuildRequires:      pvm-devel >= 3.4.3-24}
34 %{?with_svga:BuildRequires:     svgalib-devel}
35 %{?with_x:BuildRequires:        xorg-lib-libX11-devel}
36 BuildRequires:  zlib-devel >= 1.2.1
37 Requires:       OpenEXR >= 1.2
38 Requires:       SDL >= 1.2
39 Requires:       libtiff >= 3.6.1
40 Requires:       zlib >= 1.2.1
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %if %{with pvm}
44 %define         _pvmarch        %(/usr/bin/pvmgetarch)
45 %define         _pvmroot        /usr/%{_lib}/pvm3
46 %endif
47
48 %description
49 The Persistence of Vision(tm) Ray-Tracer creates three-dimensional,
50 photo-realistic images using a rendering technique called ray-tracing.
51 It reads in a text file containing information describing the objects
52 and lighting in a scene and generates an image of that scene from the
53 view point of a camera also described in the text file. Ray-tracing is
54 not a fast process by any means, but it produces very high quality
55 images with realistic reflections, shading, perspective and other
56 effects.
57
58 %description -l pl.UTF-8
59 Persistence of Vision(tm) Ray-Tracer tworzy trójwymiarowe,
60 fotorealistyczne obrazy za pomocą techniki renderingu zwanej
61 ray-tracing. Program pobiera z pliku tekstowego informacje opisujące
62 obiekty oraz światło przedstawianego świata, a następnie generuje
63 rysunek z punktu widzenia kamery, która także jest definiowana w w/w
64 pliku tekstowym. Ray-tracing nie pozwala na szybkie tworzenie obrazów,
65 ale za to twórca otrzymuje wyskokiej jakości bitmapy z realistycznymi
66 efektami, tj. odbicia światła, cienie, perspektywa i inne.
67
68 %package X11
69 Summary:        X Window povray executable
70 Summary(pl.UTF-8):      povray pod X Window
71 Group:          Applications/Graphics
72 Requires:       %{name} = %{epoch}:%{version}-%{release}
73
74 %description X11
75 The Persistence of Vision(tm) Ray-Tracer X Window executable.
76
77 %description X11 -l pl.UTF-8
78 Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla X
79 Window.
80
81 %package pvm
82 Summary:        PVM/Unix povray executable
83 Summary(pl.UTF-8):      Plik wykonywalny povray dla PVM/Unix
84 Group:          Applications/Graphics
85 Requires:       %{name} = %{epoch}:%{version}-%{release}
86
87 %description pvm
88 The Persistence of Vision(tm) Ray-Tracer PVM/Unix executable.
89
90 %description pvm -l pl.UTF-8
91 Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla
92 PVM/Unix.
93
94 %package pvm-X11
95 Summary:        PVM/xwin povray executable
96 Summary(pl.UTF-8):      Plik wykonywalny povray dla PVM/xwin
97 Group:          Applications/Graphics
98 Requires:       %{name} = %{epoch}:%{version}-%{release}
99
100 %description pvm-X11
101 The Persistence of Vision(tm) Ray-Tracer PVM/xwin executable.
102
103 %description pvm-X11 -l pl.UTF-8
104 Plik wykonywalny The Persistence of Vision(tm) Ray-Tracer dla
105 PVM/xwin.
106
107 %prep
108 %setup -q -n %{name}-%{version}-%{subver}
109 %patch0 -p1
110 %ifarch x32
111 %patch1 -p1
112 %endif
113
114 %build
115 cd unix
116 ./prebuild.sh
117 cd ..
118
119 COMPILED_BY="PLD/Linux Team";export COMPILED_BY;
120 # disable optimiz-arch, it means -march=native for gcc
121 %if %{with x} && %{with pvm}
122 %configure \
123         --libdir=%{_datadir} \
124         --disable-optimiz-arch \
125         --enable-pvm \
126         --with-pvm-arch=%{_pvmarch} \
127         --with-pvm-libs=%{_libdir}
128 %{__make}
129 install unix/povray x-pvmpov
130 %endif
131
132 %if %{with pvm}
133 %{__make} clean
134
135 %configure \
136         --libdir=%{_datadir} \
137         --disable-optimiz-arch \
138         --enable-pvm \
139         --with-pvm-arch=%{_pvmarch} \
140         --with-pvm-libs=%{_libdir} \
141         --without-x
142 %{__make}
143 install unix/povray pvmpov
144 %endif
145
146 %if %{with x}
147 %configure \
148         --libdir=%{_datadir} \
149         --disable-optimiz-arch
150 %{__make}
151 install unix/povray x-povray
152 %{__make} clean
153 %endif
154
155 %configure \
156         --libdir=%{_datadir} \
157         --disable-optimiz-arch \
158         --without-x
159 %{__make}
160
161 %install
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_datadir}}
164 %if %{with pvm}
165 install -d $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}
166 %endif
167
168 %{__make} install \
169         INSTALL="install -c -D" \
170         mkdir_p="mkdir -p" \
171         DESTDIR=$RPM_BUILD_ROOT
172
173 %if %{with x}
174 install x-povray $RPM_BUILD_ROOT%{_bindir}
175 %endif
176
177 %if %{with x} && %{with pvm}
178 install x-pvmpov $RPM_BUILD_ROOT%{_bindir}/x-pvmpov
179 ln -s %{_bindir}/x-pvmpov $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}/x-pvmpov
180 %endif
181
182 %if %{with pvm}
183 install pvmpov $RPM_BUILD_ROOT%{_bindir}/pvmpov
184 ln -s %{_bindir}/pvmpov $RPM_BUILD_ROOT%{_pvmroot}/bin/%{_pvmarch}/pvmpov
185 %endif
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %files
191 %defattr(644,root,root,755)
192 %doc AUTHORS ChangeLog NEWS README* changes.txt
193 %attr(755,root,root) %{_bindir}/povray
194 %{_datadir}/povray*
195 %{_docdir}/povray*
196 %{_mandir}/man1/povray.1*
197 %dir %{_sysconfdir}/povray
198 %dir %{_sysconfdir}/povray/3.7
199 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/3.7/povray.conf
200 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/3.7/povray.ini
201
202 %if %{with x}
203 %files X11
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_bindir}/x-povray
206 %endif
207
208 %if %{with pvm}
209 %files pvm
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_pvmroot}/bin/%{_pvmarch}/pvmpov
212 %attr(755,root,root) %{_bindir}/pvmpov
213 %endif
214
215 %if %{with pvm} && %{with x}
216 %files pvm-X11
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_pvmroot}/bin/%{_pvmarch}/x-pvmpov
219 %attr(755,root,root) %{_bindir}/x-pvmpov
220 %endif
This page took 0.099568 seconds and 2 git commands to generate.