]> git.pld-linux.org Git - packages/exact-image.git/blob - exact-image.spec
0c2b098a1733a29995e278d58e1b108f4ca421b2
[packages/exact-image.git] / exact-image.spec
1 # TODO: ruby (when ready)
2 #
3 # Conditional build:
4 %bcond_without  evas    # Edisplay support
5 %bcond_without  gif     # GIF support
6 %bcond_without  lua     # Lua API
7 %bcond_without  perl    # Perl API
8 %bcond_without  php     # PHP API
9 %bcond_without  python  # Python API
10 %bcond_with     ruby    # Ruby API [not finished as of 0.8.9]
11
12 %ifarch %{x8664}
13 %undefine       with_lua
14 %undefine       with_perl
15 %undefine       with_python
16 %endif
17 %define         php_name        php%{?php_suffix}
18 %include        /usr/lib/rpm/macros.perl
19 Summary:        A fast, modern and generic image processing library
20 Summary(pl.UTF-8):      Szybka, nowoczesna i ogólna biblioteka do przetwarzania obrazu
21 Name:           exact-image
22 Version:        0.8.9
23 Release:        2
24 License:        GPL v2
25 Group:          Applications/Graphics
26 Source0:        http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
27 # Source0-md5:  a8694722cd7cc9aa9407950a8440f0cd
28 Patch0:         %{name}-libs.patch
29 Patch1:         exactimage_0.8.5-1.patch
30 Patch2:         %{name}-giflib.patch
31 Patch3:         %{name}-evas.patch
32 Patch4:         %{name}-install.patch
33 URL:            http://www.exactcode.de/site/open_source/exactimage/
34 BuildRequires:  OpenEXR-devel >= 1.2.0
35 BuildRequires:  agg-devel >= 2.3
36 %{?with_evas:BuildRequires:     evas-devel >= 0.9.9}
37 BuildRequires:  expat-devel
38 # pkgconfig(freetype) >= 9.5.0
39 BuildRequires:  freetype-devel >= 2.1.6
40 %{?with_gif:BuildRequires:      giflib-devel >= 5}
41 BuildRequires:  jasper-devel
42 BuildRequires:  lcms-devel >= 1.10
43 BuildRequires:  libjpeg-devel
44 BuildRequires:  libpng-devel >= 2:1.5
45 BuildRequires:  libstdc++-devel
46 BuildRequires:  libtiff-devel
47 %{?with_lua:BuildRequires:      lua51-devel >= 5.1}
48 BuildRequires:  perl-devel >= 1:5.8.0
49 %{?with_php:BuildRequires:      %{php_name}-devel >= 5.2.0}
50 BuildRequires:  pkgconfig
51 %{?with_python:BuildRequires:   python-devel >= 1:2.5.0}
52 BuildRequires:  rpm-perlprov
53 BuildRequires:  rpm-pythonprov
54 BuildRequires:  rpmbuild(macros) >= 1.219
55 %{?with_ruby:BuildRequires:     ruby-devel >= 1.8.5}
56 %{?with_perl:BuildRequires:     swig-perl >= 1.3.32}
57 %{?with_php:BuildRequires:      swig-php >= 1.3.32}
58 %{?with_python:BuildRequires:   swig-python >= 1.3.32}
59 BuildRequires:  xorg-lib-libX11-devel >= 1.3
60 BuildRequires:  zlib-devel
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %description
64 A fast, modern and generic (template based) C++ image processing
65 library, alternative to ImageMagick.
66
67 %description -l pl.UTF-8
68 Szybka, nowoczesna i ogólna (oparta na szablonach) biblioteka C++
69 do przetwarzania obrazu, będąca alternatywą dla biblioteki
70 ImageMagick.
71
72 %package -n lua-ExactImage
73 Summary:        ExactImage API for Lua language
74 Summary(pl.UTF-8):      API ExactImage dla języka Lua
75 Group:          Development/Languages
76 Requires:       lua51
77
78 %description -n lua-ExactImage
79 ExactImage API for Lua language.
80
81 %description -n lua-ExactImage -l pl.UTF-8
82 API ExactImage dla języka Lua.
83
84 %package -n perl-ExactImage
85 Summary:        ExactImage API for Perl
86 Summary(pl.UTF-8):      API ExactImage dla Perla
87 Group:          Development/Languages/Perl
88
89 %description -n perl-ExactImage
90 ExactImage API for Perl.
91
92 %description -n perl-ExactImage -l pl.UTF-8
93 API ExactImage dla Perla.
94
95 %package -n %{php_name}-ExactImage
96 Summary:        ExactImage API for PHP
97 Summary(pl.UTF-8):      API ExactImage dla PHP
98 Group:          Development/Languages/Perl
99 %{?requires_php_extension}
100
101 %description -n %{php_name}-ExactImage
102 ExactImage API for PHP.
103
104 %description -n %{php_name}-ExactImage -l pl.UTF-8
105 API ExactImage dla PHP.
106
107 %package -n python-ExactImage
108 Summary:        ExactImage API for Python
109 Summary(pl.UTF-8):      API ExactImage dla Pythona
110 Group:          Development/Languages/Python
111
112 %description -n python-ExactImage
113 ExactImage API for Python.
114
115 %description -n python-ExactImage -l pl.UTF-8
116 API ExactImage dla Pythona.
117
118 %prep
119 %setup -q
120 %patch0 -p1
121 %patch1 -p1
122 %patch2 -p1
123 %patch3 -p1
124 %patch4 -p1
125
126 %build
127 ./configure \
128         --prefix=%{_prefix} \
129         %{!?with_evas:--without-evas} \
130         %{!?with_gif:--without-libungif} \
131         %{!?with_lua:--without-lua} \
132         %{!?with_perl:--without-perl} \
133         %{!?with_php:--without-php} \
134         %{!?with_python:--without-python}
135
136 %{__make} \
137         CC="%{__cc}" \
138         CXX="%{__cxx}" \
139         CFLAGS="%{rpmcflags}" \
140         CXXFLAGS="%{rpmcflags}" \
141         Q=
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145
146 %{__make} install \
147         DESTDIR=$RPM_BUILD_ROOT \
148         PERL_INSTALLDIR=%{perl_vendorarch} \
149         PHP_INSTALLDIR=%{_libdir}/php \
150         PYTHON_LIBDIR=%{py_sitedir} \
151         api/lua/libdir=%{_libdir}/lua \
152         Q=
153
154 %if %{with python}
155 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
156 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
157 %py_postclean
158 %endif
159
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %files
164 %defattr(644,root,root,755)
165 %doc README TODO
166 %attr(755,root,root) %{_bindir}/bardecode
167 %attr(755,root,root) %{_bindir}/e2mtiff
168 %attr(755,root,root) %{_bindir}/econvert
169 %attr(755,root,root) %{_bindir}/edentify
170 %{?with_evas:%attr(755,root,root) %{_bindir}/edisplay}
171 %attr(755,root,root) %{_bindir}/empty-page
172 %attr(755,root,root) %{_bindir}/hocr2pdf
173 %attr(755,root,root) %{_bindir}/optimize2bw
174
175 %if %{with lua}
176 %files -n lua-ExactImage
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_libdir}/lua/ExactImage.so
179 %endif
180
181 %if %{with perl}
182 %files -n perl-ExactImage
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{perl_vendorarch}/ExactImage.so
185 %{perl_vendorarch}/ExactImage.pm
186 %endif
187
188 %if %{with php}
189 %files -n %{php_name}-ExactImage
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{php_extensiondir}/ExactImage.so
192 %{php_extensiondir}/ExactImage.php
193 %endif
194
195 %if %{with python}
196 %files -n python-ExactImage
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{py_sitedir}/_ExactImage.so
199 %{py_sitedir}/ExactImage.py[co]
200 %endif
This page took 0.331564 seconds and 2 git commands to generate.