Blob Blame History Raw
%define subver   1.2
%define age	 0
%define microver 1

Summary: The GNU Image Manipulation Program
Name: 		gimp
Version: 	%{subver}.%{microver}
Release:	6
Epoch:		1
Copyright: 	GPL, LGPL
Group: 		Applications/Multimedia
URL: 		http://www.gimp.org/
BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
Obsoletes: 	gimp-data-min
Obsoletes:	gimp-libgimp
Requires: 	gtk+ >= 1.2.0
Source0: 	ftp://ftp.gimp.org/pub/gimp/v%{subver}/v%{version}/%{name}-%{version}.tar.bz2
Source1:	gimp.desktop
Source2:	gimp.png
Patch0:         gimp-1.1.23-perlpath.patch
Patch1:         gimp-1.1.24-libaa.patch
Patch2:		gimp-1.2.1-locale.patch

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

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.

Install the GIMP if you need a powerful image manipulation
program. You may also want to install other GIMP packages:
gimp-libgimp if you're going to use any GIMP plug-ins and
gimp-data-extras, which includes various extra files for the GIMP.

%package devel
Summary: GIMP plugin and extension development kit
Group: 		Applications/Multimedia
Requires: 	gtk+-devel, gimp = %{version}
%description devel
The gimp-devel package contains the static libraries and header files
for writing GNU Image Manipulation Program (GIMP) plug-ins and
extensions.

Install gimp-devel if you're going to create plug-ins and/or
extensions for the GIMP.  You'll also need to install gimp-limpgimp
and gimp, and you may want to install gimp-data-extras.

%package perl
Summary: GIMP perl extensions and plugins.
Group:		Applications/Multimedia
Requires:	gimp = %{version}
Requires:	perl

%description perl
The gimp-perl package contains all the perl extensions and perl plugins. 

%prep
%setup -q
%patch0 -p1 -b .perlpath
%patch1 -p1 -b .libaa
%patch2 -p1 -b .locale

%build
autoconf
if [ ! -f configure ]; then
  CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --quiet $MYARCH_FLAGS --prefix=%{_prefix}
else
  LIBAA="disable" CFLAGS="$RPM_OPT_FLAGS" %configure
fi

if [ "$SMP" != "" ]; then
  (make "MAKE=make -k -j $SMP"; exit 0)
  make
else
  make
fi

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_infodir} $RPM_BUILD_ROOT/%{_includedir} \
	$RPM_BUILD_ROOT/%{_libdir} $RPM_BUILD_ROOT/%{_bindir} \
        $RPM_BUILD_ROOT/%{_libdir}/gimp/%{subver}/plug-ins

# makeinstall macro won't work here - libexec is overriden
make prefix=$RPM_BUILD_ROOT/%{_prefix} \
     bindir=$RPM_BUILD_ROOT/%{_bindir} \
     libdir=$RPM_BUILD_ROOT/%{_libdir} \
     mandir=$RPM_BUILD_ROOT/%{_mandir} \
     infodir=$RPM_BUILD_ROOT/%{_infodir} \
     datadir=$RPM_BUILD_ROOT/%{_datadir} \
     includedir=$RPM_BUILD_ROOT/%{_includedir} \
     gimpsysconfdir=$RPM_BUILD_ROOT/%{_sysconfdir}/gimp/%{subver} \
     gimpplugindir=$RPM_BUILD_ROOT/%{_libdir}/gimp/%{subver} \
     gimpdatadir=$RPM_BUILD_ROOT/%{_datadir}/gimp/%{subver} \
     PREFIX=$RPM_BUILD_ROOT/%{_prefix} \
     INSTALLMAN3DIR=$RPM_BUILD_ROOT/usr/lib/perl5/man \
     INSTALLMAN1DIR=$RPM_BUILD_ROOT/%{_mandir}/man1 \
     install

# Strip the executables
strip $RPM_BUILD_ROOT/%{_bindir}/gimp
# Only strip execuable files and leave scripts alone.
strip `file $RPM_BUILD_ROOT/%{_libdir}/gimp/%{subver}/plug-ins/* | grep ELF | cut -d':' -f 1`

# Compress down the online documentation.
if [ -d $RPM_BUILD_ROOT/%{_mandir} ]; then
  find $RPM_BUILD_ROOT/%{_mandir} -type f -exec gzip -9nf {} \;
fi

#
# This perl madness will drive me batty
#
eval perl '-V:archname'
find $RPM_BUILD_ROOT/%{_prefix}/lib/perl5 -type f -print | sed "s@^$RPM_BUILD_ROOT@@g" | grep -v perllocal.pod > gimp-perl

#
# Plugins and modules change often (grab the executeable ones)
#
echo "%defattr (0755, root, root)" > gimp-plugin-files
find $RPM_BUILD_ROOT/%{_libdir}/gimp/%{subver} -type f -exec file {} \; | grep -v perl | cut -d':' -f 1 | sed "s@^$RPM_BUILD_ROOT@@g" | grep -v /usr/lib/gimp/1.1/modules/.*\.a$ >>gimp-plugin-files

#
# Now pull the perl ones out.
#
echo "%defattr (0755, root, root)" > gimp-perl-plugin-files
echo "%dir %{_libdir}/gimp/%{subver}/plug-ins" >> gimp-perl-plugin-files
find $RPM_BUILD_ROOT/%{_libdir}/gimp/%{subver} -type f -exec file {} \; | grep perl | cut -d':' -f 1 | sed "s@^$RPM_BUILD_ROOT@@g" >>gimp-perl-plugin-files

#
# Auto detect the lang files.
#
if [ -f /usr/lib/rpm/find-lang.sh ] ; then
 /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %{name}
 /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT gimp-std-plugins
 /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT gimp-script-fu
 cat %{name}.lang gimp-std-plugins.lang gimp-script-fu.lang > gimp-all.lang
fi

#
# Tips
#
echo "%defattr (644, root, root, 555)" >gimp-tips-files
echo "%{_datadir}/gimp/%{subver}/tips/gimp_tips.txt" >> gimp-tips-files
for I in `ls $RPM_BUILD_ROOT/%{_datadir}/gimp/%{subver}/tips/gimp*.[a-z]*.txt | sed "s@^$RPM_BUILD_ROOT/@@g"`; do
   tip_lang=`basename $I | cut -d'.' -f2`
   echo "%lang($tip_lang)    $I" >> gimp-tips-files
done

#
# Build the master filelists generated from the above mess.
#
cat gimp-plugin-files gimp-all.lang gimp-tips-files > gimp.files
echo "%defattr (555, root, root, 555)" > gimp-perl-files
cat gimp-perl gimp-perl-plugin-files >> gimp-perl-files

# install desktop entry
mkdir -p %{buildroot}/etc/X11/applnk/Graphics
mkdir -p %{buildroot}/%{_datadir}/mc/templates
install -m 644 $RPM_SOURCE_DIR/gimp.desktop %{buildroot}/%{_sysconfdir}/X11/applnk/Graphics
install -m 644 $RPM_SOURCE_DIR/gimp.desktop %{buildroot}/%{_datadir}/mc/templates
mkdir -p %{buildroot}/usr/share/pixmaps
install -m 644 $RPM_SOURCE_DIR/gimp.png %{buildroot}/%{_datadir}/pixmaps

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f gimp.files
%defattr (0644, root, root, 0755)
%doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README TODO
%doc docs/*.txt docs/*.eps ABOUT-NLS README.i18n README.perl README.win32 TODO
%attr(-,root,root) %config(missingok) /%{_sysconfdir}/X11/applnk/Graphics/gimp.desktop
%attr(-,root,root) %config(missingok) /%{_datadir}/mc/templates/gimp.desktop
%{_datadir}/pixmaps/gimp.png

%dir %{_datadir}/gimp/%{subver}
%dir %{_datadir}/gimp/%{subver}/tips
%dir %{_libdir}/gimp/%{subver}
%dir %{_libdir}/gimp/%{subver}/modules
%dir %{_libdir}/gimp/%{subver}/plug-ins

%{_datadir}/gimp/%{subver}/brushes/
%{_datadir}/gimp/%{subver}/fractalexplorer/
%{_datadir}/gimp/%{subver}/gfig/
%{_datadir}/gimp/%{subver}/gflare/
%{_datadir}/gimp/%{subver}/gimpressionist/
%{_datadir}/gimp/%{subver}/gradients/
%{_datadir}/gimp/%{subver}/help/
%{_datadir}/gimp/%{subver}/palettes/
%{_datadir}/gimp/%{subver}/patterns/
%{_datadir}/gimp/%{subver}/scripts/

%{_sysconfdir}/gimp/%{subver}/gimprc
%{_sysconfdir}/gimp/%{subver}/gimprc_user
%{_sysconfdir}/gimp/%{subver}/gtkrc
%{_sysconfdir}/gimp/%{subver}/gtkrc_user
%{_sysconfdir}/gimp/%{subver}/unitrc
%{_sysconfdir}/gimp/%{subver}/ps-menurc

%{_datadir}/gimp/%{subver}/gimp_logo.ppm
%{_datadir}/gimp/%{subver}/gimp_splash.ppm

%defattr (0755, root, root)
%{_datadir}/gimp/%{subver}/user_install

%{_libdir}/libgimp-%{subver}.so.%{age}.0.%{microver}
%{_libdir}/libgimp-%{subver}.so.%{age}
%{_libdir}/libgimpui-%{subver}.so.%{age}.0.%{microver}
%{_libdir}/libgimpui-%{subver}.so.%{age}
%{_libdir}/libgck-%{subver}.so.%{age}.0.%{microver}
%{_libdir}/libgck-%{subver}.so.%{age}

%{_bindir}/gimp
#{_bindir}/embedxpm
%{_bindir}/escputil

%defattr (0644, root, root)
%{_mandir}/man1/gimp.1*
%{_mandir}/man1/escputil.1.*
%{_mandir}/man5/gimprc.5*

%files devel
%defattr (0755, root, root, 0755)
%{_bindir}/gimptool
%{_bindir}/gimp-config
%{_libdir}/*.so
%{_libdir}/*.la
%dir %{_libdir}/gimp/%{subver}/modules
%{_libdir}/gimp/%{subver}/modules/*.la

%defattr (0644, root, root, 0755)
%{_datadir}/aclocal/gimp.m4
%{_libdir}/*.a
%{_libdir}/gimp/%{subver}/modules/*.a
%{_includedir}/libgimp/
%{_includedir}/gck/
%{_mandir}/man1/gimptool.1*

%files perl -f gimp-perl-files
%defattr (0755, root, root, 0755)
%{_bindir}/gimpdoc
%{_bindir}/xcftopnm

%changelog
* Tue Jun 19 2001 Matt Wilson <msw@redhat.com>
- added versioned requires to gimp-devel and gimp-perl

* Tue Apr  3 2001 Matt Wilson <msw@redhat.com>
- added gimp-1.2.1-locale.patch, which I've checked in to gimp CVS, to
  correctly set up the locale in plug-ins (#34214)

* Mon Apr  2 2001 Preston Brown <pbrown@redhat.com>
- some gimp-perl files weren't defattr'd (#34325)

* Fri Mar 30 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Don't include embedxpm, as it depends on a non-included perl module (#=33249)
- move gimpdoc and xcftopnm to gimp-perl, as they are dependant on the perl Gimp
  module

* Thu Mar 01 2001 Owen Taylor <otaylor@redhat.com>
- Rebuild for GTK+-1.2.9 include paths

* Mon Jan 22 2001 Matt Wilson <msw@redhat.com>
- 1.2.1

* Mon Dec 25 2000 Matt Wilson <msw@redhat.com>
- 1.2.0

* Wed Dec 20 2000 Matt Wilson <msw@redhat.com>
- 1.1.31

* Thu Dec 14 2000 Matt Wilson <msw@redhat.com>
- 1.1.30
- merge changes from CVS into rpm-4.0 style spec file
- removed va_arg patch

* Mon Aug 21 2000 Matt Wilson <msw@redhat.com>
- 1.1.25

* Fri Aug 11 2000 Jonathan Blandford <jrb@redhat.com>
- Up Epoch and release

* Tue Aug  8 2000 Matt Wilson <msw@redhat.com>
- fixed directory mode on %%{_defaultdocdir}/gimp-%%{version}

* Wed Aug  2 2000 Matt Wilson <msw@redhat.com>
- rebuild against new libpng

* Mon Jul 31 2000 Matt Wilson <msw@redhat.com>
- muck with modules filelist generation to avoid getting files owned by
  two packages

* Mon Jul 17 2000 Matt Wilson <msw@redhat.com>
- disable aa plugin
- moved the group back to Applications/Multimedia
- added desktop entry back into the file list

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Fri Jul  1 2000 Matt Wilson <msw@redhat.com>
- 1.1.24

* Sat Jun 17 2000 Matt Wilson <msw@redhat.com>
- use root, not bin for the default owner.

* Fri Jun 16 2000 Preston Brown <pbrown@redhat.com>
- add back missing system .desktop entry

* Sat Jun 10 2000 Matt Wilson <msw@redhat.com>
- rebuilt against fixed gcc

* Mon Jun  5 2000 Matt Wilson <msw@redhat.com>
- defattr for gimp-perl

* Sun Jun  4 2000 Matt Wilson <msw@redhat.com>
- drop out all of \.a$ from the main package list

* Sat Jun  3 2000 Matt Wilson <msw@redhat.com>
- 1.1.23
- use __NO_MATH_INLINES for now on ix86
- massive FHS surgery

* Tue May 16 2000 Matt Wilson <msw@redhat.com>
- 1.1.22

* Mon Apr 24 2000 Matt Wilson <msw@redhat.com>
- 1.1.20

* 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/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