root / ImageMagick / trunk / ImageMagick.spec.in

Revision 11659, 7.4 kB (checked in by cristy, 35 hours ago)
Line 
1Summary: ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 200) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
2Name: @PACKAGE_NAME@
3Version: @PACKAGE_VERSION@@PACKAGE_VERSION_ADDENDUM@
4Release: 5
5License: http://www.imagemagick.org/script/license.php
6Group: Applications/Multimedia
7Source: ftp://ftp.imagemagick.org/pub/ImageMagick/%{name}/%{name}-%{version}.tar.bz2
8Url: http://www.imagemagick.org/
9Buildroot: %{_tmppath}/%{name}-%{version}-root
10BuildPrereq: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
11BuildPrereq: libtiff-devel, zlib-devel
12BuildPrereq: freetype-devel >= 2.0.1
13Requires: bzip2, freetype, libjpeg, libpng, zlib
14%define _unpackaged_files_terminate_build 0
15
16%description
17ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including DPX, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
18
19The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), nMagick (Neko/haXe), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically.
20
21ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems.
22
23%package devel
24Summary: Static libraries and header files for ImageMagick application development.
25Group: Development/Libraries
26Requires: %{name} = %{version}-%{release}
27
28%description devel
29ImageMagick-devel contains the static libraries and header files you'll need to develop ImageMagick applications. ImageMagick is an image manipulation program.
30
31If 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,
32however.
33
34%package perl
35Summary: ImageMagick Perl bindings
36Group: System Environment/Libraries
37BuildPrereq: perl >= 5.6.0
38Requires: %{name} = %{version}-%{release}, perl >= 5.6.0
39%define perl_vendorarch %(perl -MConfig -le 'print $Config{installvendorarch}')
40Prereq: %{perl_vendorarch}
41
42%description perl
43Perl bindings to ImageMagick.
44
45Install ImageMagick-perl if you want to use any Perl scripts that use ImageMagick.
46
47%package c++
48Summary: ImageMagick Magick++ library (C++ bindings)
49Group: System Environment/Libraries
50Requires: %{name} = %{version}-%{release}
51
52%description c++
53This package contains the Magick++ library, a C++ binding to the ImageMagick graphics manipulation library.
54
55Install ImageMagick-c++ if you want to use any applications that use Magick++.
56
57%package c++-devel
58Summary: C++ bindings for the ImageMagick library
59Group: Development/Libraries
60Requires: %{name} = %{version}, %{name}-c++ = %{version}
61Requires: %{name}-devel = %{version}, bzip2-devel, freetype-devel
62Requires: libjpeg-devel, libpng-devel, libtiff-devel, zlib-devel, libxml2-devel
63
64%description c++-devel
65ImageMagick-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.
66
67If 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.
68
69%prep
70%setup -q -n %{name}-%{version}
71%define _docdir %{_usr}/share/doc
72
73%build
74%define optflags -O2 -g -pipe -Wall
75%configure --enable-libtool-verbose --with-included-ltdl --enable-shared \
76           --with-modules \
77           --with-frozenpaths \
78           --with-perl \
79           --with-x \
80           --with-threads \
81           --with-magick_plus_plus \
82           --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'"
83
84make
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89make install DESTDIR=$RPM_BUILD_ROOT
90
91# perlmagick: fix perl path of demo files
92%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
93
94find $RPM_BUILD_ROOT -name "*.bs" |xargs rm -f
95find $RPM_BUILD_ROOT -name ".packlist" |xargs rm -f
96find $RPM_BUILD_ROOT -name "perllocal.pod" |xargs rm -f
97
98# perlmagick: build files list
99echo "%defattr(-,root,root)" > perl-pkg-files
100find $RPM_BUILD_ROOT/%{_libdir}/perl* -type f -print | \
101        sed "s@^$RPM_BUILD_ROOT@@g" > perl-pkg-files
102find $RPM_BUILD_ROOT%{perl_vendorarch} -type d -print | \
103        sed "s@^$RPM_BUILD_ROOT@%dir @g" | \
104        grep -v '^%dir %{perl_vendorarch}$' | \
105        grep -v '/auto$' >> perl-pkg-files
106if [ -z perl-pkg-files ] ; then
107  echo "ERROR: EMPTY FILE LIST"
108  exit -1
109fi
110
111rm -rf $RPM_BUILD_ROOT%{_libdir}/ImageMagick
112# Keep config
113rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/[a-b,d-z,A-Z]*
114rm -rf $RPM_BUILD_ROOT%{_libdir}/libltdl.*
115rm -f  $RPM_BUILD_ROOT%{_libdir}/ImageMagick-*/modules*/*/*.a
116rm -f  $RPM_BUILD_ROOT%{_libdir}/*.la
117
118# link docs
119ln -sf %{_docdir}/%{name}-%{version} $RPM_BUILD_ROOT%{_libdir}/ImageMagick-%{version}/doc
120
121%clean
122rm -rf $RPM_BUILD_ROOT
123
124%post -p /sbin/ldconfig
125
126%post c++ -p /sbin/ldconfig
127
128%postun -p /sbin/ldconfig
129
130%postun c++ -p /sbin/ldconfig
131
132%files
133%defattr(-,root,root)
134%doc index.html www/ images/
135%doc QuickStart.txt ChangeLog Platforms.txt
136%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt
137%attr(755,root,root) %{_libdir}/libMagickCore.so.*
138%attr(755,root,root) %{_libdir}/libMagickWand.so.*
139%{_bindir}/[a-z]*
140%{_libdir}/ImageMagick*
141%{_datadir}/ImageMagick*
142%{_mandir}/man[145]/[a-z]*
143%{_mandir}/man1/ImageMagick.*
144
145%files devel
146%defattr(-,root,root)
147%{_bindir}/Magick-config
148%{_bindir}/MagickCore-config
149%{_bindir}/MagickWand-config
150%{_bindir}/Wand-config
151%{_libdir}/libMagickCore.*
152%{_libdir}/libMagickWand.*
153%{_libdir}/pkgconfig/ImageMagick.pc
154%{_libdir}/pkgconfig/MagickCore.pc
155%{_libdir}/pkgconfig/MagickWand.pc
156%{_libdir}/pkgconfig/Wand.pc
157%{_includedir}/ImageMagick
158%{_mandir}/man1/Magick-config.*
159%{_mandir}/man1/MagickCore-config.*
160%{_mandir}/man1/MagickWand-config.*
161%{_mandir}/man1/Wand-config.*
162
163%files c++
164%defattr(-,root,root)
165%{_libdir}/libMagick++.so.*
166
167%files c++-devel
168%defattr(-,root,root)
169%{_bindir}/Magick++-config
170%{_includedir}/ImageMagick
171%{_libdir}/libMagick++.*
172%{_libdir}/pkgconfig/ImageMagick++.pc
173%{_libdir}/pkgconfig/Magick++.pc
174%{_mandir}/man1/Magick++-config.*
175
176%files perl -f perl-pkg-files
177%defattr(-,root,root)
178%{_mandir}/man3/*
179%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
180
181%changelog
182* Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0
183*  Port of Redhat's RPM script to support ImageMagick.
Note: See TracBrowser for help on using the browser.