Geoffrey and Lenny,

I finally was able to test my "theory" and yes, it works. There is a
couple of things to note:

1. Previous versions of the Gimp must be uninstalled before building the
new version.

2. The perl-PDL package is missing a number of files required for
building the perl stuff. I had to add them back in the spec file to get
things to build.

I'm attaching both specs, though the Gimp one is quite heavily modified
for my own preferences, so you probably should adjust it accordingly.
Note that on the install phase, the PREFIX in uppercase is required for
the perl makefiles to install correctly (otherwise they will dump right
into the perl area and bypass the /var/tmp location).

John
%define sname gimp
%define name gimp
%define version 1.1.24
%define release 1mdk
%define prefix ${_prefix}

Name: %{name}
Summary: The GNU Image Manipulation Program
Version: %{version}
Release: %{release}
Serial: 1
Source: %{sname}-%{version}.tar.bz2
Source1: gimp.xpm.bz2
Source2: mini-gimp.xpm.bz2
Group: Graphics
URL: http://www.gimp.org
BuildRoot: %{_tmppath}/%{sname}-buildroot
Copyright: GPL
Provides: gimp
Packager: Jan Dittberner <[EMAIL PROTECTED]>
BuildRequires: mpeg_lib libpng-devel libjpeg-devel gtk+-devel >= 1.2.7 glib-devel >= 
1.2.7 aalib-devel
Requires: mpeg_lib libpng libjpeg gtk+ >= 1.2.7 glib >= 1.2.7 zlib perl aalib
Prefix: %{_prefix}

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

%package libgimp
Group: System/Libraries
Serial: 1
Summary: GIMP libraries.
Provides: gimp-libgimp libgck.so.1 libgimp.so.1 libgimpui.so.1

%description libgimp
Libraries used to communicate between The GIMP and other programs which
may function as "GIMP plugins".

%package devel
Group: Development/C
Serial: 1
Summary: GIMP plugin and extension development kit.
Provides: gimp-devel

%description devel
Static libraries and header files for writing GIMP plugins and extensions.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q -n %{sname}-%{version}
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \
        --prefix=%{prefix}

%build
make

%install
make install prefix=$RPM_BUILD_ROOT/%{prefix} PREFIX=$RPM_BUILD_ROOT/%{_prefix}

cd $RPM_BUILD_ROOT%{prefix}/lib
# compat symlink to get stuff working.

ln -sf libgimp.so libgimp.so.1
ln -sf libgimpui.so libgimpui.so.1
ln -sf libgck.so libgck.so.1

cd $RPM_BUILD_ROOT


mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/icons/mini
bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{_prefix}/share/icons/wilbur.xpm
bzcat %{SOURCE2} > $RPM_BUILD_ROOT%{_prefix}/share/icons/mini/wilbur.xpm

mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/menu/
cat >$RPM_BUILD_ROOT%{_prefix}/lib/menu/gimp <<EOF
?package(gimp): command="gimp" icon="wilbur.xpm" section="Multimedia/Graphics"\
title="The GIMP" longtitle="The GNU Image Manipulation Program" needs="x11"
EOF


%files
%defattr(-,root,root,0755)
%{_prefix}/share/icons/wilbur.xpm
%dir %{_prefix}/share/icons/mini
%dir %{prefix}/share/gimp/1.1/tips
%dir %{prefix}/share/gimp/1.1/patterns
%dir %{prefix}/share/gimp/1.1/scripts
%dir %{prefix}/lib/gimp/1.1/modules
%dir %{prefix}/lib/gimp/1.1/plug-ins
%dir %{prefix}/share/gimp/1.1/brushes
%dir %{prefix}/share/gimp/1.1/devel-docs
%dir %{prefix}/share/gimp/1.1/devel-docs/html
%dir %{prefix}/share/gimp/1.1/devel-docs/html/libgimp
%dir %{prefix}/share/gimp/1.1/fractalexplorer
%dir %{prefix}/share/gimp/1.1/gfig
%dir %{prefix}/share/gimp/1.1/gflare
%dir %{prefix}/share/gimp/1.1/gflare/Bright_Star
%dir %{prefix}/share/gimp/1.1/gflare/Classic
%dir %{prefix}/share/gimp/1.1/gflare/Default
%dir %{prefix}/share/gimp/1.1/gflare/Distant_Sun
%dir %{prefix}/share/gimp/1.1/gflare/GFlare_101
%dir %{prefix}/share/gimp/1.1/gflare/GFlare_102
%dir %{prefix}/share/gimp/1.1/gflare/Hidden_Planet
%dir %{prefix}/share/gimp/1.1/gimpressionist/Brushes
%dir %{prefix}/share/gimp/1.1/gimpressionist/
%dir %{prefix}/share/gimp/1.1/gimpressionist/Paper
%dir %{prefix}/share/gimp/1.1/gimpressionist/Presets
%dir %{prefix}/share/gimp/1.1/gradients
%dir %{_prefix}/lib/perl5/site_perl/*/*/Gimp
%dir %{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp
%dir %{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/Lib
%dir %{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/Net
%dir %{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/UI
%{_prefix}/share/icons/mini/wilbur.xpm
%{_prefix}/lib/menu/gimp
%{prefix}/bin/gimp
%{prefix}/lib/gimp/1.1/plug-ins/*
%{prefix}/lib/gimp/1.1/modules/lib*.a
%{prefix}/lib/gimp/1.1/modules/lib*.la
%{prefix}/lib/gimp/1.1/modules/lib*.so
%{_prefix}/lib/perl5/man/man3/*
%{_prefix}/lib/perl5/site_perl/*/*/*.pm
%{_prefix}/lib/perl5/site_perl/*/*/Gimp/*
%{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/*.bs
%{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/*.so
%{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/Lib/*
%{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/Net/*
%{_prefix}/lib/perl5/site_perl/*/*/auto/Gimp/UI/*
%{prefix}/share/locale/*/LC_MESSAGES/*
%{prefix}/share/gimp/1.1/scripts/*
%{prefix}/share/gimp/1.1/fractalexplorer/*
%{prefix}/share/gimp/1.1/gfig/*
%{prefix}/share/gimp/1.1/gimpressionist/Presets/*
%{prefix}/share/gimp/1.1/gimpressionist/Brushes/*
%{prefix}/share/gimp/1.1/gimpressionist/Paper/*
%{prefix}/share/gimp/1.1/gradients/*
%{prefix}/share/gimp/1.1/palettes/*
%{prefix}/share/gimp/1.1/patterns/*
%{prefix}/share/gimp/1.1/brushes/*
%{prefix}/share/gimp/1.1/tips/*
%{prefix}/share/gimp/1.1/help/*/*/*/*/*.html
%{prefix}/share/gimp/1.1/help/*/*/*/*.html
%{prefix}/share/gimp/1.1/help/*/*/*.html
%{prefix}/share/gimp/1.1/help/*/*.*
%{prefix}/share/gimp/1.1/devel-docs/html/libgimp/*
%{prefix}/share/gimp/1.1/user_install
%{prefix}/share/gimp/1.1/gimprc
%{prefix}/share/gimp/1.1/gimprc_user
%{prefix}/share/gimp/1.1/gtkrc
%{prefix}/share/gimp/1.1/unitrc
%{prefix}/share/gimp/1.1/gimp_logo.ppm
%{prefix}/share/gimp/1.1/gimp_splash.ppm
%{prefix}/share/gimp/1.1/ps-menurc
%{prefix}/share/aclocal/gimp.m4
%{prefix}/man/man1/*
%{prefix}/man/man5/*
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO

%files devel
%defattr(-,root,root,0755)
%{prefix}/bin/gimptool
%{prefix}/include/libgimp/*
%{prefix}/include/gck/gck.h
%{prefix}/lib/lib*.a
%{prefix}/lib/lib*.la

%files libgimp
%defattr(-,root,root,755)
%{prefix}/lib/*.so*

%clean

%post
[ -x %{_prefix}/bin/update-menus ] && %{_prefix}/bin/update-menus || true

%postun
if [ "$1" = "0" ]; then
        [ -x %{_prefix}/bin/update-menus ] && %{_prefix}/bin/update-menus || true
fi
if [ -d %{prefix}/lib/gimp/1.1 ] && rm -rf %{prefix}/lib/gimp/1.1

%post libgimp
/sbin/ldconfig

%postun libgimp
/sbin/ldconfig

%changelog
* Tue Jun 27 2000 John Cavan <[EMAIL PROTECTED]> 1.1.24-1mdk
- new version
- enabled the perl
- redefined the prefixing to more easily support relocation

* Wed Jun 21 2000 Lenny Cartier <[EMAIL PROTECTED]> 1.1.23-2mdk
- merge fixes from Jan Dittberner
- fix install

* Tue Jun 20 2000 Jan Dittberner <[EMAIL PROTECTED]> 1.1.23-1mdk
- 1.1.23
- add BuildRequires  

* Thu May 04 2000 Geoffrey Lee <[EMAIL PROTECTED]> 1.1.21-1mdk
- 1.1.21
- remove segfault patch
- i can't believe we really used disable perl .. :-( :-(

* Thu Apr 27 2000 Thierry Vignaud <[EMAIL PROTECTED]> 1.1.20-2mdk
  as Lords L. & L. ask for help,
- fix compilation on Mandrake :-(
- various spec cleanups for rpmlint (invalid groups, post & postun scripts,
  ...)
- new group scheme for libgimp
- use spechelper
- nearly 99% of the new doc has been forgotten in previous rpm: greaat...

* Wed Apr 26 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- 1.1.20
- add patch to fix segfault
- _tmppath
- _prefix
- fix group

* Fri Mar 31 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- removed obsoletes, it's stupid. used serial: 1 instead
- postun for gimp to remove the %{prefix}/lib/gimp/1.1 that's left behind
- 1.1.19

* Mon Mar 13 2000 Geoffrey Lee <[EMAIL PROTECTED]>
 - provides: gimp
 - add some compat symlinks
 - obsolete old gimp packages to make upgrade painless
 - add some old compat symlinks to provides


* Mon Mar 06 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- renamed this package to hackgimp since this is devel
- add devel warning to package description
- changed the buildroot to include version
- use prefix define in files section
- patched to v 1.1.18

* Sat Feb 12 2000 Geoffrey Lee <[EMAIL PROTECTED]>
- version 1.1.17

* Thu Feb 03 2000 Thierry Vignaud <[EMAIL PROTECTED]>
- v1.1.16

* Thu Dec 09 1999 Thierry Vignaud <[EMAIL PROTECTED]>
- v1.1.13

* Thu Nov 25 1999 Thierry Vignaud <[EMAIL PROTECTED]>
- v1.1.12 (hoping that Lenny won't put his one above my RPM.

* Fri Nov 19 1999 Lenny Cartier <[EMAIL PROTECTED]>
- v1.1.11
- used SRPM provided by Jan Dittberner

# PDL.spec
%define name perl-PDL
%define real_name PDL
%define version 2.004
%define release 1mdk

Summary: perlDL, an efficient numerical language for scientific computing
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: GPL
Group: Development/Perl
Buildroot: /var/tmp/%{name}-buildroot/
Source: 
ftp://ftp.cpan.org/pub/perl/CPAN/modules/by-module/PDL/%{real_name}-%{version}.tar.bz2
Patch: PDL-2.004-perl-5.6.0.patch.bz2
Prefix: %{_prefix}
Requires: Mesa >= 3.0
Obsoletes: PDL

%description
The perlDL project aims to turn perl into an efficient numerical language for
scientific computing. The PDL module gives standard perl the ability to
COMPACTLY store and SPEEDILY manipulate the large N-dimensional data sets which
are the bread and butter of scientific computing. e.g. C<$a=$b+$c> can add two
2048x2048 images in only a fraction of a second.

The aim is to provide tons of useful functionality for
scientific and numeric analysis.

%prep
%setup -q -n %{real_name}-%{version}

%patch -p1

%build
perl Makefile.PL PREFIX=%{prefix}
make OPTIMIZE="$RPM_OPT_FLAGS" PREFIX=%{prefix}

%install
rm -rf $RPM_BUILD_ROOT
make install PREFIX="$RPM_BUILD_ROOT/%{prefix}"

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%dir /usr/lib/perl5/site_perl/5.*/%{_arch}-linux/auto/PDL
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/auto/PDL/*
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL.pm
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/default.perldlrc
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/pdldoc.db
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/*.pm
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/*.pod
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/Filter
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/Opt
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/IO
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/Graphics
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/Pod
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/Core
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/PP
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/Doc
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/Demos
/usr/lib/perl5/site_perl/5.*/%{_arch}-linux/PDL/HtmlDocs
/usr/lib/perl5/5.*/%{_arch}-linux/perllocal.pod
/usr/lib/perl5/man/man3/*
/usr/bin/perldl

%changelog

* Mon Apr 04 2000 François Pons <[EMAIL PROTECTED]> 2.004-1mdk

- updated to 2.004.
- added patch for compiling with perl 5.6.0.
- reduced nightmare of files section.
- removed man1 pages as they are no longer available?
- updated Group.

* Tue Jan 18 2000 Frederic Lepied <[EMAIL PROTECTED]> 2.003-5mdk

- fix on non i386 arch.

* Thu Dec 16 1999 François PONS <[EMAIL PROTECTED]>

- added section 1 man pages (mainly internals of PDL).

* Wed Dec 15 1999 François PONS <[EMAIL PROTECTED]>

- added perldl, although not mandatory it helps a lot for tutorial and doc.

* Thu Dec  9 1999 Pixel <[EMAIL PROTECTED]>

- rebuild with new Mesa

* Tue Nov 23 1999 François PONS <[EMAIL PROTECTED]>

- upgraded to version 2.003
- fixed missing defattr.
- Build release.

* Tue Jul 13 1999 Chmouel Boudjnah <[EMAIL PROTECTED]>

- Fix %{name} problems to perl-PDL (all perl modules need to begin with perl)
- Add a Requires: Mesa

* Fri Jul  9 1999 Chmouel Boudjnah <[EMAIL PROTECTED]>

- first version of rpm.

# end of file

Reply via email to