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

Summary: The GNU Image Manipulation Program.
Name: 		gimp
Version: 	%{subver}.%{microver}
Release: 7
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
BuildRequires:	gtk+-devel
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.2.1-libaa.patch
Patch2:		gimp-1.2.3-newperl.patch.bz2
Patch3:		gimp-1.2.3-wget-fix.patch.bz2

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

%package perl
Summary: Perl extensions and plug-ins for the GIMP.
Group: Applications/Multimedia
Requires:	gimp = %{version}
Requires:	perl
Provides: perl(Gimp::Util)
Provides: perl(of)

%description perl
The gimp-perl package contains Perl extensions and plug-ins for the
GIMP image manipulation program.

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

%build
#AUTOMAKE=automake-1.4 autoreconf
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
sed "s,\(=/\)\([a-z]\),=$RPM_BUILD_ROOT/\2,g" gimptool-1.2 > tmptool
chmod 755 tmptool
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
rootdir=`pwd`
pushd plug-ins/perl
perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor < /dev/null
for I in `find -name Makefile`; do
    sed "s,/usr/bin/gimptool,$rootdir/tmptool,g" $I > $I-
    mv $I- $I
done
popd
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} \
     GIMPTOOL=`pwd`/tmptool \
     install

# remove the perl temp file to satisfy rpmlint
rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl5/ -name ".packlist"`

# 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/%{subver}/modules/.*\.a$ | grep -v /usr/lib/gimp/%{subver}/modules/.*\.la$ >>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}/%{_datadir}/applications
mkdir -p %{buildroot}/%{_datadir}/mc/templates
install -m 644 $RPM_SOURCE_DIR/gimp.desktop %{buildroot}/%{_datadir}/applications
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) /%{_datadir}/applications/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}/gimp-%{subver}
#{_bindir}/embedxpm
#%{_bindir}/escputil

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


%files devel
%defattr (0755, root, root, 0755)
%{_bindir}/gimptool
%{_bindir}/gimptool-%{subver}
%{_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*
%{_mandir}/man1/gimptool-%{subver}.1*

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

%changelog
* Mon Aug 19 2002 Matt Wilson <msw@redhat.com>
- fix up gimp-perl madness to work with 5.8.0 (#66610, #68782)
  - added gimp-1.2.3-newperl.patch.bz2 from Mandrake's gimp package
- added gimp-1.2.3-wget-fix.patch.bz2 from Mandrake's gimp package
- fix desktop file (#71021)

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Apr 15 2002 Matt Wilson <msw@redhat.com>
- filter .la files from main gimp package (#43317, #57571, #56667,
  #51591, #63371)

* Tue Mar 19 2002 Matt Wilson <msw@redhat.com>
- added missing man pages (#61426)
- removed esputil man page (#58919)

* Fri Mar 15 2002 Matt Wilson <msw@redhat.com>
- added /usr/bin/{gimp-config,gimptool}-1.2

* Mon Mar 11 2002 Matt Wilson <msw@redhat.com>
- 1.2.3, based on changes from Ed Halley <ed@halley.cc> below:
  - removed gimp-1.2.1-locale.patch as the patch was incorporated upstream
  - linked new versioned gimp-1.2 executable to traditional gimp name

* Mon Feb 25 2002 Than Ngo <than@redhat.com> 1.2.1-11
- rebuild in new enviroment

* Thu Jan 31 2002 Bill Nottingham <notting@redhat.com>
- escputil lives in ghostscript now

* Thu Jan 31 2002 Jeremy Katz <katzj@redhat.com>
- add silly perl dependencies that don't get automatically found

* Wed Jan 30 2002 Jeremy Katz <katzj@redhat.com>
- rebuild in new environment

* Thu Jul 19 2001 Tim Powers <timp@redhat.com>
- remove the perl temp files to pacify rpmlint

* 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