]> git.pld-linux.org Git - packages/exact-image.git/blob - exact-image.spec
- php install fix
[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_without  php     # PHP API
9 %bcond_without  python  # Python API
10 %bcond_with     ruby    # Ruby API [not finished as of 0.8.9]
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:        0.8.9
18 Release:        2
19 License:        GPL v2
20 Group:          Applications/Graphics
21 Source0:        http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
22 # Source0-md5:  a8694722cd7cc9aa9407950a8440f0cd
23 Patch0:         %{name}-libs.patch
24 Patch1:         exactimage_0.8.5-1.patch
25 Patch2:         %{name}-giflib.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
33 # pkgconfig(freetype) >= 9.5.0
34 BuildRequires:  freetype-devel >= 2.1.6
35 %{?with_gif:BuildRequires:      giflib-devel >= 5}
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 %{?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}
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 %build
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}
130
131 %{__make} \
132         CC="%{__cc}" \
133         CXX="%{__cxx}" \
134         CFLAGS="%{rpmcflags}" \
135         CXXFLAGS="%{rpmcflags}" \
136         Q=
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140
141 %{__make} install \
142         DESTDIR=$RPM_BUILD_ROOT \
143         PERL_INSTALLDIR=%{perl_vendorarch} \
144         PHP_INSTALLDIR=%{php_extensiondir} \
145         PYTHON_LIBDIR=%{py_sitedir} \
146         api/lua/libdir=%{_libdir}/lua \
147         Q=
148
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
155 %clean
156 rm -rf $RPM_BUILD_ROOT
157
158 %files
159 %defattr(644,root,root,755)
160 %doc README TODO
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
165 %{?with_evas:%attr(755,root,root) %{_bindir}/edisplay}
166 %attr(755,root,root) %{_bindir}/empty-page
167 %attr(755,root,root) %{_bindir}/hocr2pdf
168 %attr(755,root,root) %{_bindir}/optimize2bw
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
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
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
This page took 0.117571 seconds and 3 git commands to generate.