Package gimp: Specfile

%define ver_major 2.4
%define oldver 2.0

Name: gimp
Version: %ver_major.3
Release: alt0.M40.2

Summary: The GNU Image Manipulation Program
License: GPL, LGPL
Group: Graphics
Url: http://www.gimp.org/

Packager: Valery Inozemtsev <shrek@altlinux.ru>

Obsoletes: gimp2 < %version-%release
Provides: gimp2 = %version-%release
Conflicts: gimp2-perl
Requires: lib%name = %version-%release

%py_provides gimp gimpfu

Source: ftp://ftp.gimp.org/pub/gimp/v%ver_major/%name-%version.tar.bz2
Source1: %name.desktop

Patch0: gimp-2.3.14-alt-pygimp-link.patch

# Automatically added by buildreq on Sun Jun 18 2006
BuildRequires: aalib-devel gcc-c++ intltool libXmu-devel libXpm-devel libalsa-devel libart_lgpl-devel libexif-devel
BuildRequires: libexpat-devel libfreetype-devel libgtkhtml2-devel libjpeg-devel liblcms-devel libmng-devel
BuildRequires: libpng-devel librsvg2-devel libtiff-devel libwmf-devel perl-XML-Parser xml-utils xsltproc
BuildRequires: libpoppler-glib-devel libcurl-devel libdbus-glib-devel libhal-devel gnome-vfs-devel
BuildRequires: python-dev python-module-pygtk-devel

%description
The GIMP (GNU Image Manipulation Program) is a powerful image
composition and editing program, which can be extremely useful for
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.

%package -n lib%name
Summary: GIMP libraries
Group: System/Libraries
License: LGPL
Obsoletes: libgimp2 < %version-%release
Provides: libgimp2 = %version-%release

%description -n lib%name
Libraries used to communicate between The GIMP and other programs which
may function as "GIMP plugins".

%package -n lib%name-devel
Summary: GIMP plugin and extension development kit
Group: Graphics
Requires: lib%name = %version-%release
Obsoletes: libgimp2-devel < %version-%release
Provides: libgimp2-devel = %version-%release

%description -n lib%name-devel
Development libraries and header files for writing GIMP plugins and extensions.

%prep
%setup -q

%patch0 -p1

%build
%__autoreconf
%configure \
	--disable-gimp-console \
	--enable-python \
	--without-print

%make_build

%install
%make DESTDIR=%buildroot install

install -m644 %SOURCE1 %buildroot%_desktopdir/

find %buildroot%_libdir/%name -name \*.la -delete

# Execute find_lang for all components and merge the resulting lists
%find_lang --output=global.lang gimp20 gimp20-libgimp gimp20-std-plug-ins gimp20-script-fu gimp20-tips gimp20-python

%post
%update_menus

%postun
%clean_menus

%post -n lib%name
%post_ldconfig

%postun -n lib%name
%postun_ldconfig

%files -f global.lang
%doc AUTHORS NEWS README README.i18n
%dir %_sysconfdir/%name
%dir %_sysconfdir/%name/%oldver
%config %_sysconfdir/%name/%oldver/*
%_bindir/%name
%_bindir/%name-*
%dir %_libdir/%name
%dir %_libdir/%name/%oldver
%_libdir/%name/%oldver/modules
%_libdir/%name/%oldver/plug-ins
%_libdir/%name/%oldver/environ
%_libdir/%name/%oldver/interpreters
%_libdir/%name/%oldver/python
%_datadir/%name
%_iconsdir/hicolor/*/apps/*
%_desktopdir/%name.desktop
%_datadir/application-registry/*
%_datadir/mime-info/*
%_man1dir/*
%_man5dir/*

%files -n lib%name
%_libdir/*.so.*

%files -n lib%name-devel
%doc %_datadir/gtk-doc/html/*
%_includedir/*
%_bindir/gimptool*
%_libdir/*.so
%_pkgconfigdir/*
%_datadir/aclocal/*

%changelog
* Thu Jan 17 2008 Valery Inozemtsev <shrek@altlinux.ru> 2.4.3-alt0.M40.2
- desable print plugin (close #14036)

* Mon Dec 17 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.3-alt0.M40.1
- build for branch 4.0

* Mon Dec 17 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.3-alt1
- 2.4.3

* Sat Dec 08 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.2-alt2
- fixed menu (bug #13610)

* Thu Nov 22 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.2-alt0.M40.1
- build for branch 4.0
- added conflicts to gimp2-perl (close #13364)

* Wed Nov 21 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.2-alt1
- 2.4.2

* Sat Nov 03 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.1-alt1
- 2.4.1

* Wed Oct 24 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.0-alt1
- 2.4.0 release

* Fri Sep 28 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.4.0-alt0.rc3
- 2.4.0 RC3

* Mon Aug 20 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.17-alt2
- relocated gimprc.5 manpage to gimp
- added %%update_menus in %%post

* Mon Jul 16 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.17-alt0.M40
- build for branch 4.0

* Sun Jul 15 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.17-alt1
- Bugs fixed in GIMP 2.2.17:
    + fixed regression in PSD load plug-in (bug #456042)
    + fixed crash when loading a corrupt PSD file (bug #327444)
    + work around for Pango appending " Not-Rotated" to font names 
- Bugs fixed in GIMP 2.2.16:
    + improved input value validation in several file plug-ins (bug #453973)
    + improved handling of corrupt or invalid XCF files
    + guard against integer overflows in several file plug-ins (bug #451379)
    + fixed handling of background alpha channel in XCF files (bug #443097)
    + improved forward compatibility of the config parser
    + fixed crash when previewing some animated brushes (bug #446005)

* Tue Jul 03 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.15-alt2
- fixed CVE-2007-2949

* Mon May 28 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.15-alt1
- 2.2.15:
  + fixed parsing of GFig files with CRLF line endings (bug #346988)
  + guard against a possible stack overflow in the Sunras loader (bug #433902)
  + fixed definition of datarootdir in gimptool-2.0 (bug #436386)
  + fixed Perspective tool crash on Mac OS X (bug #349483)
  + fixed area resizing in the Image Map plug-in (bug #439222)
  + added missing library in gimptool-2.0 --libs output
  + added new localizations: Occitan and Persian

* Mon May 21 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.14-alt3
- build without gimp-print, used gimp-plugin-gutenprint

* Sun May 20 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.14-alt2
- added gimp-2.2.14-sunras-overflow.patch: avoid buffer overflow in sunras plugin

* Sat May 05 2007 Valery Inozemtsev <shrek@altlinux.ru> 2.2.14-alt1
- 2.2.14
- rename gimp2 to gimp
- added Tango themes by defaults
- build with python

* Sun Feb 11 2007 Anatoly Yakushin <jaa@altlinux.ru> 2.2.13-alt2
- L. A. Kostis <lakostis@altlinux.ru> 2.2.13-alt2
   NMU:
    + move gimptool to -devel subpackage (closes #9955).

* Mon Oct 23 2006 Anatoly Yakushin <jaa@altlinux.ru> 2.2.13-alt1
- 2.2.13

* Mon Jun 19 2006 Anatoly Yakushin <jaa@altlinux.ru> 2.2.11-alt1
- 2.2.11

* Sun Jun 18 2006 Valery Inozemtsev <shrek@altlinux.ru> 2.2.11-alt0.1
- 2.2.11
- updated build dependencies
- move to freedesktop menu
- disabled MMX/SSE

* Thu Feb 02 2006 ALT QA Team Robot <qa-robot@altlinux.org> 2.2.10-alt1.1
- Rebuilt for new pkg-config dependencies.

* Fri Jan 06 2006 Anatoly Yakushin <jaa@altlinux.ru> 2.2.10-alt1
- new version. Fixed russian translation bug # 123410

* Wed May 11 2005 Anatoly Yakushin <jaa@altlinux.ru> 2.2.7-alt1
- new stable version

* Mon Apr 25 2005 Anatoly Yakushin <jaa@altlinux.ru> 2.2.6-alt1
- update ru po
- Yuri N. Sedunov has added
  - 2.2.6
  - rebuild against libexif.so.12. 
  - svg support via librsvg2 enabled.
  - requires gtk+ >= 2.2.4
  - fixed source url.

* Sun Mar 13 2005 Anatoly Yakushin <jaa@altlinux.ru> 2.2.4-alt1
- new stable version, minor bugs fixed.

* Tue Jan 11 2005 Anatoly Yakushin <jaa@altlinux.ru> 2.2.2-alt1
- new stable version, minor bugs fixed.

* Mon Jan 10 2005 Anatoly Yakushin <jaa@altlinux.ru> 2.2.1-alt1
- new stable version
- update ru translation

* Sun Nov 21 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.2-alt0.1.pre2
- new developer version

* Tue Nov 09 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.2-alt0.1.pre1
- new developer version 

* Sun Oct 03 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.5-alt1
- new stable version

* Tue Sep 07 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.4-alt1
- new stable version

* Sat Jul 24 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.3-alt2
- fixed bug - don't open and save non latin1 or utf-8 filename 

* Sun Jul 18 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.3-alt1
- new version
- remove gimp.desktop from src.rpm.
- convert gimp.xpm to gimp.png, install it in /usr/share/pixmaps as menu icon
- remove unusual %%clean section.
- use post{un}_ldconfig macros for libgimp2 subpackage.
- optimize find-lang call.
- allow SMP build.
- clean %%install section
- fix %%files to remove %%_libdir/*.so from libgimp2 subpackage.
- clean .spec using cleanup_spec and manually.
- Special thanks Yuri N. Sedunov aka Aris for his help.

* Thu Jun 24 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.2-alt1
- new version, bug # 3459 fixed

* Mon May 10 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.1-alt2
- spec cleanup, po bugs fixed

* Wed Apr 21 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.1-alt1
- Bugs fixed version GIMP 2.0.1

* Wed Mar 24 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0.0-alt1
- GIMP 2.0.0 new stable build

* Sun Mar 07 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0-alt0.3.pre4
- new version

* Sun Feb  8 2004 Anatoly Yakushin <jaa@altlinux.ru> 2.0-alt0.2.pre3
- add color proof

* Mon Nov 10 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.22-alt1
- new version, spec cleanup

* Mon Oct 13 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.21-alt1
- new version

* Tue Aug 30 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.19-alt1
- new version

* Mon Jun 29 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.16-alt1
- new version

* Wed May 28 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.14-alt2
- fixed bugs in spec file, add new ru.po

* Sun Apr 13 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.14-alt1
- package in Sisyphus

* Mon Mar 24 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.13-alt0.1
- version 1.3.13

* Wed Mar 19 2003 Anatoly Yakushin <jaa@altlinux.ru> 1.3.12-alt0.1
- Adapted spec for AltLinux

* Fri Feb 14 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Reinvented the wheel, but packaged 1.3.11.

* Fri Apr 14 2000 Matt Wilson <msw@redhat.com>
- include subdirs in the help find
- remove gimp-help-files generation
- both gimp and gimp-perl own prefix/lib/gimp/1.1/plug-ins
- both gimp and gimp-devel own prefix/lib/gimp/1.1 and
  prefix/lib/gimp/1.1/modules

* Thu Apr 13 2000 Matt Wilson <msw@redhat.com>
- 1.1.19
- get all .mo files

* Wed Jan 19 2000 Gregory McLean <gregm@comstar.net>
- Version 1.1.15

* Wed Dec 22 1999 Gregory McLean <gregm@comstar.net>
- Version 1.1.14
- Added some auto %files section generation scriptlets