Hi!

I created two spec files for the latest (and greatest ;-)
bleeding edge apps gimp and quanta.
To create gimp you need the gimp-1.1.24 rpm source file
from rawhide (and probably rpm 3.0.5 to unpack it). This
is needed because of a perl path patch from redhat.
Changes can be found in the spec file.
I cannot recommand the helix mdk spec, it is buggy as hell
and perl files are not even considered...

For creating quanta you need the 1.0.3 (or newer with some
changes to the spec file) tar.bz source from quanta.sourceforge.net.
I had to made several changes to the spec file to get it to
build, see the spec file for detailed information. I have only
built it against KDE1.1.2 and QT1.44.
If quanta segfaults on startup, create the directory
.kde/share/config, where quanta stores its config files.

See this as my contribution to the cooker contrib archive ;-)

Best regards,

Reinhard Katzmann
-- 
E-Mail: [EMAIL PROTECTED]

Current Projects: Linux-Installation Mandrake 7.1 (95% finished)
                  Java-DB and -Interface for Pincity (93 % finished)
GnuPG Public Key available on request.
%define subver   1.1
%define microver 24
%define ver      %{subver}.%{microver}

Summary: The GNU Image Manipulation Program
Name:           gimp
Version:        %{ver}
Release:        1mdk
Copyright:      GPL, LGPL
Group:          Applications/Graphics
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/unstable/v%{version}/%{name}-%{version}.tar.bz2
Source1: gimp.desktop
Patch0:         gimp-1.1.23-perlpath.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/Graphics
Requires:       gtk+-devel
%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/Graphics
Requires:       gimp
Requires:       perl

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

%prep
%setup -q
%patch0 -p1 -b .perlpath

%build
%ifarch %ix86
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffast-math"
%endif
%ifarch alpha
MYARCH_FLAGS="--host=alpha-redhat-linux"
%endif

if [ ! -f configure ]; then
  CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --quiet $MYARCH_FLAGS --prefix=%{_prefix}
else
  CFLAGS="$RPM_OPT_FLAGS" %configure --quiet
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} \
     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" 
| sed "s/\.3/.3.bz2/" | grep -v perllocal.pod > gimp-perl

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

#
# Now pull the perl ones out.
#
echo "%defattr (0555, 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 \
    | sed "s:(644, root, root, 755):(444, bin, bin, 555):" > gimp-all.lang
fi

#
# Tips
#
echo "%defattr (444, 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
install -m 644 $RPM_SOURCE_DIR/gimp.desktop %{buildroot}/etc/X11/applnk/Graphics

%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
%attr (0555, bin, man) %doc AUTHORS COPYING ChangeLog* MAINTAINERS NEWS README TODO 
PLUGIN_MAINTAINERS
%attr (0555, bin, man) %doc docs/*.txt docs/*ps docs/Wilber* ABOUT-NLS README.i18n 
README.perl README.win32 TODO
%defattr (0444, root, root, 0555)
%attr(-,root,root) %config(missingok) /etc/X11/applnk/Graphics/gimp.desktop
%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/

%{_datadir}/gimp/%{subver}/gimprc
%{_datadir}/gimp/%{subver}/gimprc_user
%{_datadir}/gimp/%{subver}/gtkrc
%{_datadir}/gimp/%{subver}/unitrc
%{_datadir}/gimp/%{subver}/gimp_logo.ppm
%{_datadir}/gimp/%{subver}/gimp_splash.ppm
%{_datadir}/gimp/%{subver}/ps-menurc

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

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

%{_bindir}/gimp
%{_bindir}/embedxpm
%{_bindir}/gimpdoc
%{_bindir}/xcftopnm

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

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

%defattr (0444, root, root, 0555)
%{_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

%changelog
* Fri Jul 11 2000 Reinhard Katzmann <[EMAIL PROTECTED]>
- Update for Mandrake
- Added some docs
- Quick hack for bzipped man pages

* Fri Jul  1 2000 Matt Wilson <[EMAIL PROTECTED]>
- 1.1.24

* Sat Jun 17 2000 Matt Wilson <[EMAIL PROTECTED]>
- use root, not bin for the default owner.

* Fri Jun 16 2000 Preston Brown <[EMAIL PROTECTED]>
- add back missing system .desktop entry

* Sat Jun 10 2000 Matt Wilson <[EMAIL PROTECTED]>
- rebuilt against fixed gcc

* Mon Jun  5 2000 Matt Wilson <[EMAIL PROTECTED]>
- defattr for gimp-perl

* Sun Jun  4 2000 Matt Wilson <[EMAIL PROTECTED]>
- drop out all of \.a$ from the main package list

* Sat Jun  3 2000 Matt Wilson <[EMAIL PROTECTED]>
- 1.1.23
- use __NO_MATH_INLINES for now on ix86
- massive FHS surgery

* Tue May 16 2000 Matt Wilson <[EMAIL PROTECTED]>
- 1.1.22

* Mon Apr 24 2000 Matt Wilson <[EMAIL PROTECTED]>
- 1.1.20

* Fri Apr 14 2000 Matt Wilson <[EMAIL PROTECTED]>
- 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 <[EMAIL PROTECTED]>
- 1.1.19
- get all .mo files

* Wed Jan 19 2000 Gregory McLean <[EMAIL PROTECTED]>
- Version 1.1.15

* Wed Dec 22 1999 Gregory McLean <[EMAIL PROTECTED]>
- Version 1.1.14
- Added some auto %files section generation scriptlets


Summary: Quanta+ is an HTML editor for KDE project with built-in preview.
Name: quanta
%define version 1.0.3
Version: %{version}
Release: 2mdk
Group: Applications/Editors
Copyright: GNU Public License
Source: http://download.sourceforge.net/quanta/quanta-%{version}.tar.bz2
URL: http://quanta.sourceforge.net/
Packager: Marc Lavallée <[EMAIL PROTECTED]>
Requires: qt >= 1.42, kdelibs >= 1.1.2
BuildRoot: %{_tmppath}/quanta-%{PACKAGE_VERSION}-root
Prefix: %{_prefix}

%description
Quanta Plus is an HTML editor for the K Desktop Environment.

Currently this program can be very useful for quick web development,
however it is still in the early stages of the over all objectives.
Our objective is to product a complete web development environment!
 
Look for active development with a focus on supporting professional level
development. This means full HTML 4.0 support
including cascading style sheets and lot's of time saving features.
Also support is planned for Perl, Javascript and PHP.'

%prep
%setup

%build
./configure --prefix=/usr
# Bad hack, to add prefix for kde path, don't know why ./configure
# does not user $(prefix) in the Makefile instead of /usr, have
# given up :-( (not even changing to another value works, f.e.
# changing kde_datadir to /usr/share/kdeapps in all files where
# kde_datadir is defined :-( )
for i in Makefile */Makefile */*/Makefile */*/*/Makefile ; do
  mv -f $i $i.tmp
  sed -e "s/\/usr\//"\$"\(prefix\)\//" $i.tmp >$i
done
make

%install
rm -r $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} INSTALL=/usr/bin/install GMSGFMT=/usr/bin/msgfmt 
install

%clean
rm -r $RPM_BUILD_ROOT

%files
%{prefix}/bin/quanta
%{prefix}/share/apps/quanta/pics/*
%{prefix}/share/applnk/Applications/quanta.kdelnk
%{prefix}/share/icons/*
%{prefix}/share/locale/*
%config %{prefix}/share/apps/quanta/*.rc
%doc %{prefix}/share/apps/quanta/doc
%doc %{prefix}/doc/kde/HTML/default/quanta
%doc AUTHORS COPYING ChangeLog README TODO doc

%changelog
* Wed Jul 12 2000 Reinhard Katzmann <[EMAIL PROTECTED]> 1.0.3-2mdk
- Corrected lots of bugs in spec: No BuildRoot, missing files

* Wed Jul 12 2000 Reinhard Katzmann <[EMAIL PROTECTED]> 1.0.1-1mdk
- Update to 1.0.3

* Sat May 13 2000 Marc Lavallée <[EMAIL PROTECTED]> 1.0-1mdk
- initial 1.0 rpm for Mandrake 7.0
  (it should also work with RedHat 6 type distributions)

PGP signature

Reply via email to