1 |
ahmad |
24820 |
%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 |
fwang |
234585 |
%define abi_version 2.8 |
14 |
ahmad |
24820 |
%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 |
ovitters |
212214 |
Name: gimp |
19 |
ahmad |
24820 |
Epoch: 1 |
20 |
fwang |
668941 |
Version: 2.8.14 |
21 |
shlomif |
1038119 |
%define subrel 1 |
22 |
umeabot |
743885 |
Release: %mkrel 4 |
23 |
ahmad |
24820 |
License: GPLv2+ |
24 |
boklm |
344952 |
Group: Graphics/Editors and Converters |
25 |
ahmad |
24820 |
URL: http://www.gimp.org/ |
26 |
|
|
|
27 |
shlomif |
618181 |
Source0: http://download.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2 |
28 |
|
|
Source1: http://download.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2.md5 |
29 |
ahmad |
24820 |
Source13: gimp-scripting-sample.pl |
30 |
fwang |
234594 |
Patch0: gimp-2.8.0-link.patch |
31 |
ahmad |
24820 |
#gw fix name in desktop file and disable startup notification |
32 |
ahmad |
78491 |
Patch2: gimp-2.5.1-desktopentry.patch |
33 |
shlomif |
1038119 |
Patch3: gimp-CVE-2016-4994-commit.patch |
34 |
fwang |
234588 |
BuildRequires: pkgconfig(atk) >= 2.2.0 |
35 |
fwang |
234585 |
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 |
spuhler |
659072 |
BuildRequires: pkgconfig(lcms2) >= 2.2 |
49 |
fwang |
234585 |
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 |
fwang |
234586 |
BuildRequires: pkgconfig(poppler-glib) >= 0.12.4 |
56 |
fwang |
234585 |
BuildRequires: pkgconfig(webkit-1.0) >= 1.6.1 |
57 |
|
|
BuildRequires: pkgconfig(xcursor) |
58 |
|
|
BuildRequires: pkgconfig(xfixes) |
59 |
gil |
184114 |
|
60 |
ahmad |
24820 |
BuildRequires: aalib-devel |
61 |
ahmad |
24845 |
BuildRequires: gtk-doc >= 1.11-3 |
62 |
ovitters |
642476 |
BuildRequires: pkgconfig(alsa) |
63 |
|
|
BuildRequires: pkgconfig(libmng) |
64 |
|
|
BuildRequires: pkgconfig(libtiff-4) |
65 |
|
|
BuildRequires: pkgconfig(jasper) |
66 |
ahmad |
24820 |
BuildRequires: perl |
67 |
ovitters |
642927 |
BuildRequires: pkgconfig(xmu) |
68 |
ovitters |
642476 |
BuildRequires: pkgconfig(xpm) |
69 |
|
|
BuildRequires: pkgconfig(zlib) |
70 |
fwang |
234593 |
BuildRequires: bzip2-devel |
71 |
fwang |
234596 |
BuildRequires: libgs-devel |
72 |
ahmad |
24820 |
BuildRequires: intltool |
73 |
|
|
# mail plugin |
74 |
|
|
BuildRequires: sendmail-command |
75 |
|
|
# python plugin |
76 |
|
|
%if %enable_python |
77 |
fwang |
234585 |
BuildRequires: pkgconfig(pygtk-2.0) >= 2.10.4 |
78 |
ahmad |
24820 |
%endif |
79 |
|
|
BuildRequires: automake |
80 |
|
|
BuildRequires: libwmf-devel >= 0.2.8 |
81 |
ovitters |
642476 |
BuildRequires: pkgconfig(xext) |
82 |
ahmad |
24820 |
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 |
tv |
675693 |
Recommends: gimp-help |
90 |
ahmad |
94526 |
Obsoletes: gimp-help-2-common < 2.6 |
91 |
ahmad |
24820 |
|
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 |
shlomif |
618181 |
in the package. Get them in http://download.gimp.org/pub/gimp/fonts/ if |
109 |
|
|
you are so inclined. Alternatively, choose fonts which exist on your |
110 |
|
|
system before running the scripts. |
111 |
ahmad |
24820 |
|
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 |
malo |
310334 |
Group: Development/Python |
146 |
ahmad |
24820 |
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 |
fwang |
234594 |
%patch0 -p0 -b .link |
160 |
ahmad |
78491 |
%patch2 -p1 -b .desktopentry |
161 |
shlomif |
1038119 |
%patch3 -p1 -b .CVE-2016-4995 |
162 |
ahmad |
24820 |
|
163 |
|
|
%build |
164 |
fwang |
144995 |
%configure2_5x --enable-default-binary=yes --disable-static \ |
165 |
ahmad |
24820 |
--enable-mp=yes \ |
166 |
|
|
%if %enable_python |
167 |
|
|
--enable-python=yes \ |
168 |
|
|
%else |
169 |
|
|
--enable-python=no \ |
170 |
|
|
%endif |
171 |
|
|
%if %enable_lzw |
172 |
|
|
--with-gif-compression=lzw \ |
173 |
|
|
%else |
174 |
|
|
--with-gif-compression=rle \ |
175 |
|
|
%endif |
176 |
|
|
--enable-gtk-doc=yes |
177 |
|
|
|
178 |
|
|
%make |
179 |
|
|
|
180 |
|
|
%install |
181 |
|
|
%makeinstall_std |
182 |
|
|
|
183 |
|
|
#clean unpackaged files |
184 |
ovitters |
638468 |
find %buildroot -name '*.la' -delete |
185 |
ahmad |
24820 |
|
186 |
|
|
# workaround broken help system |
187 |
ahmad |
24845 |
HELP_DIR=%{buildroot}%_datadir/gimp/%api_version/help/C |
188 |
ahmad |
24820 |
[[ -d $HELP_DIR ]] || mkdir -p $HELP_DIR |
189 |
|
|
HELP_IDX=$HELP_DIR/introduction.html |
190 |
|
|
echo -e '<HTML><HEAD><TITLE>GIMP Base Library</HEAD>\n<BODY><UL>' > $HELP_IDX |
191 |
|
|
|
192 |
ahmad |
24845 |
/bin/ls %{buildroot}%_datadir/gtk-doc/html/*/index.html | sed -e "s@%{buildroot}@@g" >> $HELP_IDX |
193 |
ahmad |
24820 |
perl -pi -e 's!(.*/html/)([^/]*)(/index.html)!<LI><A HREF="\1\2\3">\2</A>!g' $HELP_IDX |
194 |
|
|
|
195 |
|
|
echo '</UL></BODY></HTML>' >> $HELP_IDX |
196 |
|
|
|
197 |
|
|
%find_lang gimp20 --all-name |
198 |
|
|
|
199 |
|
|
%if %enable_python |
200 |
|
|
chmod 755 %buildroot%_libdir/gimp/%{api_version}/plug-ins/*.py |
201 |
|
|
mkdir -p %{buildroot}%{_libdir}/python%{pyver}/site-packages |
202 |
|
|
echo %_libdir/gimp/%{api_version}/python > %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth |
203 |
|
|
echo %_libdir/gimp/%{api_version}/plug-ins >> %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth |
204 |
|
|
%endif |
205 |
|
|
|
206 |
|
|
desktop-file-install --vendor="" \ |
207 |
fwang |
665862 |
--add-category="X-Mageia-CrossDesktop" \ |
208 |
ahmad |
24845 |
--dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* |
209 |
ahmad |
24820 |
|
210 |
|
|
%files -f gimp20.lang |
211 |
|
|
%{_bindir}/gimp |
212 |
|
|
%{_bindir}/gimp-%abi_version |
213 |
|
|
%{_bindir}/gimp-console |
214 |
|
|
%{_bindir}/gimp-console-%abi_version |
215 |
|
|
%{_datadir}/applications/* |
216 |
fwang |
583198 |
%{_datadir}/appdata/gimp.appdata.xml |
217 |
ahmad |
24820 |
%{_datadir}/gimp |
218 |
dmorgan |
200194 |
%dir %{_libdir}/gimp |
219 |
ahmad |
24820 |
%dir %{_libdir}/gimp/%{api_version} |
220 |
|
|
%dir %{_libdir}/gimp/%{api_version}/environ |
221 |
|
|
%{_libdir}/gimp/%{api_version}/interpreters |
222 |
|
|
%{_libdir}/gimp/%{api_version}/environ/default.env |
223 |
|
|
%{_libdir}/gimp/%{api_version}/modules |
224 |
|
|
%{_libdir}/gimp/%{api_version}/plug-ins |
225 |
|
|
%exclude %{_libdir}/gimp/%{api_version}/plug-ins/*.py |
226 |
|
|
%{_mandir}/man1/gimp* |
227 |
|
|
%{_mandir}/man5/gimp* |
228 |
|
|
%_datadir/icons/hicolor/*/apps/gimp.png |
229 |
gil |
147878 |
#%_datadir/icons/hicolor/scalable/apps/gimp.svg |
230 |
ahmad |
24820 |
%config(noreplace) %{_sysconfdir}/gimp |
231 |
|
|
|
232 |
|
|
%doc AUTHORS NEWS README README.i18n docs/Wilber* |
233 |
|
|
|
234 |
|
|
%files -n %{devlibname} |
235 |
|
|
%doc ChangeLog |
236 |
|
|
%doc %{_datadir}/gtk-doc/html/* |
237 |
|
|
%{_bindir}/gimptool-* |
238 |
|
|
%{_datadir}/aclocal/*.m4 |
239 |
|
|
%{_includedir}/* |
240 |
|
|
%{_libdir}/lib*.so |
241 |
|
|
%{_libdir}/pkgconfig/* |
242 |
|
|
%{_mandir}/man1/gimptool-* |
243 |
|
|
|
244 |
|
|
%files -n %libname |
245 |
|
|
# explicitly list all libs to avoid old libtool issue |
246 |
|
|
%{_libdir}/libgimpconfig-%{api_version}.so.%{lib_major}* |
247 |
|
|
%{_libdir}/libgimp-%{api_version}.so.%{lib_major}* |
248 |
|
|
%{_libdir}/libgimpthumb-%{api_version}.so.%{lib_major}* |
249 |
|
|
%{_libdir}/libgimpbase-%{api_version}.so.%{lib_major}* |
250 |
|
|
%{_libdir}/libgimpcolor-%{api_version}.so.%{lib_major}* |
251 |
|
|
%{_libdir}/libgimpmath-%{api_version}.so.%{lib_major}* |
252 |
|
|
%{_libdir}/libgimpmodule-%{api_version}.so.%{lib_major}* |
253 |
|
|
%{_libdir}/libgimpui-%{api_version}.so.%{lib_major}* |
254 |
|
|
%{_libdir}/libgimpwidgets-%{api_version}.so.%{lib_major}* |
255 |
|
|
|
256 |
|
|
%if %enable_python |
257 |
|
|
%files python |
258 |
|
|
%{_libdir}/gimp/%{api_version}/environ/pygimp.env |
259 |
|
|
%{_libdir}/gimp/%{api_version}/python |
260 |
|
|
%{_libdir}/gimp/%{api_version}/plug-ins/*.py |
261 |
|
|
%{_libdir}/python%{pyver}/site-packages/*.pth |
262 |
|
|
%endif |