%define lib_major 0 # optional compile flags %define enable_python 1 %{?_without_python: %global enable_python 0} %define enable_lzw 0 %{?_with_lzw: %global enable_lzw 1} %define req_gtk_version 2.12.1 %define api_version 2.0 %define abi_version 2.8 %define libname %mklibname %{name} %{api_version}_%{lib_major} %define devlibname %mklibname -d %{name}%{api_version} Summary: The GNU Image Manipulation Program Name: gimp Epoch: 1 Version: 2.8.2 Release: %mkrel 2 License: GPLv2+ Group: Graphics/Editors and Converters URL: http://www.gimp.org/ Source0: ftp://ftp.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2 Source1: ftp://ftp.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2.md5 Source13: gimp-scripting-sample.pl Patch0: gimp-2.8.0-link.patch #gw fix name in desktop file and disable startup notification Patch2: gimp-2.5.1-desktopentry.patch Patch3: gimp-2.8.2-CVE-2012-5576.patch BuildRequires: pkgconfig(atk) >= 2.2.0 BuildRequires: pkgconfig(babl) >= 0.1.10 BuildRequires: pkgconfig(cairo) >= 1.10.2 BuildRequires: pkgconfig(cairo-pdf) >= 1.10.2 BuildRequires: pkgconfig(dbus-glib-1) >= 0.70 BuildRequires: pkgconfig(fontconfig) >= 2.2.0 BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.24.1 BuildRequires: pkgconfig(gegl-0.2) >= 0.2.0 BuildRequires: pkgconfig(gio-2.0) >= 2.30.2 BuildRequires: pkgconfig(glib-2.0) >= 2.30.2 BuildRequires: pkgconfig(gmodule-no-export-2.0) BuildRequires: pkgconfig(gtk+-2.0) >= 2.24.10 BuildRequires: pkgconfig(gudev-1.0) >= 167 BuildRequires: pkgconfig(iso-codes) BuildRequires: pkgconfig(lcms) >= 1.16 BuildRequires: pkgconfig(libcurl) >= 7.15.1 BuildRequires: pkgconfig(libexif) >= 0.6.15 BuildRequires: pkgconfig(libpng) >= 1.2.37 BuildRequires: pkgconfig(librsvg-2.0) >= 2.36.0 BuildRequires: pkgconfig(pangocairo) >= 1.29.4 BuildRequires: pkgconfig(pangoft2) BuildRequires: pkgconfig(poppler-glib) >= 0.12.4 BuildRequires: pkgconfig(webkit-1.0) >= 1.6.1 BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xfixes) BuildRequires: aalib-devel BuildRequires: gtk-doc >= 1.11-3 BuildRequires: libalsa-devel BuildRequires: libmng-devel BuildRequires: libtiff-devel BuildRequires: jasper-devel BuildRequires: perl BuildRequires: libxmu-devel BuildRequires: libxpm-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: libgs-devel BuildRequires: intltool # mail plugin BuildRequires: sendmail-command # python plugin %if %enable_python BuildRequires: pkgconfig(pygtk-2.0) >= 2.10.4 %endif BuildRequires: automake BuildRequires: libwmf-devel >= 0.2.8 BuildRequires: libxext-devel BuildRequires: desktop-file-utils Provides: gimp1_3 gimp2_0 gimp2_2 gimp2.6 Obsoletes: gimp1_3 gimp2_0 gimp2_2 gimp2.6 # workaround libgimp not bumping its major on API/ABI changes: Requires: %{libname} = %epoch:%{version} Conflicts: perl-Gimp < 2.2 Conflicts: gutenprint-gimp2 < 5.0.1 Suggests: gimp-help Obsoletes: gimp-help-2-common < 2.6 %description The GIMP is an image manipulation program suitable for photo retouching, image composition and image authoring. Many people find it extremely useful in creating logos and other graphics for web pages. The GIMP has many of the tools and filters you would expect to find in similar commercial offerings, and some interesting extras as well. The GIMP provides a large image manipulation toolbox, including channel operations and layers, effects, sub-pixel imaging and anti-aliasing, and conversions, all with multi-level undo. This version of The GIMP includes a scripting facility, but many of the included scripts rely on fonts that we cannot distribute. The GIMP ftp site has a package of fonts that you can install by yourself, which includes all the fonts needed to run the included scripts. Some of the fonts have unusual licensing requirements; all the licenses are documented in the package. Get them in ftp://ftp.gimp.org/pub/gimp/fonts/ if you are so inclined. Alternatively, choose fonts which exist on your system before running the scripts. Build Options: --without python Disable pygimp (default enabled) --with lzw Enable LZW compression in GIF (default disabled) %package -n %{devlibname} Summary: GIMP plugin and extension development kit Group: Development/GNOME and GTK+ Requires: libgtk+2.0-devel >= %{req_gtk_version} Epoch: 1 License: LGPLv2+ Requires: %{libname} = %epoch:%{version} Provides: gimp-devel = %{version}-%{release} Provides: gimp2.6-devel = %{version}-%{release} Provides: libgimp-devel = %{version}-%{release} %description -n %{devlibname} Static libraries and header files for writing GIMP plugins and extensions. %package -n %libname Summary: GIMP libraries Group: System/Libraries Epoch: 1 License: LGPLv2+ Provides: libgimp%{api_version} = %{version}-%{release} Obsoletes: %mklibname gimp 2.6_2.0_0 %description -n %libname This is the library that provides core GIMP functionality. It enable other programs to use GIMP's features but is mainly intended to be used by the GIMP and its "external" plugins. %package python Summary: GIMP python extension Group: Development/Python Epoch: 1 Requires: pygtk2.0 Obsoletes: gimp1_3-python, gimp2_0-python, gimp2_2-python %description python This package contains the python modules for GIMP, which act as a wrapper to libgimp allowing the writing of plug-ins for Gimp. This is similar to script-fu, except that you can use the full set of Python extension modules from the plug-in, and you write plug-in in python instead of in scheme. %prep %setup -q -n gimp-%version %patch0 -p0 -b .link %patch2 -p1 -b .desktopentry %patch3 -p1 -b .CVE-2012-5576 %build %configure2_5x --enable-default-binary=yes --disable-static \ --enable-mp=yes \ %if %enable_python --enable-python=yes \ %else --enable-python=no \ %endif %if %enable_lzw --with-gif-compression=lzw \ %else --with-gif-compression=rle \ %endif --enable-gtk-doc=yes %make %install %makeinstall_std #clean unpackaged files find %buildroot -name '*.la'|xargs rm # workaround broken help system HELP_DIR=%{buildroot}%_datadir/gimp/%api_version/help/C [[ -d $HELP_DIR ]] || mkdir -p $HELP_DIR HELP_IDX=$HELP_DIR/introduction.html echo -e 'GIMP Base Library</HEAD>\n<BODY><UL>' > $HELP_IDX /bin/ls %{buildroot}%_datadir/gtk-doc/html/*/index.html | sed -e "s@%{buildroot}@@g" >> $HELP_IDX perl -pi -e 's!(.*/html/)([^/]*)(/index.html)!<LI><A HREF="\1\2\3">\2</A>!g' $HELP_IDX echo '</UL></BODY></HTML>' >> $HELP_IDX %find_lang gimp20 --all-name %if %enable_python chmod 755 %buildroot%_libdir/gimp/%{api_version}/plug-ins/*.py mkdir -p %{buildroot}%{_libdir}/python%{pyver}/site-packages echo %_libdir/gimp/%{api_version}/python > %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth echo %_libdir/gimp/%{api_version}/plug-ins >> %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth %endif desktop-file-install --vendor="" \ --add-category="X-MandrivaLinux-CrossDesktop" \ --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* %files -f gimp20.lang %defattr(-,root,root,0755) %{_bindir}/gimp %{_bindir}/gimp-%abi_version %{_bindir}/gimp-console %{_bindir}/gimp-console-%abi_version %{_datadir}/applications/* %{_datadir}/gimp %dir %{_libdir}/gimp %dir %{_libdir}/gimp/%{api_version} %dir %{_libdir}/gimp/%{api_version}/environ %{_libdir}/gimp/%{api_version}/interpreters %{_libdir}/gimp/%{api_version}/environ/default.env %{_libdir}/gimp/%{api_version}/modules %{_libdir}/gimp/%{api_version}/plug-ins %exclude %{_libdir}/gimp/%{api_version}/plug-ins/*.py %{_mandir}/man1/gimp* %{_mandir}/man5/gimp* %_datadir/icons/hicolor/*/apps/gimp.png #%_datadir/icons/hicolor/scalable/apps/gimp.svg %config(noreplace) %{_sysconfdir}/gimp %doc AUTHORS NEWS README README.i18n docs/Wilber* %files -n %{devlibname} %defattr(-,root,root,0755) %doc ChangeLog %doc %{_datadir}/gtk-doc/html/* %{_bindir}/gimptool-* %{_datadir}/aclocal/*.m4 %{_includedir}/* %{_libdir}/lib*.so %{_libdir}/pkgconfig/* %{_mandir}/man1/gimptool-* %files -n %libname %defattr(-,root,root,755) # explicitly list all libs to avoid old libtool issue %{_libdir}/libgimpconfig-%{api_version}.so.%{lib_major}* %{_libdir}/libgimp-%{api_version}.so.%{lib_major}* %{_libdir}/libgimpthumb-%{api_version}.so.%{lib_major}* %{_libdir}/libgimpbase-%{api_version}.so.%{lib_major}* %{_libdir}/libgimpcolor-%{api_version}.so.%{lib_major}* %{_libdir}/libgimpmath-%{api_version}.so.%{lib_major}* %{_libdir}/libgimpmodule-%{api_version}.so.%{lib_major}* %{_libdir}/libgimpui-%{api_version}.so.%{lib_major}* %{_libdir}/libgimpwidgets-%{api_version}.so.%{lib_major}* %if %enable_python %files python %defattr(-,root,root,755) %{_libdir}/gimp/%{api_version}/environ/pygimp.env %{_libdir}/gimp/%{api_version}/python %{_libdir}/gimp/%{api_version}/plug-ins/*.py %{_libdir}/python%{pyver}/site-packages/*.pth %endif