summaryrefslogtreecommitdiff
path: root/packaging/GraphicsMagick.spec
blob: 72f702eaca88fe6b7c0c40965174259e0efbbbdb (plain)
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
Name: GraphicsMagick
Summary: An ImageMagick fork, offering faster image generation and better quality
Version: 1.3.26
Release: 7%{?dist}
Group: Multimedia/Libraries
Url: http://www.graphicsmagick.org/
License: MIT
Source0: %{name}-%{version}.tar.gz

BuildRequires: bzip2-devel
BuildRequires: freetype-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: libpng-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: libxml2-devel
BuildRequires: xz-devel
BuildRequires: zlib-devel

# upgrade path for introduction of -doc subpkg in 1.3.19-4
Obsoletes: GraphicsMagick < 1.3.19-4

%description
GraphicsMagick is a comprehensive image processing package which is initially
based on ImageMagick 5.5.2, but which has undergone significant re-work by
the GraphicsMagick Group to significantly improve the quality and performance
of the software.

%package devel
Summary: Libraries and header files for GraphicsMagick app development
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
GraphicsMagick-devel contains the 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.

%package doc
Summary: GraphicsMagick documentation
Group: Documentation
# upgrade path for introduction of -doc subpkg in 1.3.19-4
Obsoletes: GraphicsMagick < 1.3.19-4
%{!?el5:BuildArch: noarch}

%description doc
Documentation for GraphicsMagick.

%package tool
Summary: GraphicsMagick tools
Group: Development/Tools
Requires: %{name}%{?_isa} = %{version}-%{release}

%description tool
GraphicsMagick tools.

Install GraphicsMagick-perl if you want to use any perl scripts that use
GraphicsMagick.

%package c++
Summary: GraphicsMagick Magick++ library (C++ bindings)
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description c++
This package contains the GraphicsMagick++ library, a C++ binding to the 
GraphicsMagick graphics manipulation library.

Install GraphicsMagick-c++ if you want to use any applications that use 
GraphicsMagick++.

%package c++-devel
Summary: C++ bindings for the GraphicsMagick library
Group: Development/Libraries
Requires: %{name}-c++%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}

%description c++-devel
GraphicsMagick-devel contains the 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, ImageMagick-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.

%prep
%setup -q

%if ! 0%{?__isa_bits:1}
%ifarch x86_64
%global __isa_bits 64
%else
%global __isa_bits 32
%endif
%endif

# trim changelog included in binary rpms
%global _changelog_trimtime %(date +%s -d "1 year ago")

%global __provides_exclude_from ^%{_libdir}/GraphicsMagick-%{version}/.*\\.(la|so)$


for f in ChangeLog.{2006,2008,2009,2012} NEWS.txt ; do
    iconv -f iso-8859-2 -t utf8 < $f > $f.utf8
    touch -r $f $f.utf8 ; mv -f $f.utf8 $f
done

# Avoid lib64 rpaths (FIXME: recheck this on newer releases)
%if "%{_libdir}" != "/usr/lib"
sed -i.rpath -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
%endif


%build
%configure --enable-shared --disable-static \
           --disable-broken-coders \
           --enable-openmp \
           --docdir=%{_datadir}/%{name} \
           %{?_with_quantum_depth} \
           %{?_enable_quantum_library_names} \
           --with-modules \
           --with-threads \
           --with-magick-plus-plus \
           --without-perl \
           --without-bzlib \
           --without-dps \
           --without-fpx \
           --without-gslib \
           --without-jbig \
           --without-jp2 \
           --with-lcms2 \
           --without-lzma \
           --without-tiff \
           --without-trio \
           --without-ttf \
           --without-webp \
           --without-wmf \
           --without-x \
           --without-xml \
           --with-zlib \

make %{?_smp_mflags}

%install
#rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

find %{buildroot} -name "*.bs" |xargs rm -fv
find %{buildroot} -name ".packlist" |xargs rm -fv
find %{buildroot} -name "perllocal.pod" |xargs rm -fv

rm -rf %{buildroot}%{_datadir}/%{name}
# Keep config
rm -rf %{buildroot}%{_datadir}/%{name}-%{version}/[a-b,d-z,A-Z]*
rm -vf  %{buildroot}%{_libdir}/lib*.la

# fix multilib issues
%ifarch %ix86 x86_64
cp %{buildroot}%{_includedir}/%{name}/magick/magick_types.h \
   %{buildroot}%{_includedir}/%{name}/magick/magick_types-%{__isa_bits}.h
%endif

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%manifest %{name}.manifest
%license Copyright.txt
%{_libdir}/libGraphicsMagick.so.*
%{_libdir}/libGraphicsMagickWand.so.*
%{_libdir}/%{name}-%{version}/config/*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/bmp.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/gif.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/jpeg.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/meta.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/png.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/rgb.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/wbmp.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/yuv.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/uyvy.*
%{_libdir}/%{name}-%{version}/modules-Q8/filters/*

%files devel
%{_bindir}/GraphicsMagick-config
%{_bindir}/GraphicsMagickWand-config
%{_libdir}/libGraphicsMagick.so
%{_libdir}/libGraphicsMagickWand.so
%{_libdir}/%{name}-%{version}/config/*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/bmp.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/gif.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/jpeg.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/meta.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/png.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/rgb.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/wbmp.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/yuv.*
%{_libdir}/%{name}-%{version}/modules-Q8/coders/uyvy.*
%{_libdir}/%{name}-%{version}/modules-Q8/filters/*
%{_libdir}/pkgconfig/GraphicsMagick.pc
%{_libdir}/pkgconfig/GraphicsMagickWand.pc
%dir %{_includedir}/GraphicsMagick/
%{_includedir}/GraphicsMagick/magick/
%{_includedir}/GraphicsMagick/wand/
%{_mandir}/man1/GraphicsMagick-config.*
%{_mandir}/man1/GraphicsMagickWand-config.*
%{_libdir}/%{name}-%{version}/
%{_datadir}/%{name}-%{version}/

%files doc
%{_mandir}/man[145]/[a-z]*

%post c++ -p /sbin/ldconfig
%postun c++ -p /sbin/ldconfig

%files c++
%{_libdir}/libGraphicsMagick++.so.12*

%files c++-devel
%{_bindir}/%{name}++-config
%{_includedir}/%{name}/Magick++/
%{_includedir}/%{name}/Magick++.h
%{_libdir}/lib%{name}++.so
%{_libdir}/pkgconfig/%{name}++.pc
%{_mandir}/man1/%{name}++-config.*

%files tool
%{_bindir}/[a-z]*