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