1 |
%define lib_major 0 |
2 |
|
3 |
# optional compile flags |
4 |
%define enable_python 1 |
5 |
%{?_without_python: %global enable_python 0} |
6 |
|
7 |
%define enable_lzw 0 |
8 |
%{?_with_lzw: %global enable_lzw 1} |
9 |
|
10 |
%define req_gtk_version 2.12.1 |
11 |
|
12 |
%define api_version 2.0 |
13 |
%define abi_version 2.8 |
14 |
%define libname %mklibname %{name} %{api_version}_%{lib_major} |
15 |
%define devlibname %mklibname -d %{name}%{api_version} |
16 |
|
17 |
Summary: The GNU Image Manipulation Program |
18 |
Name: gimp |
19 |
Epoch: 1 |
20 |
Version: 2.8.10 |
21 |
Release: %mkrel 1 |
22 |
License: GPLv2+ |
23 |
Group: Graphics/Editors and Converters |
24 |
URL: http://www.gimp.org/ |
25 |
|
26 |
Source0: ftp://ftp.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2 |
27 |
Source1: ftp://ftp.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2.md5 |
28 |
Source13: gimp-scripting-sample.pl |
29 |
Patch0: gimp-2.8.0-link.patch |
30 |
#gw fix name in desktop file and disable startup notification |
31 |
Patch2: gimp-2.5.1-desktopentry.patch |
32 |
Patch3: gimp-2.8-CVE-2013-1913.patch |
33 |
Patch4: gimp-2.8-CVE-2013-1978.patch |
34 |
BuildRequires: pkgconfig(atk) >= 2.2.0 |
35 |
BuildRequires: pkgconfig(babl) >= 0.1.10 |
36 |
BuildRequires: pkgconfig(cairo) >= 1.10.2 |
37 |
BuildRequires: pkgconfig(cairo-pdf) >= 1.10.2 |
38 |
BuildRequires: pkgconfig(dbus-glib-1) >= 0.70 |
39 |
BuildRequires: pkgconfig(fontconfig) >= 2.2.0 |
40 |
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.24.1 |
41 |
BuildRequires: pkgconfig(gegl-0.2) >= 0.2.0 |
42 |
BuildRequires: pkgconfig(gio-2.0) >= 2.30.2 |
43 |
BuildRequires: pkgconfig(glib-2.0) >= 2.30.2 |
44 |
BuildRequires: pkgconfig(gmodule-no-export-2.0) |
45 |
BuildRequires: pkgconfig(gtk+-2.0) >= 2.24.10 |
46 |
BuildRequires: pkgconfig(gudev-1.0) >= 167 |
47 |
BuildRequires: pkgconfig(iso-codes) |
48 |
BuildRequires: pkgconfig(lcms) >= 1.16 |
49 |
BuildRequires: pkgconfig(libcurl) >= 7.15.1 |
50 |
BuildRequires: pkgconfig(libexif) >= 0.6.15 |
51 |
BuildRequires: pkgconfig(libpng) >= 1.2.37 |
52 |
BuildRequires: pkgconfig(librsvg-2.0) >= 2.36.0 |
53 |
BuildRequires: pkgconfig(pangocairo) >= 1.29.4 |
54 |
BuildRequires: pkgconfig(pangoft2) |
55 |
BuildRequires: pkgconfig(poppler-glib) >= 0.12.4 |
56 |
BuildRequires: pkgconfig(webkit-1.0) >= 1.6.1 |
57 |
BuildRequires: pkgconfig(xcursor) |
58 |
BuildRequires: pkgconfig(xfixes) |
59 |
|
60 |
BuildRequires: aalib-devel |
61 |
BuildRequires: gtk-doc >= 1.11-3 |
62 |
BuildRequires: libalsa-devel |
63 |
BuildRequires: libmng-devel |
64 |
BuildRequires: libtiff-devel |
65 |
BuildRequires: jasper-devel |
66 |
BuildRequires: perl |
67 |
BuildRequires: libxmu-devel |
68 |
BuildRequires: libxpm-devel |
69 |
BuildRequires: zlib-devel |
70 |
BuildRequires: bzip2-devel |
71 |
BuildRequires: libgs-devel |
72 |
BuildRequires: intltool |
73 |
# mail plugin |
74 |
BuildRequires: sendmail-command |
75 |
# python plugin |
76 |
%if %enable_python |
77 |
BuildRequires: pkgconfig(pygtk-2.0) >= 2.10.4 |
78 |
%endif |
79 |
BuildRequires: automake |
80 |
BuildRequires: libwmf-devel >= 0.2.8 |
81 |
BuildRequires: libxext-devel |
82 |
BuildRequires: desktop-file-utils |
83 |
Provides: gimp1_3 gimp2_0 gimp2_2 gimp2.6 |
84 |
Obsoletes: gimp1_3 gimp2_0 gimp2_2 gimp2.6 |
85 |
# workaround libgimp not bumping its major on API/ABI changes: |
86 |
Requires: %{libname} = %epoch:%{version} |
87 |
Conflicts: perl-Gimp < 2.2 |
88 |
Conflicts: gutenprint-gimp2 < 5.0.1 |
89 |
Suggests: gimp-help |
90 |
Obsoletes: gimp-help-2-common < 2.6 |
91 |
|
92 |
%description |
93 |
The GIMP is an image manipulation program suitable for photo retouching, |
94 |
image composition and image authoring. Many people find it extremely useful |
95 |
in creating logos and other graphics for web pages. The GIMP has many of the |
96 |
tools and filters you would expect to find in similar commercial offerings, |
97 |
and some interesting extras as well. |
98 |
|
99 |
The GIMP provides a large image manipulation toolbox, including channel |
100 |
operations and layers, effects, sub-pixel imaging and anti-aliasing, |
101 |
and conversions, all with multi-level undo. |
102 |
|
103 |
This version of The GIMP includes a scripting facility, but many of the |
104 |
included scripts rely on fonts that we cannot distribute. The GIMP ftp |
105 |
site has a package of fonts that you can install by yourself, which |
106 |
includes all the fonts needed to run the included scripts. Some of the |
107 |
fonts have unusual licensing requirements; all the licenses are documented |
108 |
in the package. Get them in ftp://ftp.gimp.org/pub/gimp/fonts/ if you are so |
109 |
inclined. Alternatively, choose fonts which exist on your system before |
110 |
running the scripts. |
111 |
|
112 |
Build Options: |
113 |
--without python Disable pygimp (default enabled) |
114 |
--with lzw Enable LZW compression in GIF (default disabled) |
115 |
|
116 |
%package -n %{devlibname} |
117 |
Summary: GIMP plugin and extension development kit |
118 |
Group: Development/GNOME and GTK+ |
119 |
Requires: libgtk+2.0-devel >= %{req_gtk_version} |
120 |
Epoch: 1 |
121 |
License: LGPLv2+ |
122 |
Requires: %{libname} = %epoch:%{version} |
123 |
Provides: gimp-devel = %{version}-%{release} |
124 |
Provides: gimp2.6-devel = %{version}-%{release} |
125 |
Provides: libgimp-devel = %{version}-%{release} |
126 |
|
127 |
%description -n %{devlibname} |
128 |
Static libraries and header files for writing GIMP plugins and extensions. |
129 |
|
130 |
%package -n %libname |
131 |
Summary: GIMP libraries |
132 |
Group: System/Libraries |
133 |
Epoch: 1 |
134 |
License: LGPLv2+ |
135 |
Provides: libgimp%{api_version} = %{version}-%{release} |
136 |
Obsoletes: %mklibname gimp 2.6_2.0_0 |
137 |
|
138 |
%description -n %libname |
139 |
This is the library that provides core GIMP functionality. |
140 |
It enable other programs to use GIMP's features but is mainly intended |
141 |
to be used by the GIMP and its "external" plugins. |
142 |
|
143 |
%package python |
144 |
Summary: GIMP python extension |
145 |
Group: Development/Python |
146 |
Epoch: 1 |
147 |
Requires: pygtk2.0 |
148 |
Obsoletes: gimp1_3-python, gimp2_0-python, gimp2_2-python |
149 |
|
150 |
%description python |
151 |
This package contains the python modules for GIMP, which act as a |
152 |
wrapper to libgimp allowing the writing of plug-ins for Gimp. |
153 |
This is similar to script-fu, except that you can use the full set |
154 |
of Python extension modules from the plug-in, and you write plug-in |
155 |
in python instead of in scheme. |
156 |
|
157 |
%prep |
158 |
%setup -q -n gimp-%version |
159 |
%patch0 -p0 -b .link |
160 |
%patch2 -p1 -b .desktopentry |
161 |
%patch3 -p1 -b .CVE-2013-1913 |
162 |
%patch4 -p1 -b .CVE-2013-1978 |
163 |
|
164 |
%build |
165 |
%configure2_5x --enable-default-binary=yes --disable-static \ |
166 |
--enable-mp=yes \ |
167 |
%if %enable_python |
168 |
--enable-python=yes \ |
169 |
%else |
170 |
--enable-python=no \ |
171 |
%endif |
172 |
%if %enable_lzw |
173 |
--with-gif-compression=lzw \ |
174 |
%else |
175 |
--with-gif-compression=rle \ |
176 |
%endif |
177 |
--enable-gtk-doc=yes |
178 |
|
179 |
%make |
180 |
|
181 |
%install |
182 |
%makeinstall_std |
183 |
|
184 |
#clean unpackaged files |
185 |
find %buildroot -name '*.la'|xargs rm |
186 |
|
187 |
# workaround broken help system |
188 |
HELP_DIR=%{buildroot}%_datadir/gimp/%api_version/help/C |
189 |
[[ -d $HELP_DIR ]] || mkdir -p $HELP_DIR |
190 |
HELP_IDX=$HELP_DIR/introduction.html |
191 |
echo -e '<HTML><HEAD><TITLE>GIMP Base Library</HEAD>\n<BODY><UL>' > $HELP_IDX |
192 |
|
193 |
/bin/ls %{buildroot}%_datadir/gtk-doc/html/*/index.html | sed -e "s@%{buildroot}@@g" >> $HELP_IDX |
194 |
perl -pi -e 's!(.*/html/)([^/]*)(/index.html)!<LI><A HREF="\1\2\3">\2</A>!g' $HELP_IDX |
195 |
|
196 |
echo '</UL></BODY></HTML>' >> $HELP_IDX |
197 |
|
198 |
%find_lang gimp20 --all-name |
199 |
|
200 |
%if %enable_python |
201 |
chmod 755 %buildroot%_libdir/gimp/%{api_version}/plug-ins/*.py |
202 |
mkdir -p %{buildroot}%{_libdir}/python%{pyver}/site-packages |
203 |
echo %_libdir/gimp/%{api_version}/python > %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth |
204 |
echo %_libdir/gimp/%{api_version}/plug-ins >> %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth |
205 |
%endif |
206 |
|
207 |
desktop-file-install --vendor="" \ |
208 |
--add-category="X-MandrivaLinux-CrossDesktop" \ |
209 |
--dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* |
210 |
|
211 |
%files -f gimp20.lang |
212 |
%{_bindir}/gimp |
213 |
%{_bindir}/gimp-%abi_version |
214 |
%{_bindir}/gimp-console |
215 |
%{_bindir}/gimp-console-%abi_version |
216 |
%{_datadir}/applications/* |
217 |
%{_datadir}/appdata/gimp.appdata.xml |
218 |
%{_datadir}/gimp |
219 |
%dir %{_libdir}/gimp |
220 |
%dir %{_libdir}/gimp/%{api_version} |
221 |
%dir %{_libdir}/gimp/%{api_version}/environ |
222 |
%{_libdir}/gimp/%{api_version}/interpreters |
223 |
%{_libdir}/gimp/%{api_version}/environ/default.env |
224 |
%{_libdir}/gimp/%{api_version}/modules |
225 |
%{_libdir}/gimp/%{api_version}/plug-ins |
226 |
%exclude %{_libdir}/gimp/%{api_version}/plug-ins/*.py |
227 |
%{_mandir}/man1/gimp* |
228 |
%{_mandir}/man5/gimp* |
229 |
%_datadir/icons/hicolor/*/apps/gimp.png |
230 |
#%_datadir/icons/hicolor/scalable/apps/gimp.svg |
231 |
%config(noreplace) %{_sysconfdir}/gimp |
232 |
|
233 |
%doc AUTHORS NEWS README README.i18n docs/Wilber* |
234 |
|
235 |
%files -n %{devlibname} |
236 |
%doc ChangeLog |
237 |
%doc %{_datadir}/gtk-doc/html/* |
238 |
%{_bindir}/gimptool-* |
239 |
%{_datadir}/aclocal/*.m4 |
240 |
%{_includedir}/* |
241 |
%{_libdir}/lib*.so |
242 |
%{_libdir}/pkgconfig/* |
243 |
%{_mandir}/man1/gimptool-* |
244 |
|
245 |
%files -n %libname |
246 |
# explicitly list all libs to avoid old libtool issue |
247 |
%{_libdir}/libgimpconfig-%{api_version}.so.%{lib_major}* |
248 |
%{_libdir}/libgimp-%{api_version}.so.%{lib_major}* |
249 |
%{_libdir}/libgimpthumb-%{api_version}.so.%{lib_major}* |
250 |
%{_libdir}/libgimpbase-%{api_version}.so.%{lib_major}* |
251 |
%{_libdir}/libgimpcolor-%{api_version}.so.%{lib_major}* |
252 |
%{_libdir}/libgimpmath-%{api_version}.so.%{lib_major}* |
253 |
%{_libdir}/libgimpmodule-%{api_version}.so.%{lib_major}* |
254 |
%{_libdir}/libgimpui-%{api_version}.so.%{lib_major}* |
255 |
%{_libdir}/libgimpwidgets-%{api_version}.so.%{lib_major}* |
256 |
|
257 |
%if %enable_python |
258 |
%files python |
259 |
%{_libdir}/gimp/%{api_version}/environ/pygimp.env |
260 |
%{_libdir}/gimp/%{api_version}/python |
261 |
%{_libdir}/gimp/%{api_version}/plug-ins/*.py |
262 |
%{_libdir}/python%{pyver}/site-packages/*.pth |
263 |
%endif |