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