root / ImageMagick / branches / ImageMagick-6.3.6 / ImageMagick.spec.in

Revision 8621, 7.2 kB (checked in by cristy, 10 months 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: 10
5License: Apache-style
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, freetype2-devel, libjpeg-devel, libpng-devel
11BuildPrereq: libtiff-devel, zlib-devel, perl
12BuildRequires: freetype-devel >= 1.0.2
13BuildRequires: automake >= 1.7 autoconf >= 2.58 libtool >= 1.5
14BuildRequires: ghostscript-devel
15BuildRequires: libwmf-devel
16BuildRequires: XFree86-devel
17%define _unpackaged_files_terminate_build 0
18
19%description
20ImageMagick® 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.
21
22The 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.
23
24ImageMagick 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.
25
26%package devel
27Summary: Static libraries and header files for ImageMagick application development.
28Group: Development/Libraries
29Requires: %{name} = %{version}-%{release}
30Requires: XFree86-devel
31Requires: ghostscript-devel
32
33%description devel
34ImageMagick-devel contains the static libraries and header files you'll need to develop ImageMagick applications. ImageMagick is an image manipulation program.
35
36If 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,
37however.
38
39%package perl
40Summary: ImageMagick Perl bindings
41Group: System Environment/Libraries
42Requires: %{name} = %{version}-%{release}
43Requires: perl >= 5.6.0
44%define perl_vendorarch %(perl -MConfig -le 'print $Config{installvendorarch}')
45Prereq: %{perl_vendorarch}
46
47%description perl
48Perl bindings to ImageMagick.
49
50Install ImageMagick-perl if you want to use any Perl scripts that use ImageMagick.
51
52%package c++
53Summary: ImageMagick Magick++ library (C++ bindings)
54Group: System Environment/Libraries
55Requires: %{name} = %{version}-%{release}
56
57%description c++
58This package contains the Magick++ library, a C++ binding to the ImageMagick graphics manipulation library.
59
60Install ImageMagick-c++ if you want to use any applications that use Magick++.
61
62%package c++-devel
63Summary: C++ bindings for the ImageMagick library
64Group: Development/Libraries
65Requires: %{name}-c++ = %{version}
66Requires: %{name}-devel = %{version}
67
68%description c++-devel
69ImageMagick-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.
70
71If 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.
72
73%prep
74%setup -q -n %{name}-%{version}
75%define _docdir %{_usr}/share/doc
76
77%build
78%define optflags -O2 -g -pipe -Wall
79%configure --enable-shared \
80           --with-modules \
81           --with-perl \
82           --with-x \
83           --with-threads \
84           --with-magick_plus_plus \
85           --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LD='%__ld -L$PWD/magick/.libs'"
86
87make
88
89%install
90rm -rf $RPM_BUILD_ROOT
91
92make install DESTDIR=$RPM_BUILD_ROOT
93
94# perlmagick: fix perl path of demo files
95%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
96
97find $RPM_BUILD_ROOT -name "*.bs" |xargs rm -f
98find $RPM_BUILD_ROOT -name ".packlist" |xargs rm -f
99find $RPM_BUILD_ROOT -name "perllocal.pod" |xargs rm -f
100
101# perlmagick: build files list
102echo "%defattr(-,root,root)" > perl-pkg-files
103find $RPM_BUILD_ROOT/%{_libdir}/perl* -type f -print | \
104        sed "s@^$RPM_BUILD_ROOT@@g" > perl-pkg-files
105find $RPM_BUILD_ROOT%{perl_vendorarch} -type d -print | \
106        sed "s@^$RPM_BUILD_ROOT@%dir @g" | \
107        grep -v '^%dir %{perl_vendorarch}$' | \
108        grep -v '/auto$' >> perl-pkg-files
109if [ -z perl-pkg-files ] ; then
110  echo "ERROR: EMPTY FILE LIST"
111  exit -1
112fi
113
114rm -rf $RPM_BUILD_ROOT%{_libdir}/ImageMagick
115# Keep config
116rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/[a-b,d-z,A-Z]*
117rm -rf $RPM_BUILD_ROOT%{_libdir}/libltdl.*
118rm -f  $RPM_BUILD_ROOT%{_libdir}/ImageMagick-*/modules*/*/*.a
119rm -f  $RPM_BUILD_ROOT%{_libdir}/*.la
120
121# link docs
122ln -sf %{_docdir}/%{name}-%{version} $RPM_BUILD_ROOT%{_libdir}/ImageMagick-%{version}/doc
123
124%clean
125rm -rf $RPM_BUILD_ROOT
126
127%post -p /sbin/ldconfig
128
129%post c++ -p /sbin/ldconfig
130
131%postun -p /sbin/ldconfig
132
133%postun c++ -p /sbin/ldconfig
134
135%files
136%defattr(-,root,root)
137%doc index.html www/ images/
138%doc QuickStart.txt ChangeLog Platforms.txt
139%doc README.txt LICENSE NOTICE AUTHORS NEWS
140%attr(755,root,root) %{_libdir}/libMagick.so.*
141%attr(755,root,root) %{_libdir}/libWand.so.*
142%{_bindir}/[a-z]*
143%{_libdir}/ImageMagick*
144%{_datadir}/ImageMagick*
145%{_mandir}/man[145]/[a-z]*
146%{_mandir}/man1/ImageMagick.*
147
148%files devel
149%defattr(-,root,root)
150%{_bindir}/Magick-config
151%{_bindir}/Wand-config
152%{_libdir}/libMagick.a
153%{_libdir}/libMagick.so
154%{_libdir}/libWand.a
155%{_libdir}/libWand.so
156%{_libdir}/pkgconfig/ImageMagick.pc
157%{_libdir}/pkgconfig/Wand.pc
158%{_includedir}/magick
159%{_includedir}/wand
160%{_mandir}/man1/Magick-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}/Magick++
171%{_includedir}/Magick++.h
172%{_libdir}/libMagick++.a
173%{_libdir}/libMagick++.so
174%{_libdir}/pkgconfig/ImageMagick++.pc
175%{_mandir}/man1/Magick++-config.*
176
177%files perl -f perl-pkg-files
178%defattr(-,root,root)
179%{_mandir}/man3/*
180%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
181
182%changelog
183* Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0
184*  Port of Redhat's RPM script to support ImageMagick.
Note: See TracBrowser for help on using the browser.