1# Allow for selectively disabling from commandline
2%{!?quant:%define quant 8}
3%{!?perlm:%define perlm 1}
4%{!?cplus:%define cplus 1}
5
6%define base_version @PACKAGE_VERSION@
7
8# This is a one line description of the package.
9Summary: An X application for displaying and manipulating images.
10# This must be the name string from the rpm filename you plan to use.
11Name: @PACKAGE_NAME@
12# This must be the version string from the rpm filename you plan to use.
13Version: @PACKAGE_VERSION@@PACKAGE_VERSION_ADDENDUM@
14# This is the release number for a package of the same version (ie. if
15# we make a package and find it to be slightly broken and need to make
16# it again, the next package would be release number 2).
17Release: 1
18License: MIT
19# This is a group that the package belongs to in a higher level
20# package tool or the Red Hat installer.
21Group: X11/Applications/Graphics
22# This line points at the HOME location of the pristine source
23# file. It is used if you ever want to get the source again or check
24# for newer versions.
25Source: ftp://ftp.GraphicsMagick.org/pub/%{name}/%{name}-%{version}.tar.bz2
26Url: http://www.GraphicsMagick.org/
27# This line allows you to specify a directory as the "root" for
28# building and installing the new package. You can use this to help
29# test your package before having it installed on your machine.
30Buildroot: %{_tmppath}/%{name}-%{version}-root
31BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
32BuildRequires: libtiff-devel, zlib-devel
33BuildRequires: freetype-devel >= 2.0.1
34BuildRequires: libwebp-devel
35Requires: bzip2, freetype, libjpeg, libpng, libwebp, zlib
36
37%description
38GraphicsMagick(TM) provides a powerful image manipulation and
39translation utility. It is capable of displaying still images and
40animations using the X Window system, provides a simple interface for
41interactively editing images, and is capable of importing selected
42windows or the entire desktop. GraphicsMagick can read and write over
4388 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
44Photo CD. It can resize, rotate, sharpen, color reduce, or add special
45effects to the image and save the result to any supported format.
46GraphicsMagick may be used to create animated or transparent .gifs,
47create composite images, create thumbnail images, and much, much,
48more.
49
50GraphicsMagick is one of your choices if you need a program to manipulate
51and display images. If you want to develop your own applications
52which use GraphicsMagick code or APIs, you need to install
53GraphicsMagick-devel as well.
54
55%package devel
56Summary: Static libraries and header files for GraphicsMagick app development.
57Group: X11/Development/Libraries
58Requires: %{name} = %{version}-%{release}
59
60%description devel
61GraphicsMagick-devel contains the static libraries and header files you'll
62need to develop GraphicsMagick applications. GraphicsMagick is an image
63manipulation program.
64
65If you want to create applications that will use GraphicsMagick code or
66APIs, you need to install GraphicsMagick-devel as well as GraphicsMagick.
67You do not need to install it if you just want to use GraphicsMagick,
68however.
69
70%if %{perlm}
71%package perl
72Summary: GraphicsMagick perl bindings
73Group: System Environment/Libraries
74BuildRequires: perl >= 5.6.0
75Requires: %{name} = %{version}-%{release}, perl >= 5.6.0
76
77%description perl
78Perl bindings to GraphicsMagick.
79
80Install GraphicsMagick-perl if you want to use any perl scripts that use
81GraphicsMagick.
82%endif
83
84%if %{cplus}
85%package c++
86Summary: GraphicsMagick Magick++ library (C++ bindings)
87Group: System Environment/Libraries
88Requires: %{name} = %{version}-%{release}
89
90%description c++
91This package contains the Magick++ library, a C++ binding to the GraphicsMagick
92graphics manipulation library.
93
94Install GraphicsMagick-c++ if you want to use any applications that use
95Magick++.
96
97%package c++-devel
98Summary: C++ bindings for the GraphicsMagick library
99Group: Development/Libraries
100Requires: %{name} = %{version}, %{name}-c++ = %{version}
101Requires: %{name}-devel = %{version}, bzip2-devel, freetype-devel
102Requires: libjpeg-devel, libpng-devel, libtiff-devel, zlib-devel, libxml2-devel
103
104%description c++-devel
105GraphicsMagick-devel contains the static libraries and header files you'll
106need to develop GraphicsMagick applications using the Magick++ C++ bindings.
107GraphicsMagick is an image manipulation program.
108
109If you want to create applications that will use Magick++ code or APIs,
110you'll need to install GraphicsMagick-c++-devel, GraphicsMagick-devel and
111GraphicsMagick.  You don't need to install it if you just want to use
112GraphicsMagick, or if you want to develop/compile applications using the
113GraphicsMagick C interface, however.
114%endif
115
116%prep
117%setup -q
118
119%build
120# If you have trouble during the installation phase, then
121# uncomment the two lines below.  You may be using an older
122# libtool that sometimes has trouble linking the files.
123
124%if %{perlm}
125# Maybe this will fix perl installation issues.
126if [ -z "`perl -v | grep 5.8`" ]; then
127    export PERLOPTS="PREFIX=$RPM_BUILD_ROOT%{_prefix}"
128fi
129%endif
130
131# This shouldn't be there yet.
132rm -f PerlMagick/Makefile.PL
133
134%configure --with-included-ltdl \
135        --enable-shared \
136	--with-modules --with-frozenpaths \
137	--docdir=%{_datadir}/doc/%{name}-%{base_version} \
138%if %{perlm}
139	--with-perl \
140	--with-perl-options="$PERLOPTS" \
141%else
142	--without-perl \
143%endif
144%if %{cplus}
145	--with-magick-plus-plus \
146%else
147	--without-magick-plus-plus \
148%endif
149	--with-quantum-depth=%{quant}
150make
151%if %{perlm}
152make all-perl
153%endif
154
155%install
156rm -rf $RPM_BUILD_ROOT
157make DESTDIR=$RPM_BUILD_ROOT install
158
159%if %{perlm}
160make DESTDIR=$RPM_BUILD_ROOT install-exec-perl
161# Remove unpackaged files.
162rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name perllocal.pod -type f`
163rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name .packlist -type f`
164%endif
165
166%post -p /sbin/ldconfig
167
168%postun -p /sbin/ldconfig
169
170%clean
171rm -rf $RPM_BUILD_ROOT
172
173%files
174%defattr(644, root, root, 755)
175%doc %{_datadir}/%{name}-%{base_version}
176%{_libdir}/lib%{name}.so.*
177%{_libdir}/lib%{name}Wand.so.*
178%dir %{_libdir}/%{name}-%{base_version}
179%{_libdir}/%{name}-%{base_version}/config/*.mgk
180%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
181%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.so
182%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.la
183%attr(755, root, root) %{_bindir}/gm
184%attr(644, root, man) %{_mandir}/man1/gm.1.gz
185%attr(644, root, man) %{_mandir}/man4/*gz
186%attr(644, root, man) %{_mandir}/man5/*gz
187%docdir %{_datadir}/doc/%{name}-%{base_version}
188%{_datadir}/doc/%{name}-%{base_version}/*
189
190%files devel
191%defattr(644, root, root, 755)
192%dir %{_includedir}/%{name}/wand
193%{_includedir}/%{name}/wand/*
194%dir %{_includedir}/%{name}/magick
195%{_includedir}/%{name}/magick/*
196%{_libdir}/lib%{name}Wand.*a
197%{_libdir}/lib%{name}Wand.so
198%{_libdir}/lib%{name}.*a
199%{_libdir}/lib%{name}.so
200%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
201%{_libdir}/pkgconfig/%{name}.pc
202%{_libdir}/pkgconfig/%{name}Wand.pc
203#%{_bindir}/%{name}-config
204%attr(755, root, root) %{_bindir}/%{name}-config
205#%{_bindir}/%{name}Wand-config
206%attr(755, root, root) %{_bindir}/%{name}Wand-config
207%attr(644, root, man) %{_mandir}/man1/%{name}-config.1.gz
208%attr(644, root, man) %{_mandir}/man1/%{name}Wand-config.1.gz
209
210%if %{perlm}
211%files perl
212%defattr(644, root, root, 755)
213%dir %{_libdir}/perl*/site_perl/*/*/Graphics
214%{_libdir}/perl*/site_perl/*/*/Graphics/Magick.pm
215%dir %{_libdir}/perl*/site_perl/*/*/auto/Graphics/Magick
216%{_libdir}/perl*/site_perl/*/*/auto/Graphics/Magick/*
217%attr(644, root, man) %{_mandir}/man3/*gz
218%endif
219
220%if %{cplus}
221%files c++
222%defattr(644, root, root, 755)
223%{_libdir}/lib%{name}++.so.*
224
225%files c++-devel
226%defattr(644, root, root, 755)
227%{_includedir}/%{name}/Magick++.h
228%dir %{_includedir}/%{name}/Magick++
229%{_includedir}/%{name}/Magick++/*
230%{_libdir}/lib%{name}++.*a
231%{_libdir}/lib%{name}++.so
232%{_libdir}/pkgconfig/%{name}++.pc
233#%{_bindir}/%{name}++-config
234%attr(755, root, root) %{_bindir}/%{name}++-config
235%attr(644, root, man) %{_mandir}/man1/%{name}++-config.1.gz
236%endif
237
238%changelog
239* Fri Apr 16 2010 Bob Friesenhahn <bfriesen@graphicsmagick.org> 1.3.13
240- Avoided duplicate copies of documentation files.  Put documentation
241  into a versioned directory as used by Red Hat and CentOS.  Include
242  archive libraries in developer package.
243
244* Tue Apr 13 2010 Bob Friesenhahn <bfriesen@graphicsmagick.org> 1.3.13
245- Fixed PerlMagick build and install which was broken by Makefile
246  changes.
247
248* Wed Jan 23 2009 Bob Friesenhahn <bfriesen@graphicsmagick.org> 1.3
249- The module .la files need to be installed as part of the base
250  install or else the modules will fail to load.
251
252* Wed Jan 21 2009 Bob Friesenhahn <bfriesen@graphicsmagick.org> 1.3
253-  --enable-lzw option is not longer needed
254
255* Tue Nov 11 2008 Giacomo Tenaglia 1.3 <gtenagli at sf . net>.
256- The *-config scripts were listed twice.
257- Add definition for %{_datadir}/doc directory
258
259* Wed Jun 02 2004 Bob Friesenhahn <bfriesen@graphicsmagick.org> 1.2
260- Install *-config scripts with mode 755 rather than default 644.
261
262* Sat Feb 21 2004 Bob Friesenhahn <bfriesen@graphicsmagick.org> 1.1-1
263- Added some comments.
264- Eliminated DATE variable.
265- Support creating RPMs of snapshots packages.
266- Don't remove /usr/include/magick or %{_datadir}/%{name} since they
267  are not created anymore.
268- Fixed location of .mgk files.
269
270* Mon Jul 28 2003 Bob Friesenhahn <bfriesen@graphicsmagick.org> 1.1-1
271- Changed default quantum depth to 8 bits.
272
273* Mon Jun 28 2003 Troy Edwards <vallimar@sexorcisto.net> 1.1-20030628
274- Updated to CVS build, added the GraphicsMagickWand files to the spec.
275- Only try to remove the unneeded perl package files if we are using
276  PerlMagick.
277
278* Mon Jun 09 2003 Troy Edwards <vallimar@sexorcisto.net> 1.0.2-3
279- removed libungif as a dependancy
280- changed with/without-magick_plus_plus -> with/without-magick-plus-plus
281- Use --with-perl-options instead of patching Makefile.in
282- Only set a perl prefix if we aren't using perl >= 5.8.0
283
284* Sat Jun 07 2003 Troy Edwards <vallimar@sexorcisto.net> 1.0.2-2
285- patch to pass DESTDIR to install-exec-perl since some users
286  reported problems
287
288* Sat Jun 07 2003 Troy Edwards <vallimar@sexorcisto.net> 1.0.2-1
289- updated to 1.0.2
290
291* Tue May 05 2003 Troy Edwards <vallimar@sexorcisto.net> 1.0-1
292- updated to 1.0 Final
293
294* Fri Apr 25 2003 Troy Edwards <vallimar@sexorcisto.net> 1.0-Beta1-1
295- updated to 1.0-Beta1
296
297* Mon Oct 22 2002 Troy Edwards <vallimar@sexorcisto.net>
298- updated to 1.0.0pre
299