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