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