]> git.pld-linux.org Git - packages/exact-image.git/blob - exact-image.spec
- drop obsolete and outdated manual inclusion of rpm macros
[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_with     php     # PHP API
9 %bcond_without  python  # Python API
10 %bcond_with     ruby    # Ruby API [still not finished as of 0.9.2]
11
12 %define         php_name        php%{?php_suffix}
13 %include        /usr/lib/rpm/macros.perl
14 Summary:        A fast, modern and generic image processing library
15 Summary(pl.UTF-8):      Szybka, nowoczesna i ogólna biblioteka do przetwarzania obrazu
16 Name:           exact-image
17 Version:        1.0.1
18 Release:        1
19 License:        GPL v2
20 Group:          Applications/Graphics
21 Source0:        http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
22 # Source0-md5:  1f03ef559ca81cf7a1651a72fd9fe98f
23 Patch0:         %{name}-libs.patch
24 Patch1:         %{name}-ub.patch
25 Patch2:         %{name}-make.patch
26 Patch3:         %{name}-evas.patch
27 Patch4:         %{name}-install.patch
28 URL:            http://www.exactcode.de/site/open_source/exactimage/
29 BuildRequires:  OpenEXR-devel >= 1.2.0
30 BuildRequires:  agg-devel >= 2.3
31 %{?with_evas:BuildRequires:     evas-devel >= 0.9.9}
32 BuildRequires:  expat-devel >= 1.95
33 # pkgconfig(freetype) >= 9.5.0
34 BuildRequires:  freetype-devel >= 2.1.6
35 %{?with_gif:BuildRequires:      giflib-devel >= 5.1}
36 BuildRequires:  jasper-devel
37 BuildRequires:  lcms-devel >= 1.10
38 BuildRequires:  libjpeg-devel
39 BuildRequires:  libpng-devel >= 2:1.5
40 BuildRequires:  libstdc++-devel
41 BuildRequires:  libtiff-devel
42 %{?with_lua:BuildRequires:      lua51-devel >= 5.1}
43 BuildRequires:  perl-devel >= 1:5.8.0
44 %{?with_php:BuildRequires:      %{php_name}-devel >= 5.2.0}
45 BuildRequires:  pkgconfig
46 %{?with_python:BuildRequires:   python-devel >= 1:2.5.0}
47 BuildRequires:  rpm-perlprov
48 BuildRequires:  rpm-pythonprov
49 BuildRequires:  rpmbuild(macros) >= 1.219
50 %{?with_ruby:BuildRequires:     ruby-devel >= 1.8.5}
51 BuildRequires:  sed >= 4.0
52 %{?with_perl:BuildRequires:     swig-perl >= 1.3.32}
53 %{?with_php:BuildRequires:      swig-php >= 3.0.12}
54 %{?with_python:BuildRequires:   swig-python >= 1.3.32}
55 BuildRequires:  xorg-lib-libX11-devel >= 1.3
56 BuildRequires:  zlib-devel
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %description
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.
67
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
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
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
114 %prep
115 %setup -q
116 %patch0 -p1
117 %patch1 -p1
118 %patch2 -p1
119 %patch3 -p1
120 %patch4 -p1
121
122 %if %{with php}
123 %if "%(php%{?php_suffix}-config --version)" >= "7.0"
124 %{__sed} -i -e 's/-php5/-php7/' api/php/Makefile
125 %endif
126 %endif
127
128 %build
129 ./configure \
130         --prefix=%{_prefix} \
131         %{!?with_evas:--without-evas} \
132         %{!?with_gif:--without-libungif} \
133         %{!?with_lua:--without-lua} \
134         %{!?with_perl:--without-perl} \
135         %{!?with_php:--without-php} \
136         %{!?with_python:--without-python}
137
138 %{__make} \
139         CC="%{__cc}" \
140         CXX="%{__cxx}" \
141         CFLAGS="%{rpmcflags}" \
142         CXXFLAGS="%{rpmcflags} -std=gnu++98" \
143         Q=
144
145 %install
146 rm -rf $RPM_BUILD_ROOT
147
148 %{__make} install \
149         DESTDIR=$RPM_BUILD_ROOT \
150         PERL_INSTALLDIR=%{perl_vendorarch} \
151         PHP_INSTALLDIR=%{php_extensiondir} \
152         PYTHON_LIBDIR=%{py_sitedir} \
153         api/lua/libdir=%{_libdir}/lua \
154         Q=
155
156 %if %{with python}
157 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
158 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
159 %py_postclean
160 %endif
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %files
166 %defattr(644,root,root,755)
167 %doc README TODO
168 %attr(755,root,root) %{_bindir}/bardecode
169 %attr(755,root,root) %{_bindir}/e2mtiff
170 %attr(755,root,root) %{_bindir}/econvert
171 %attr(755,root,root) %{_bindir}/edentify
172 %{?with_evas:%attr(755,root,root) %{_bindir}/edisplay}
173 %attr(755,root,root) %{_bindir}/empty-page
174 %attr(755,root,root) %{_bindir}/hocr2pdf
175 %attr(755,root,root) %{_bindir}/optimize2bw
176
177 %if %{with lua}
178 %files -n lua-ExactImage
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_libdir}/lua/ExactImage.so
181 %endif
182
183 %if %{with perl}
184 %files -n perl-ExactImage
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{perl_vendorarch}/ExactImage.so
187 %{perl_vendorarch}/ExactImage.pm
188 %endif
189
190 %if %{with php}
191 %files -n %{php_name}-ExactImage
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{php_extensiondir}/ExactImage.so
194 %{php_extensiondir}/ExactImage.php
195 %endif
196
197 %if %{with python}
198 %files -n python-ExactImage
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{py_sitedir}/_ExactImage.so
201 %{py_sitedir}/ExactImage.py[co]
202 %endif
This page took 0.063428 seconds and 3 git commands to generate.