gimp.spec
author dc144907
Tue, 30 May 2006 08:13:59 +0000
changeset 7337 1d11d4ecbc10
parent 7243 69a196f7101d
child 7509 33597f80a7ed
permissions -rw-r--r--
2006-05-30 Damien Carbery <[email protected]> * gimp.spec: Add patch, 04-hidden. * gimp-04-hidden.diff: Added to fix G_GNUC_INTERNAL usage.

#
# spec file for package gimp
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

%define subver 2.3
%define subver_install 2.0
%define microver 8
%define help_version 10

Name:         gimp
License:      GPL, LGPL
Group:        System/GUI/GNOME
Version:      %{subver}.%{microver}
Release:      2
Distribution: Java Desktop System
Vendor:       Sun Microsystems, Inc.
Summary:      The GIMP (GNU Image Manipulation Program)
Source:       ftp://ftp.gimp.org/pub/%{name}/v%{subver}/%{name}-%{version}.tar.bz2
Source1:      ftp://ftp.gimp.org/pub/%{name}/help/gimp-help-2-0.%{help_version}.tar.gz
Patch1:       gimp-01-menu-entry.diff
Patch2:       gimp-02-Xext.diff
Patch3:       gimp-03-void-return.diff
Patch4:       gimp-04-hidden.diff
URL:          http://www.gimp.org
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_defaultdocdir}/doc
Autoreqprov:  on
Prereq:       /sbin/ldconfig
Prereq:       coreutils

%define glib2_version 2.4.1
%define gtk2_version 2.4.1
%define libmng_version 1.0.6
%define libgimpprint_version 4.2.6
%define libpng_version 1.2.5
%define libjpeg_version 6.2.0
%define libungif_version 4.1.0
%define slang_version 1.4.9
%define pygtk2_version 2.7.3

BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: libgimpprint-devel >= %{libgimpprint_version}
BuildRequires: libmng-devel >= %{libmng_version}
BuildRequires: libpng-devel >= %{libpng_version}
BuildRequires: libjpeg-devel >= %{libjpeg_version}
BuildRequires: libungif >= %{libungif_version}
BuildRequires: slang-devel >= %{slang_version}
BuildRequires: pygtk2-devel >= %{pygtk2_version}

Requires: glib2 >= %{glib2_version}
Requires: gtk2 >= %{gtk2_version}

%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 webpages. 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.

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
ftp://ftp.gimp.org/pub/gimp/fonts/freefonts-0.10.tar.gz and
ftp://ftp.gimp.org/pub/gimp/fonts/sharefonts-0.10.tar.gz if you are so
inclined. Alternatively, choose fonts which exist on your system
before running the scripts.

%package devel
Summary: The GIMP plug-in and extension development kit.
Group: Applications/Multimedia
Requires: 	gtk2-devel >= %{gtk2_version}
Requires:	%{name} = %{version}
Autoreqprov:  on

%description devel
The gimp-devel package contains the static libraries and header files
for writing GNU Image Manipulation Program (GIMP) plug-ins and
extensions.


%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

gunzip -c %SOURCE1|tar xf -

%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

CFLAGS="$RPM_OPT_FLAGS"			\
libtoolize --force
aclocal $ACLOCAL_FLAGS
automake -a -c -f
autoconf
# Removing sierra driver on Solaris since it doesn't compile yet.
%ifos solaris
%define print_options "--disable-print"
%else
%define print_options ""
%endif
./configure --prefix=%{_prefix} \
	    --sysconfdir=%{_sysconfdir} \
	    --bindir=%{_bindir}		\
	    --libdir=%{_libdir}		\
            --includedir=%{_includedir} \
	    --libexecdir=%{_libexecdir} \
	    --localstatedir=/var/lib	\
	    --mandir=%{_mandir}		\
	    --enable-mp			\
	    --enable-gtk-doc		\
	    --enable-default-binary	\
	    %{print_options}
make munix=

PKG_CONFIG_DISABLE_UNINSTALLED=
unset PKG_CONFIG_DISABLE_UNINSTALLED
%ifos linux
export PKG_CONFIG_PATH=/usr/src/packages/BUILD/gimp-%{subver}.%{microver}
%endif
cd gimp-help-2-0.%{help_version}
	./configure --prefix=%{_prefix}	\
	    	    --sysconfdir=%{_sysconfdir} \
	    	    --bindir=%{_bindir}		\
	    	    --libdir=%{_libdir}		\
            	    --includedir=%{_includedir} \
	    	    --libexecdir=%{_libexecdir} \
	    	    --localstatedir=/var/lib	\
	    	    --mandir=%{_mandir}		\
	    	    --enable-mp			\
	    	    --enable-gtk-doc		\
	    	    --enable-default-binary	\
	    	    %{print_options}
	make
cd ..

%install
make DESTDIR=$RPM_BUILD_ROOT install
#clean up unpackaged files
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/%{subver_install}/modules/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gimp/%gimp.subver_install/python/lib*.la

cd gimp-help-2-0.%{help_version}
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
rm -f %{_datadir}/mime-info/gimp-%{subver}.keys
/sbin/ldconfig

%files
%defattr (-, root, root)
%{_bindir}/gimp
%{_bindir}/gimp-%{subver}
%{_bindir}/gimp-console*
%{_bindir}/gimp-remote*
%{_libdir}/lib*-%{subver_install}.so.*
%dir %{_datadir}/gimp/%{subver_install}
%dir %{_libdir}/gimp/%{subver_install}
%dir %{_libdir}/gimp/%{subver_install}/environ
%dir %{_libdir}/gimp/%{subver_install}/modules
%dir %{_libdir}/gimp/%{subver_install}/plug-ins
%{_libdir}/gimp/%{subver_install}/environ/*
%{_libdir}/gimp/%{subver_install}/modules/*.so
%{_libdir}/gimp/%{subver_install}/plug-ins/*
%{_libdir}/gimp/%{subver_install}/interpreters
%{_libdir}/gimp/%{subver_install}/python
%{_datadir}/gimp/%{subver_install}/brushes/
%{_datadir}/gimp/%{subver_install}/fractalexplorer/
%{_datadir}/gimp/%{subver_install}/gfig/
%{_datadir}/gimp/%{subver_install}/gflare/
%{_datadir}/gimp/%{subver_install}/gimpressionist/
%{_datadir}/gimp/%{subver_install}/gradients/
%{_datadir}/gimp/%{subver_install}/images/
%{_datadir}/gimp/%{subver_install}/palettes/
%{_datadir}/gimp/%{subver_install}/patterns/
%{_datadir}/gimp/%{subver_install}/scripts/
%{_datadir}/gimp/%{subver_install}/themes/
%{_datadir}/gimp/%{subver_install}/tips/
%{_datadir}/gimp/%{subver_install}/help/
%{_datadir}/gimp/%{subver_install}/menus/
%{_datadir}/applications/gimp.desktop
%{_datadir}/application-registry/gimp.applications
%{_datadir}/mime-info/gimp.keys
%{_datadir}/locale
%{_datadir}/icons
%{_sysconfdir}/gimp/%{subver_install}/gimprc
%{_sysconfdir}/gimp/%{subver_install}/gtkrc
%{_sysconfdir}/gimp/%{subver_install}/ps-menurc
%{_sysconfdir}/gimp/%{subver_install}/sessionrc
%{_sysconfdir}/gimp/%{subver_install}/templaterc
%{_sysconfdir}/gimp/%{subver_install}/unitrc
%{_sysconfdir}/gimp/%{subver_install}/controllerrc
%{_mandir}/man1/gimp-%{subver}.1*
%{_mandir}/man1/gimp-remote*
%{_mandir}/man1/gimptool*
%{_mandir}/man5/gimprc-%{subver}.5*

%files devel
%defattr (-, root, root)
%{_includedir}/gimp-%{subver_install}/
%{_bindir}/gimptool-%{subver_install}
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%dir %{_libdir}/gimp/%{subver_install}/modules
%{_datadir}/aclocal/gimp-2.0.m4
%doc %{_datadir}/gtk-doc/html/
%{_mandir}/man1/gimptool-%{subver_install}.1*

%changelog
* Tue May 30 2006 - [email protected]
- Add patch, 04-hidden, for new G_GNUC_INTERNAL usage.

* Wed May 03 2006 - [email protected]
- Bump help version to 2.0.10.

* Tue Apr 25 2006 - [email protected]
- Add patch, 03-void-return, to fix build issues. Bugzilla: 339698.

* Mon Apr 24 2006 - [email protected]
- Bump to 2.3.8.
- Bump help version to 2.0.9.

* Tue Feb 21 2006 - [email protected]
- Bump to 2.3.7.

* Tue Jan 03 2006 - [email protected]
- Bump to 2.3.6.

* Fri Sep 30 2005 - [email protected]
- Bump to 2.3.4

* Tue Sep 20 2005 - [email protected]
- add patch Xext.diff: add -lXext to a Makefile.am

* Mon Aug 15 2005 - [email protected]
- Bump to 2.3.3.

* Fri Jun 10 2005 - [email protected]
- Bump to 2.2.7, reapply patches

* Tue Feb 01 2005 - [email protected]
- add a symlink called gimp to bindir that points to gimp-%subver, fixes
  #6221126

* Fri Jan 21 2005 - [email protected]
- %ifos linux the PKG_CONFIG_PATH so Solaris one can be different.

* Sun Jan 16 2005 - [email protected]
- Set PKG_CONFIG_PATH to build with gimp-help tarball.

* Tue Jan 11 2005 - [email protected]
- #6199103 : Add gimp-help tarball

* Fri Nov 12 2004 - [email protected]
- Added --libdir and --bindir to configure opts so they can be redirected
  on Solaris

* Tue Sep 14 2004 - [email protected]
- Added gimp-03-g11n-potfiles.diff 

* Wed Aug 25 2004 - [email protected]
- changed header file permissions
* Wed Aug 18 2004 - [email protected]
- removed --disable-gtk-doc since it doesn't make sense to include both
  this and --enable-gtk-doc.

* Fri Jul 16 2004 - [email protected]
- Finally bumped to 2.0.x series (2.0.2)
- packaging fixes for rpm4 and remove upstream patches

* Tue Jul 13 2004 - [email protected]
- Remove '-j $CPUS' from 'make' because of failures on Solaris and intermittent
  failures on Linux.

* Thu Jul 08 2004 - [email protected]
- Updated l10n content to gimp-l10n-po-1.2.tar.bz2

* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds

* Fri May 21 2004 - [email protected]
- Added patch 4 to support building on x86 Solaris.

* Wed May 12 2004 - [email protected]
- Updated l10n content to gimp-l10n-po-1.1.tar.bz2

* Wed Apr 28 2004 - [email protected]
- Remove unwanted keys from gimp.keys.

* Sun Apr 03 2004 - [email protected]
- Use #ifdef to set --disable-print for Solaris.

* Thu Apr 01 2004 - [email protected]
- replace tar jxf with the more solaris friendly
  bzcat piped through tar.  Now pass ACLOCAL_FLAGS into
  aclocal.  Added EXTRA_CONFIGURE_OPTIONS to allow Solaris
  to pass in --disable-print.  Fixed a few defattr lines.

* Mon Mar 29 2004 - [email protected]
- Adding gimp-l10n-po-1.0.tar.bz2 l10n content

* Fri Jan 09 2004 - <[email protected]>
- Patch configure.in to enable deprecated widgets

* Mon Oct 20 2003 - <[email protected]>
- Updated version of glib2 and gtk2 dependency to build for QS.

* Thu Aug 14 2003 - <[email protected]>
- remove *.a, *.la

* Tue Aug 11 2003 - [email protected]
- Move mime, .desktop and keys files into proper location
  instead of just sym-linking them

* Mon Aug 10 2003 - [email protected]
- Bump tarball

* Thu Jul 17 2003 - [email protected]
- Correct menu entry

* Mon Jul 14 2003 - [email protected]
- initial spec file created