forked from kstep/graphicsmagick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphicsMagick.spec.in
298 lines (252 loc) · 10.2 KB
/
GraphicsMagick.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
297
298
# Allow for selectively disabling from commandline
%{!?quant:%define quant 8}
%{!?perlm:%define perlm 1}
%{!?cplus:%define cplus 1}
%define base_version @PACKAGE_VERSION@
# This is a one line description of the package.
Summary: An X application for displaying and manipulating images.
# This must be the name string from the rpm filename you plan to use.
Name: @PACKAGE_NAME@
# This must be the version string from the rpm filename you plan to use.
Version: @PACKAGE_VERSION@@PACKAGE_VERSION_ADDENDUM@
# This is the release number for a package of the same version (ie. if
# we make a package and find it to be slightly broken and need to make
# it again, the next package would be release number 2).
Release: 1
License: MIT
# This is a group that the package belongs to in a higher level
# package tool or the Red Hat installer.
Group: X11/Applications/Graphics
# This line points at the HOME location of the pristine source
# file. It is used if you ever want to get the source again or check
# for newer versions.
Source: ftp://ftp.GraphicsMagick.org/pub/%{name}/%{name}-%{version}.tar.bz2
Url: http://www.GraphicsMagick.org/
# This line allows you to specify a directory as the "root" for
# building and installing the new package. You can use this to help
# test your package before having it installed on your machine.
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
BuildRequires: libtiff-devel, zlib-devel
BuildRequires: freetype-devel >= 2.0.1
BuildRequires: libwebp-devel
Requires: bzip2, freetype, libjpeg, libpng, libwebp, zlib
%description
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much,
more.
GraphicsMagick is one of your choices if you need a program to manipulate
and display images. If you want to develop your own applications
which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.
%package devel
Summary: Static libraries and header files for GraphicsMagick app development.
Group: X11/Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
GraphicsMagick-devel contains the static libraries and header files you'll
need to develop GraphicsMagick applications. GraphicsMagick is an image
manipulation program.
If you want to create applications that will use GraphicsMagick code or
APIs, you need to install GraphicsMagick-devel as well as GraphicsMagick.
You do not need to install it if you just want to use GraphicsMagick,
however.
%if %{perlm}
%package perl
Summary: GraphicsMagick perl bindings
Group: System Environment/Libraries
BuildRequires: perl >= 5.6.0
Requires: %{name} = %{version}-%{release}, perl >= 5.6.0
%description perl
Perl bindings to GraphicsMagick.
Install GraphicsMagick-perl if you want to use any perl scripts that use
GraphicsMagick.
%endif
%if %{cplus}
%package c++
Summary: GraphicsMagick Magick++ library (C++ bindings)
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description c++
This package contains the Magick++ library, a C++ binding to the GraphicsMagick
graphics manipulation library.
Install GraphicsMagick-c++ if you want to use any applications that use
Magick++.
%package c++-devel
Summary: C++ bindings for the GraphicsMagick library
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
GraphicsMagick-devel contains the static libraries and header files you'll
need to develop GraphicsMagick applications using the Magick++ C++ bindings.
GraphicsMagick is an image manipulation program.
If you want to create applications that will use Magick++ code or APIs,
you'll need to install GraphicsMagick-c++-devel, GraphicsMagick-devel and
GraphicsMagick. You don't need to install it if you just want to use
GraphicsMagick, or if you want to develop/compile applications using the
GraphicsMagick C interface, however.
%endif
%prep
%setup -q
%build
# If you have trouble during the installation phase, then
# uncomment the two lines below. You may be using an older
# libtool that sometimes has trouble linking the files.
%if %{perlm}
# Maybe this will fix perl installation issues.
if [ -z "`perl -v | grep 5.8`" ]; then
export PERLOPTS="PREFIX=$RPM_BUILD_ROOT%{_prefix}"
fi
%endif
# This shouldn't be there yet.
rm -f PerlMagick/Makefile.PL
%configure --with-included-ltdl \
--enable-shared \
--with-modules --with-frozenpaths \
--docdir=%{_datadir}/doc/%{name}-%{base_version} \
%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=%{quant}
make
%if %{perlm}
make all-perl
%endif
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%if %{perlm}
make DESTDIR=$RPM_BUILD_ROOT install-exec-perl
# 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
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644, root, root, 755)
%doc %{_datadir}/%{name}-%{base_version}
%{_libdir}/lib%{name}.so.*
%{_libdir}/lib%{name}Wand.so.*
%dir %{_libdir}/%{name}-%{base_version}
%{_libdir}/%{name}-%{base_version}/config/*.mgk
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.so
%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.la
%attr(755, root, root) %{_bindir}/gm
%attr(644, root, man) %{_mandir}/man1/gm.1.gz
%attr(644, root, man) %{_mandir}/man4/*gz
%attr(644, root, man) %{_mandir}/man5/*gz
%docdir %{_datadir}/doc/%{name}-%{base_version}
%{_datadir}/doc/%{name}-%{base_version}/*
%files devel
%defattr(644, root, root, 755)
%dir %{_includedir}/%{name}/wand
%{_includedir}/%{name}/wand/*
%dir %{_includedir}/%{name}/magick
%{_includedir}/%{name}/magick/*
%{_libdir}/lib%{name}Wand.*a
%{_libdir}/lib%{name}Wand.so
%{_libdir}/lib%{name}.*a
%{_libdir}/lib%{name}.so
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}Wand.pc
#%{_bindir}/%{name}-config
%attr(755, root, root) %{_bindir}/%{name}-config
#%{_bindir}/%{name}Wand-config
%attr(755, root, root) %{_bindir}/%{name}Wand-config
%attr(644, root, man) %{_mandir}/man1/%{name}-config.1.gz
%attr(644, root, man) %{_mandir}/man1/%{name}Wand-config.1.gz
%if %{perlm}
%files perl
%defattr(644, root, root, 755)
%dir %{_libdir}/perl*/site_perl/*/*/Graphics
%{_libdir}/perl*/site_perl/*/*/Graphics/Magick.pm
%dir %{_libdir}/perl*/site_perl/*/*/auto/Graphics/Magick
%{_libdir}/perl*/site_perl/*/*/auto/Graphics/Magick/*
%attr(644, root, man) %{_mandir}/man3/*gz
%endif
%if %{cplus}
%files c++
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}++.so.*
%files c++-devel
%defattr(644, root, root, 755)
%{_includedir}/%{name}/Magick++.h
%dir %{_includedir}/%{name}/Magick++
%{_includedir}/%{name}/Magick++/*
%{_libdir}/lib%{name}++.*a
%{_libdir}/lib%{name}++.so
%{_libdir}/pkgconfig/%{name}++.pc
#%{_bindir}/%{name}++-config
%attr(755, root, root) %{_bindir}/%{name}++-config
%attr(644, root, man) %{_mandir}/man1/%{name}++-config.1.gz
%endif
%changelog
* Fri Apr 16 2010 Bob Friesenhahn <[email protected]> 1.3.13
- Avoided duplicate copies of documentation files. Put documentation
into a versioned directory as used by Red Hat and CentOS. Include
archive libraries in developer package.
* Tue Apr 13 2010 Bob Friesenhahn <[email protected]> 1.3.13
- Fixed PerlMagick build and install which was broken by Makefile
changes.
* Wed Jan 23 2009 Bob Friesenhahn <[email protected]> 1.3
- The module .la files need to be installed as part of the base
install or else the modules will fail to load.
* Wed Jan 21 2009 Bob Friesenhahn <[email protected]> 1.3
- --enable-lzw option is not longer needed
* Tue Nov 11 2008 Giacomo Tenaglia 1.3 <gtenagli at sf . net>.
- The *-config scripts were listed twice.
- Add definition for %{_datadir}/doc directory
* Wed Jun 02 2004 Bob Friesenhahn <[email protected]> 1.2
- Install *-config scripts with mode 755 rather than default 644.
* Sat Feb 21 2004 Bob Friesenhahn <[email protected]> 1.1-1
- Added some comments.
- Eliminated DATE variable.
- Support creating RPMs of snapshots packages.
- Don't remove /usr/include/magick or %{_datadir}/%{name} since they
are not created anymore.
- Fixed location of .mgk files.
* Mon Jul 28 2003 Bob Friesenhahn <[email protected]> 1.1-1
- Changed default quantum depth to 8 bits.
* Mon Jun 28 2003 Troy Edwards <[email protected]> 1.1-20030628
- Updated to CVS build, added the GraphicsMagickWand files to the spec.
- Only try to remove the unneeded perl package files if we are using
PerlMagick.
* Mon Jun 09 2003 Troy Edwards <[email protected]> 1.0.2-3
- removed libungif as a dependancy
- changed with/without-magick_plus_plus -> with/without-magick-plus-plus
- Use --with-perl-options instead of patching Makefile.in
- Only set a perl prefix if we aren't using perl >= 5.8.0
* Sat Jun 07 2003 Troy Edwards <[email protected]> 1.0.2-2
- patch to pass DESTDIR to install-exec-perl since some users
reported problems
* Sat Jun 07 2003 Troy Edwards <[email protected]> 1.0.2-1
- updated to 1.0.2
* Tue May 05 2003 Troy Edwards <[email protected]> 1.0-1
- updated to 1.0 Final
* Fri Apr 25 2003 Troy Edwards <[email protected]> 1.0-Beta1-1
- updated to 1.0-Beta1
* Mon Oct 22 2002 Troy Edwards <[email protected]>
- updated to 1.0.0pre