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