File: ImageMagick.spec.in

package info (click to toggle)
imagemagick 6%3A6.0.6.2-2.9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 33,284 kB
  • ctags: 14,844
  • sloc: ansic: 190,790; cpp: 17,203; sh: 8,740; perl: 4,190; makefile: 1,740; tcl: 459
file content (214 lines) | stat: -rw-r--r-- 6,907 bytes parent folder | download
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
# Allow for selectively disabling from commandline
%{!?quantum:%define quantum 16}
%{!?perlm:%define perlm 1}
%{!?cplus:%define cplus 1}

%define name  @PACKAGE_NAME@
%define version @VERSION@
%define release 2
%define serial  1
%define prefix  @prefix@
%define datadir %{prefix}/share
%define pkgdatadir %{prefix}/share/@PACKAGE@-@VERSION@
%define project Magick
%define wand Wand

Summary: Convert, Edit, and Compose Images
Name: %{name}
Version: %{version}
Release: %{release}
Vendor: ImageMagick Studio LLC
URL: http://www.imageMagick.org/
Source: ftp://ftp.imageMagick.org/pub/%{name}/%{name}-%{version}.tar.bz2
License: freeware
Group: X11/Applications/Graphics
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildPrereq: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
BuildPrereq: libtiff-devel, zlib-devel
BuildPrereq: freetype-devel >= 2.0.1
Requires: bzip2, freetype, libjpeg, libpng, zlib

%description
ImageMagick is a robust collection of tools and libraries offered
under a usage license to read, write, and manipulate an image in many
image formats (over 89 major formats) including popular formats like
TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick you can create
images dynamically, making it suitable for Web applications. You can
also resize, rotate, sharpen, color reduce, or add special effects to
an image or image sequence and save your completed work in the same
or differing image format. Image processing operations are available
from the command line, or from the C, C++, Perl, Java, PHP, Python,
or Ruby programming languages. A high-quality 2D renderer is included,
which provides a subset of SVG capabilities. ImageMagick's focus is on
performance, minimizing bugs, and providing stable APIs and ABIs.

%package devel
Summary: Static libraries and header files for ImageMagick development.
Group: X11/Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
This is the ImageMagick development package.  It includes the static
libraries and header files for use in developing your own applications
that make use of the ImageMagick code and/or APIs.

%if %{perlm}
%package perl
Summary: Object-oriented Perl bindings to ImageMagick
Group: Development/Libraries/Perl
BuildPrereq: perl >= 5.6.0
Requires: %{name} = %{version}-%{release}, perl >= 5.6.0

%description perl
This is the ImageMagick perl support package. It includes perl modules and
support files for access to ImageMagick library from perl.
%endif

%if %{cplus}
%package c++
Summary: Object-oriented C++ bindings to ImageMagick
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description c++
This is the Magick++ package, the object-oriented C++ API to the ImageMagick
image-processing library.

%package c++-devel
Summary: Object-oriented C++ bindings to ImageMagick
Group: Development/Libraries
Requires: %{name} = %{version}, %{name}-c++ = %{version}
Requires: %{name}-devel = %{version}, bzip2-devel, freetype-devel
Requires: libjpeg-devel, libpng-devel, libtiff-devel, zlib-devel, libxml2-devel

%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.
%endif

%prep
%setup -q

%build

#%if %{perlm}
#if [ "`perl -v | grep -c 5.8`" ]; then
#    export PERLOPTS="PREFIX=$RPM_BUILD_ROOT%{_prefix}"
#fi
#%endif

%configure --enable-shared --disable-static \
	--with-modules --without-frozenpaths \
%if %{perlm}
	--with-perl \
	--with-perl-options="$PERLOPTS" \
%else
	--without-perl \
%endif
%if %{cplus}
	--with-magick-plus-plus \
%else
	--without-magick-plus-plus \
%endif
	--with-quantum-depth=%{quantum}
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%if %{perlm}
# Remove unpackaged files.
rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name perllocal.pod -type f`
rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name .packlist -type f`
%endif
# These are empty directories, just nuke 'em.
#rmdir $RPM_BUILD_ROOT%{_includedir}/magick
#rmdir $RPM_BUILD_ROOT%{_datadir}/%{name}
# These have incorrect permissions set.
chmod 755 $RPM_BUILD_ROOT%{_bindir}/%{project}-config
chmod 755 $RPM_BUILD_ROOT%{_bindir}/%{wand}-config
%if %{cplus}
chmod 755 $RPM_BUILD_ROOT%{_bindir}/%{project}++-config
%endif

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644, root, root, 755)
%doc LICENSE NOTICE NEWS AUTHORS QuickStart.txt index.html README.txt www images
%doc %{_datadir}/%{name}-%{version}
%{_libdir}/lib%{project}.so.*
%{_libdir}/lib%{wand}.so.*
%dir %{_libdir}/%{name}-%{version}
%{_libdir}/%{name}-%{version}/config/*.mgk
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quantum}
%{_libdir}/%{name}-%{version}/modules-Q%{quantum}/*/*.so
%{_libdir}/%{name}-%{version}/modules-Q%{quantum}/*/*.la
%attr(755, root, root) %{_bindir}/*
%attr(644, root, man) %{_mandir}/man1/*gz
%attr(644, root, man) %{_mandir}/man4/*gz
%attr(644, root, man) %{_mandir}/man5/*gz

%files devel
%defattr(644, root, root, 755)
%dir %{_includedir}/magick
%{_includedir}/magick/*
%{_includedir}/wand/*
%{_libdir}/lib%{project}.*a
%{_libdir}/lib%{wand}.*a
%{_libdir}/lib%{project}.so
%{_libdir}/lib%{wand}.so
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quantum}
%{_libdir}/%{name}-%{version}/modules-Q%{quantum}/*/*.la
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{wand}.pc
%{_bindir}/%{project}-config
%attr(755, root, root) %{_bindir}/%{project}-config
%{_bindir}/%{wand}-config
%attr(755, root, root) %{_bindir}/%{wand}-config
%attr(644, root, man) %{_mandir}/man1/%{project}-config.1.gz
%attr(644, root, man) %{_mandir}/man1/%{wand}-config.1.gz

%if %{perlm}
%files perl
%defattr(644, root, root, 755)
%dir %{_libdir}/perl*/site_perl/*/*/Image
%{_libdir}/perl*/site_perl/*/*/Image/Magick.pm
%dir %{_libdir}/perl*/site_perl/*/*/auto/Image/Magick
%{_libdir}/perl*/site_perl/*/*/auto/Image/Magick/*
%attr(644, root, man) %{_mandir}/man3/*.gz
%endif

%if %{cplus}
%files c++
%defattr(644, root, root, 755)
%{_libdir}/lib%{project}++.so.*

%files c++-devel
%defattr(644, root, root, 755)
%{_includedir}/Magick++.h
%dir %{_includedir}/Magick++
%{_includedir}/Magick++/*
%{_libdir}/lib%{project}++.*a
%{_libdir}/lib%{project}++.so
%{_libdir}/pkgconfig/%{name}++.pc
%{_bindir}/%{project}++-config
%attr(644, root, man) %{_mandir}/man1/%{project}++-config.1.gz
%endif

%changelog
* Mon Jul 28 2003 Cristy <cristy@mystic.es.dupont.com> 1.0-0
- Port of Troy Edwards' script to support ImageMagick.  Thanks Troy.