forked from ImageMagick/ImageMagick6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageMagick.spec.in
296 lines (235 loc) · 10.7 KB
/
ImageMagick.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
%global VERSION @PACKAGE_BASE_VERSION@
%global Patchlevel @MAGICK_PATCHLEVEL_VERSION@
Name: @PACKAGE_NAME@
Version: %{VERSION}
Release: %{Patchlevel}
Summary: Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images.
License: https://imagemagick.org/script/license.php
Url: https://imagemagick.org/
Source0: https://imagemagick.org/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.xz
BuildRequires: pkgconfig(bzip2), pkgconfig(freetype2), pkgconfig(libjpeg), pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4), giflib-devel, pkgconfig(zlib), perl-devel >= 5.8.1
BuildRequires: perl-generators
BuildRequires: libgs-devel, ghostscript-x11
BuildRequires: pkgconfig(ddjvuapi)
BuildRequires: pkgconfig(libwmf), pkgconfig(jasper), libtool-ltdl-devel
BuildRequires: pkgconfig(x11), pkgconfig(xext), pkgconfig(xt)
BuildRequires: pkgconfig(lcms2), pkgconfig(libxml-2.0), pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(OpenEXR)
BuildRequires: pkgconfig(fftw3), pkgconfig(libwebp)
BuildRequires: jbigkit-devel
BuildRequires: pkgconfig(libopenjp2) >= 2.1.0
BuildRequires: pkgconfig(libcgraph) >= 2.9.0
BuildRequires: pkgconfig(raqm)
BuildRequires: pkgconfig(lqr-1)
BuildRequires: pkgconfig(libraw) >= 0.14.8
BuildRequires: pkgconfig(libzstd)
BuildRequires: autoconf automake gcc gcc-c++
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description
ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.
ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. It is distributed under the Apache 2.0 license.
The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory error and thread data race detection to prevent security vulnerabilities.
The authoritative ImageMagick web site is https://imagemagick.org. The authoritative source code repository is http://git.imagemagick.org/repos/ImageMagick. We maintain a source code mirror at GitHub.
%package devel
Summary: Library links and header files for ImageMagick application development
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
ImageMagick-devel contains the library links and header files you'll
need to develop ImageMagick applications. ImageMagick is an image
manipulation program.
If you want to create applications that will use ImageMagick code or
APIs, you need to install ImageMagick-devel as well as ImageMagick.
You do not need to install it if you just want to use ImageMagick,
however.
%package libs
Summary: ImageMagick libraries to link with
%description libs
This packages contains a shared libraries to use within other applications.
%package djvu
Summary: DjVu plugin for ImageMagick
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description djvu
This packages contains a plugin for ImageMagick which makes it possible to
save and load DjvU files from ImageMagick and libMagickCore using applications.
%package doc
Summary: ImageMagick HTML documentation
%description doc
ImageMagick documentation, this package contains usage (for the
commandline tools) and API (for the libraries) documentation in HTML format.
Note this documentation can also be found on the ImageMagick website:
https://imagemagick.org/.
%package perl
Summary: ImageMagick perl bindings
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description perl
Perl bindings to ImageMagick.
Install ImageMagick-perl if you want to use any perl scripts that use
ImageMagick.
%package c++
Summary: ImageMagick Magick++ library (C++ bindings)
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description c++
This package contains the Magick++ library, a C++ binding to the ImageMagick
graphics manipulation library.
Install ImageMagick-c++ if you want to use any applications that use Magick++.
%package c++-devel
Summary: C++ bindings for the ImageMagick library
Requires: %{name}-c++%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description c++-devel
ImageMagick-devel contains the static libraries and header files you'll
need to develop ImageMagick applications using the Magick++ C++ bindings.
ImageMagick is an image manipulation program.
If you want to create applications that will use Magick++ code
or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and
ImageMagick.
You don't need to install it if you just want to use ImageMagick, or if you
want to develop/compile applications using the ImageMagick C interface,
however.
%prep
%autosetup -p1 -n %{name}-%{VERSION}-%{Patchlevel}
# for %%doc
mkdir Magick++/examples
cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
%build
autoconf -f -i
export CFLAGS="%{optflags} -DIMPNG_SETJMP_IS_THREAD_SAFE"
%configure --enable-shared \
--disable-static \
--with-modules \
--with-perl \
--with-x \
--with-threads \
--with-magick_plus_plus \
--with-gslib \
--with-wmf \
--with-webp \
--with-openexr \
--with-rsvg \
--with-xml \
--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
--without-dps \
--without-gcc-arch \
--with-jbig \
--with-openjp2 \
--with-raw \
--with-lqr \
--with-gvc \
--with-raqm
# Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild
make
%install
%make_install
cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VERSION}
rm %{buildroot}%{_libdir}/*.la
# perlmagick: fix perl path of demo files
%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
# perlmagick: cleanup various perl tempfiles from the build which get installed
find %{buildroot} -name "*.bs" |xargs rm -f
find %{buildroot} -name ".packlist" |xargs rm -f
find %{buildroot} -name "perllocal.pod" |xargs rm -f
# perlmagick: build files list
echo "%defattr(-,root,root,-)" > perl-pkg-files
find %{buildroot}/%{_libdir}/perl* -type f -print \
| sed "s@^%{buildroot}@@g" > perl-pkg-files
#find %{buildroot}%{perl_vendorarch} -type d -print \
# | sed "s@^%{buildroot}@%dir @g" \
# | grep -v '^%dir %{perl_vendorarch}$' \
# | grep -v '/auto$' >> perl-pkg-files
if [ -z perl-pkg-files ] ; then
echo "ERROR: EMPTY FILE LIST"
exit -1
fi
# fix multilib issues: Rename provided file with platform-bits in name.
# Create platform independent file inplace of provided and conditionally include required.
# $1 - filename.h to process.
function multilibFileVersions(){
mv $1 ${1%%.h}-%{__isa_bits}.h
local basename=$(basename $1)
cat >$1 <<EOF
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "${basename%%.h}-32.h"
#elif __WORDSIZE == 64
# include "${basename%%.h}-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
EOF
}
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/magick-config.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/magick-baseconfig.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/version.h
%check
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
%make_build check
%ldconfig_scriptlets libs
%ldconfig_scriptlets c++
%files
%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt
%{_bindir}/[a-z]*
%{_mandir}/man[145]/[a-z]*
%{_mandir}/man1/%{name}.*
%files libs
%doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
%{_libdir}/libMagickCore-6.Q16.so*
%{_libdir}/libMagickWand-6.Q16.so*
%{_libdir}/%{name}-%{VERSION}
%{_datadir}/%{name}-6
%exclude %{_libdir}/%{name}-%{VERSION}/modules-Q16/coders/djvu.*
%dir %{_sysconfdir}/%{name}-6
%config(noreplace) %{_sysconfdir}/%{name}-6/*.xml
%files devel
%{_bindir}/MagickCore-config
%{_bindir}/Magick-config
%{_bindir}/MagickWand-config
%{_bindir}/Wand-config
%{_libdir}/libMagickCore-6.Q16.so
%{_libdir}/libMagickWand-6.Q16.so
%{_libdir}/pkgconfig/MagickCore.pc
%{_libdir}/pkgconfig/MagickCore-6.Q16.pc
%{_libdir}/pkgconfig/ImageMagick.pc
%{_libdir}/pkgconfig/ImageMagick-6.Q16.pc
%{_libdir}/pkgconfig/MagickWand.pc
%{_libdir}/pkgconfig/MagickWand-6.Q16.pc
%{_libdir}/pkgconfig/Wand.pc
%{_libdir}/pkgconfig/Wand-6.Q16.pc
%dir %{_includedir}/%{name}-6
%{_includedir}/%{name}-6/magick
%{_includedir}/%{name}-6/wand
%{_mandir}/man1/Magick-config.*
%{_mandir}/man1/MagickCore-config.*
%{_mandir}/man1/Wand-config.*
%{_mandir}/man1/MagickWand-config.*
%files djvu
%{_libdir}/%{name}-%{VERSION}/modules-Q16/coders/djvu.*
%files doc
%doc %{_datadir}/doc/%{name}-6
%doc %{_datadir}/doc/%{name}-%{VERSION}
%doc LICENSE
%files c++
%doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
%doc www/Magick++/COPYING
%{_libdir}/libMagick++-6.Q16.so.*
%files c++-devel
%doc Magick++/examples
%{_bindir}/Magick++-config
%{_includedir}/%{name}-6/Magick++
%{_includedir}/%{name}-6/Magick++.h
%{_libdir}/libMagick++-6.Q16.so
%{_libdir}/pkgconfig/Magick++.pc
%{_libdir}/pkgconfig/Magick++-6.Q16.pc
%{_libdir}/pkgconfig/ImageMagick++.pc
%{_libdir}/pkgconfig/ImageMagick++-6.Q16.pc
%{_mandir}/man1/Magick++-config.*
%files perl -f perl-pkg-files
%{_mandir}/man3/*
%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
%changelog
* Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0
- Port of RedHat's RPM script to support ImageMagick.