]>
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 |
e48077b8 | 10 | %bcond_with ruby # Ruby API [still not finished as of 0.9.2] |
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 |
e48077b8 | 17 | Version: 0.9.2 |
1d3f232b | 18 | Release: 3 |
66bf4c60 TP |
19 | License: GPL v2 |
20 | Group: Applications/Graphics | |
21 | Source0: http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2 | |
e48077b8 | 22 | # Source0-md5: bb9c8be82a4b5126be0224529ea7c4c7 |
66bf4c60 | 23 | Patch0: %{name}-libs.patch |
b5d616e4 JB |
24 | Patch1: %{name}-ub.patch |
25 | Patch2: %{name}-make.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 | 32 | %{?with_evas:BuildRequires: evas-devel >= 0.9.9} |
e48077b8 | 33 | BuildRequires: expat-devel >= 1.95 |
1d474b68 JB |
34 | # pkgconfig(freetype) >= 9.5.0 |
35 | BuildRequires: freetype-devel >= 2.1.6 | |
e48077b8 | 36 | %{?with_gif:BuildRequires: giflib-devel >= 5.1} |
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} | |
e48077b8 | 52 | BuildRequires: sed >= 4.0 |
1d474b68 | 53 | %{?with_perl:BuildRequires: swig-perl >= 1.3.32} |
e48077b8 | 54 | %{?with_php:BuildRequires: swig-php >= 3.0.12} |
1d474b68 | 55 | %{?with_python:BuildRequires: swig-python >= 1.3.32} |
66bf4c60 | 56 | BuildRequires: xorg-lib-libX11-devel >= 1.3 |
1d474b68 | 57 | BuildRequires: zlib-devel |
66bf4c60 TP |
58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59 | ||
60 | %description | |
1d474b68 JB |
61 | A fast, modern and generic (template based) C++ image processing |
62 | library, alternative to ImageMagick. | |
63 | ||
64 | %description -l pl.UTF-8 | |
65 | Szybka, nowoczesna i ogólna (oparta na szablonach) biblioteka C++ | |
66 | do przetwarzania obrazu, będąca alternatywą dla biblioteki | |
67 | ImageMagick. | |
66bf4c60 | 68 | |
af9f5a1e JB |
69 | %package -n lua-ExactImage |
70 | Summary: ExactImage API for Lua language | |
71 | Summary(pl.UTF-8): API ExactImage dla języka Lua | |
72 | Group: Development/Languages | |
73 | Requires: lua51 | |
74 | ||
75 | %description -n lua-ExactImage | |
76 | ExactImage API for Lua language. | |
77 | ||
78 | %description -n lua-ExactImage -l pl.UTF-8 | |
79 | API ExactImage dla języka Lua. | |
80 | ||
81 | %package -n perl-ExactImage | |
82 | Summary: ExactImage API for Perl | |
83 | Summary(pl.UTF-8): API ExactImage dla Perla | |
84 | Group: Development/Languages/Perl | |
85 | ||
86 | %description -n perl-ExactImage | |
87 | ExactImage API for Perl. | |
88 | ||
89 | %description -n perl-ExactImage -l pl.UTF-8 | |
90 | API ExactImage dla Perla. | |
91 | ||
67a43a70 JB |
92 | %package -n %{php_name}-ExactImage |
93 | Summary: ExactImage API for PHP | |
94 | Summary(pl.UTF-8): API ExactImage dla PHP | |
95 | Group: Development/Languages/Perl | |
96 | %{?requires_php_extension} | |
97 | ||
98 | %description -n %{php_name}-ExactImage | |
99 | ExactImage API for PHP. | |
100 | ||
101 | %description -n %{php_name}-ExactImage -l pl.UTF-8 | |
102 | API ExactImage dla PHP. | |
103 | ||
af9f5a1e JB |
104 | %package -n python-ExactImage |
105 | Summary: ExactImage API for Python | |
106 | Summary(pl.UTF-8): API ExactImage dla Pythona | |
107 | Group: Development/Languages/Python | |
108 | ||
109 | %description -n python-ExactImage | |
110 | ExactImage API for Python. | |
111 | ||
112 | %description -n python-ExactImage -l pl.UTF-8 | |
113 | API ExactImage dla Pythona. | |
114 | ||
66bf4c60 TP |
115 | %prep |
116 | %setup -q | |
117 | %patch0 -p1 | |
b5d616e4 JB |
118 | %patch1 -p1 |
119 | %patch2 -p1 | |
c1037667 | 120 | %patch3 -p1 |
af9f5a1e | 121 | %patch4 -p1 |
47abdb90 | 122 | %patch5 -p1 |
66bf4c60 | 123 | |
e48077b8 JB |
124 | %if %{with php} |
125 | %if "%(php%{?php_suffix}-config --version)" >= "7.0" | |
126 | %{__sed} -i -e 's/-php5/-php7/' api/php/Makefile | |
127 | %endif | |
128 | %endif | |
129 | ||
66bf4c60 | 130 | %build |
1d474b68 JB |
131 | ./configure \ |
132 | --prefix=%{_prefix} \ | |
133 | %{!?with_evas:--without-evas} \ | |
134 | %{!?with_gif:--without-libungif} \ | |
135 | %{!?with_lua:--without-lua} \ | |
136 | %{!?with_perl:--without-perl} \ | |
137 | %{!?with_php:--without-php} \ | |
138 | %{!?with_python:--without-python} | |
43a87014 | 139 | |
66bf4c60 | 140 | %{__make} \ |
67a43a70 JB |
141 | CC="%{__cc}" \ |
142 | CXX="%{__cxx}" \ | |
66bf4c60 | 143 | CFLAGS="%{rpmcflags}" \ |
b5d616e4 | 144 | CXXFLAGS="%{rpmcflags} -std=gnu++98" \ |
1d474b68 | 145 | Q= |
66bf4c60 TP |
146 | |
147 | %install | |
148 | rm -rf $RPM_BUILD_ROOT | |
149 | ||
150 | %{__make} install \ | |
1d474b68 | 151 | DESTDIR=$RPM_BUILD_ROOT \ |
af9f5a1e | 152 | PERL_INSTALLDIR=%{perl_vendorarch} \ |
84d02486 | 153 | PHP_INSTALLDIR=%{php_extensiondir} \ |
af9f5a1e JB |
154 | PYTHON_LIBDIR=%{py_sitedir} \ |
155 | api/lua/libdir=%{_libdir}/lua \ | |
1d474b68 | 156 | Q= |
66bf4c60 | 157 | |
af9f5a1e JB |
158 | %if %{with python} |
159 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
160 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
161 | %py_postclean | |
162 | %endif | |
163 | ||
66bf4c60 TP |
164 | %clean |
165 | rm -rf $RPM_BUILD_ROOT | |
166 | ||
167 | %files | |
168 | %defattr(644,root,root,755) | |
169 | %doc README TODO | |
ad41e958 TP |
170 | %attr(755,root,root) %{_bindir}/bardecode |
171 | %attr(755,root,root) %{_bindir}/e2mtiff | |
172 | %attr(755,root,root) %{_bindir}/econvert | |
173 | %attr(755,root,root) %{_bindir}/edentify | |
1d474b68 | 174 | %{?with_evas:%attr(755,root,root) %{_bindir}/edisplay} |
ad41e958 TP |
175 | %attr(755,root,root) %{_bindir}/empty-page |
176 | %attr(755,root,root) %{_bindir}/hocr2pdf | |
177 | %attr(755,root,root) %{_bindir}/optimize2bw | |
af9f5a1e JB |
178 | |
179 | %if %{with lua} | |
180 | %files -n lua-ExactImage | |
181 | %defattr(644,root,root,755) | |
182 | %attr(755,root,root) %{_libdir}/lua/ExactImage.so | |
183 | %endif | |
184 | ||
185 | %if %{with perl} | |
186 | %files -n perl-ExactImage | |
187 | %defattr(644,root,root,755) | |
188 | %attr(755,root,root) %{perl_vendorarch}/ExactImage.so | |
189 | %{perl_vendorarch}/ExactImage.pm | |
190 | %endif | |
191 | ||
67a43a70 JB |
192 | %if %{with php} |
193 | %files -n %{php_name}-ExactImage | |
194 | %defattr(644,root,root,755) | |
195 | %attr(755,root,root) %{php_extensiondir}/ExactImage.so | |
196 | %{php_extensiondir}/ExactImage.php | |
197 | %endif | |
198 | ||
af9f5a1e JB |
199 | %if %{with python} |
200 | %files -n python-ExactImage | |
201 | %defattr(644,root,root,755) | |
202 | %attr(755,root,root) %{py_sitedir}/_ExactImage.so | |
203 | %{py_sitedir}/ExactImage.py[co] | |
204 | %endif |