]> 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 Summary:        A fast, modern and generic image processing library
14 Summary(pl.UTF-8):      Szybka, nowoczesna i ogólna biblioteka do przetwarzania obrazu
15 Name:           exact-image
16 Version:        1.0.1
17 Release:        1
18 License:        GPL v2
19 Group:          Applications/Graphics
20 Source0:        http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
21 # Source0-md5:  1f03ef559ca81cf7a1651a72fd9fe98f
22 Patch0:         %{name}-libs.patch
23 Patch1:         %{name}-ub.patch
24 Patch2:         %{name}-make.patch
25 Patch3:         %{name}-evas.patch
26 Patch4:         %{name}-install.patch
27 URL:            http://www.exactcode.de/site/open_source/exactimage/
28 BuildRequires:  OpenEXR-devel >= 1.2.0
29 BuildRequires:  agg-devel >= 2.3
30 %{?with_evas:BuildRequires:     evas-devel >= 0.9.9}
31 BuildRequires:  expat-devel >= 1.95
32 # pkgconfig(freetype) >= 9.5.0
33 BuildRequires:  freetype-devel >= 2.1.6
34 %{?with_gif:BuildRequires:      giflib-devel >= 5.1}
35 BuildRequires:  jasper-devel
36 BuildRequires:  lcms-devel >= 1.10
37 BuildRequires:  libjpeg-devel
38 BuildRequires:  libpng-devel >= 2:1.5
39 BuildRequires:  libstdc++-devel
40 BuildRequires:  libtiff-devel
41 %{?with_lua:BuildRequires:      lua51-devel >= 5.1}
42 BuildRequires:  perl-devel >= 1:5.8.0
43 %{?with_php:BuildRequires:      %{php_name}-devel >= 5.2.0}
44 BuildRequires:  pkgconfig
45 %{?with_python:BuildRequires:   python-devel >= 1:2.5.0}
46 BuildRequires:  rpm-perlprov
47 BuildRequires:  rpm-pythonprov
48 BuildRequires:  rpmbuild(macros) >= 1.219
49 %{?with_ruby:BuildRequires:     ruby-devel >= 1.8.5}
50 BuildRequires:  sed >= 4.0
51 %{?with_perl:BuildRequires:     swig-perl >= 1.3.32}
52 %{?with_php:BuildRequires:      swig-php >= 3.0.12}
53 %{?with_python:BuildRequires:   swig-python >= 1.3.32}
54 BuildRequires:  xorg-lib-libX11-devel >= 1.3
55 BuildRequires:  zlib-devel
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
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.
66
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
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
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
113 %prep
114 %setup -q
115 %patch0 -p1
116 %patch1 -p1
117 %patch2 -p1
118 %patch3 -p1
119 %patch4 -p1
120
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
127 %build
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}
136
137 %{__make} \
138         CC="%{__cc}" \
139         CXX="%{__cxx}" \
140         CFLAGS="%{rpmcflags}" \
141         CXXFLAGS="%{rpmcflags} -std=gnu++98" \
142         Q=
143
144 %install
145 rm -rf $RPM_BUILD_ROOT
146
147 %{__make} install \
148         DESTDIR=$RPM_BUILD_ROOT \
149         PERL_INSTALLDIR=%{perl_vendorarch} \
150         PHP_INSTALLDIR=%{php_extensiondir} \
151         PYTHON_LIBDIR=%{py_sitedir} \
152         api/lua/libdir=%{_libdir}/lua \
153         Q=
154
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
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %files
165 %defattr(644,root,root,755)
166 %doc README TODO
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
171 %{?with_evas:%attr(755,root,root) %{_bindir}/edisplay}
172 %attr(755,root,root) %{_bindir}/empty-page
173 %attr(755,root,root) %{_bindir}/hocr2pdf
174 %attr(755,root,root) %{_bindir}/optimize2bw
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
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
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.086068 seconds and 4 git commands to generate.