Hi Folks,
due to popular demand, here are my latest spec files. I think
they're generic enough to be used on any rpm based distro.
Good Luck.
Martin
%define name abiword
%define version 0.9.2
%define release 1
%define prefix /usr
%define ABIPREFIX %{prefix}/share
Name: %{name}
Summary: Multiplattform word processor
Version: %{version}
Release: %{release}
Source: %{name}-%{version}.tar.gz
Group: Applications/Publishing
URL: http://www.abisource.com/
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
Copyright: GPL
Prefix: %{prefix}
Icon: abi.xpm
Packager: Martin Sevior <[EMAIL PROTECTED]>
Distribution: RedHat 7.x Contrib
# Basic requirements
Requires: gtk+ >= 1.2.7
Requires: glib >= 1.2.7
#Requirements for GNOME build, comment out when building for Gtk+ only
#Requires: gnome-libs >= 1.0.57
#Requires: gal >= 0.2
#Requires: gnome-print >= 0.25
# Requirement for pspell build, comment out when not building for pspell
# Requires: pspell >= 0.11.1
%description
AbiWord is a Multiplattform Wordprocesser which for the Unix plattform comes with a
GTK+ interface. For extended functionality and intergration it is also possible to
compile AbiWord with GNOME support. Abiword with the GNOME frontend is part of the
GNOME Office Suite. AbiWord is made available under the GNU GPL license.
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q -n %{name}-%{version}/abi
%build
#Plain Gtk+ build - comment out when doing GNOME build
UNIX_CAN_BUILD_STATIC=0 ABI_BUILD_VERSION=%{version} make UNIX_CAN_BUILD_STATIC=0
ABI_OPT_PERL=1 ABI_OPT_OPTIMIZE=1 ABI_BUILD_VERSION=%{version} compile canonical
prefix=$RPM_BUILD_ROOT%{ABIPREFIX}
%install
umask 002
# Plain Gtk+ build - comment out when doing GNOME build
UNIX_CAN_BUILD_STATIC=0 ABI_BUILD_VERSION=%{version} make UNIX_CAN_BUILD_STATIC=0
ABI_OPT_PERL=1 ABI_OPT_OPTIMIZE=1 ABI_BUILD_VERSION=%{version} install
prefix=$RPM_BUILD_ROOT%{ABIPREFIX}
# Manual fixes to Abi package
# Fixes Abi start script
perl -p -i -e "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/bin/AbiWord
# Fixes for symlink in {prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
ln $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/bin/AbiWord
$RPM_BUILD_ROOT%{prefix}/bin/abiword
# Creates GNOME menu entries - comment out for plain gtk
#mkdir -p $RPM_BUILD_ROOT%{prefix}/share/pixmaps
#cp $RPM_BUILD_DIR/%{name}-%{version}/abidistfiles/icons/abiword_48.png
$RPM_BUILD_ROOT%{prefix}/share/pixmaps/abiword_48.png
#mkdir -p $RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Applications/
#cp $RPM_BUILD_DIR/%{name}-%{version}/abi/src/pkg/linux/rpm/data/abiword.desktop
$RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Applications/abiword.desktop
# Copies all ispell dictionaries
mkdir -p $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary
cp $RPM_BUILD_DIR/%{name}-%{version}/abidistfiles/dictionary/*.hash
$RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary/
# Remove duplicate Little* entry
/bin/rm $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary/Little*
#
# Fix for wrong file rights on fonts
chmod 644 $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/fonts/*
chmod 644 $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/icons/*
%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{name}
%files
%defattr(-,root,root)
%{ABIPREFIX}/AbiSuite/COPYING
%{ABIPREFIX}/AbiSuite/readme.txt
%{ABIPREFIX}/AbiSuite/AbiWord/*/*/*
%{ABIPREFIX}/AbiSuite/bin/*
%{ABIPREFIX}/AbiSuite/dictionary/*
%{ABIPREFIX}/AbiSuite/fonts/*
%{ABIPREFIX}/AbiSuite/icons/*
%attr(755,-,-) %{prefix}/bin/abiword
# This doesn't work for gtk
#%attr(644,-,-) %{prefix}/share/pixmaps/abiword_48.png
# comment out for gtk version
#%{prefix}/share/gnome/apps/Applications/abiword.desktop
%changelog
* Thu Jun 28 2001 Martin Sevior
- tweaked stuff for 0.90
- all ispell dictionaries found are installed
* Wed Feb 21 2001 Martin Sevior
- tweaked stuff for RH 6.2 0.7.13
* Sun Dec 9 2000 Christian Schaller <[EMAIL PROTECTED]>
- Updates for RedHat 6.2
- Updated for AbiWord 0.7.12
- Major rewrite of compilation and files part of SPEC file
* Sat May 20 2000 Christian Schaller <[EMAIL PROTECTED]>
- Updated to version 0.7.9
- Changed icon from xpm to png
- Made sure Icon had correct rights
* Wed Mar 1 2000 Christian Schaller <[EMAIL PROTECTED]>
- Updated for TurboLinux 6.0
- Updated to 0.7.8
- Updated for Gnome-enablement
- Minor SPEC file changes
* Tue Jan 25 2000 Chmouel Boudjnah <[EMAIL PROTECTED]> 0.7.7-2mdk
- Fix alpha/sparc compilation.
* Thu Jan 13 2000 Saugey Vincent <[EMAIL PROTECTED]>
- update to 0.7.7
* Thu Oct 21 1999 Thierry Vignaud <[EMAIL PROTECTED]>
- update to 0.7.6
* Thu Sep 23 1999 Chmouel Boudjnah <[EMAIL PROTECTED]>
- Build for cooker.
* Fri Sep 10 1999 Daouda LO <[EMAIL PROTECTED]>
- Mandrake adaptations
- bzipped the sources
- Make the package relocatable
* Sun Sep 05 1999 Vu Hung Quan <[EMAIL PROTECTED]>
- update to 0.7.5 ; redhat adaptation
* Sat Jun 26 1999 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- create (more or less) generic spec file...
%define name abiword
%define version 0.9.2
%define release 1
%define prefix /usr
%define ABIPREFIX %{prefix}/share
Name: %{name}
Summary: Multiplattform word processor
Version: %{version}
Release: %{release}
Source: %{name}-%{version}.tar.gz
Group: Applications/Publishing
URL: http://www.abisource.com/
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
Copyright: GPL
Prefix: %{prefix}
Icon: abi.xpm
Packager: Martin Sevior <[EMAIL PROTECTED]>
Distribution: RedHat 7.x Contrib
# Basic requirements
Requires: gtk+ >= 1.2.7
Requires: glib >= 1.2.7
#Requirements for GNOME build, comment out when building for Gtk+ only
#Requires: gnome-libs >= 1.0.57
Requires: gal >= 0.8
Requires: gnome-print >= 0.25
# Requirement for pspell build, comment out when not building for pspell
# Requires: pspell >= 0.11.1
%description
AbiWord is a Multiplattform Wordprocesser which for the Unix plattform comes with a
GTK+ interface. For extended functionality and intergration it is also possible to
compile AbiWord with GNOME support. Abiword with the GNOME frontend is part of the
GNOME Office Suite. AbiWord is made available under the GNU GPL license.
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q -n %{name}-%{version}/abi
%build
# GNOME NO Pspell build - comment out when doing plain Gtk+ build
UNIX_CAN_BUILD_STATIC=0 ABI_BUILD_VERSION=%{version} make UNIX_CAN_BUILD_STATIC=0
ABI_OPT_GNOME=1 ABI_OPT_OPTIMIZE=1 ABI_BUILD_VERSION=%{version} compile canonical
prefix=$RPM_BUILD_ROOT%{ABIPREFIX}
%install
umask 002
# GNOME and NO Pspell build - comment out when doing plan Gtk+ build
UNIX_CAN_BUILD_STATIC=0 ABI_BUILD_VERSION=%{version} make UNIX_CAN_BUILD_STATIC=0
ABI_OPT_GNOME=1 ABI_OPT_OPTIMIZE=1 ABI_BUILD_VERSION=%{version} install
prefix=$RPM_BUILD_ROOT%{ABIPREFIX}
# Manual fixes to Abi package
# Fixes Abi start script
perl -p -i -e "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/bin/AbiWord
# Fixes for symlink in {prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
ln $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/bin/AbiWord
$RPM_BUILD_ROOT%{prefix}/bin/abiword
# Creates GNOME menu entries - comment out for plain gtk
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/pixmaps
cp $RPM_BUILD_DIR/%{name}-%{version}/abidistfiles/icons/abiword_48.png
$RPM_BUILD_ROOT%{prefix}/share/pixmaps/abiword_48.png
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Applications/
cp $RPM_BUILD_DIR/%{name}-%{version}/abi/src/pkg/linux/rpm/data/abiword.desktop
$RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Applications/abiword.desktop
# Copies all ispell dictionaries
cp $RPM_BUILD_DIR/%{name}-%{version}/abidistfiles/dictionary/*.hash
$RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary/
#Remove duplicate LittleEndian hash
/bin/rm $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/dictionary/Little*
# Copies all clipart
cp $RPM_BUILD_DIR/%{name}-%{version}/abidistfiles/clipart/*.png
$RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/clipart/
#
# Fix for wrong file rights on fonts,icons,clipart
chmod 644 $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/fonts/*
chmod 644 $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/icons/*
chmod 644 $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/clipart/*
%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{name}
%files
%defattr(-,root,root)
%{ABIPREFIX}/AbiSuite/COPYING
%{ABIPREFIX}/AbiSuite/readme.txt
%{ABIPREFIX}/AbiSuite/AbiWord/*/*/*
%{ABIPREFIX}/AbiSuite/bin/*
%{ABIPREFIX}/AbiSuite/dictionary/*
%{ABIPREFIX}/AbiSuite/fonts/*
%{ABIPREFIX}/AbiSuite/icons/*
%{ABIPREFIX}/AbiSuite/clipart/*
%attr(755,-,-) %{prefix}/bin/abiword
# This doesn't work for gtk
%attr(644,-,-) %{prefix}/share/pixmaps/abiword_48.png
# comment out for gtk version
%{prefix}/share/gnome/apps/Applications/abiword.desktop
%changelog
* Thu Jun 28 2001 Martin Sevior
- tweaked stuff for 0.90
- all ispell dictionaries found are installed
* Sun Dec 9 2000 Christian Schaller <[EMAIL PROTECTED]>
- Updates for RedHat 6.2
- Updated for AbiWord 0.7.12
- Major rewrite of compilation and files part of SPEC file
* Sat May 20 2000 Christian Schaller <[EMAIL PROTECTED]>
- Updated to version 0.7.9
- Changed icon from xpm to png
- Made sure Icon had correct rights
* Wed Mar 1 2000 Christian Schaller <[EMAIL PROTECTED]>
- Updated for TurboLinux 6.0
- Updated to 0.7.8
- Updated for Gnome-enablement
- Minor SPEC file changes
* Tue Jan 25 2000 Chmouel Boudjnah <[EMAIL PROTECTED]> 0.7.7-2mdk
- Fix alpha/sparc compilation.
* Thu Jan 13 2000 Saugey Vincent <[EMAIL PROTECTED]>
- update to 0.7.7
* Thu Oct 21 1999 Thierry Vignaud <[EMAIL PROTECTED]>
- update to 0.7.6
* Thu Sep 23 1999 Chmouel Boudjnah <[EMAIL PROTECTED]>
- Build for cooker.
* Fri Sep 10 1999 Daouda LO <[EMAIL PROTECTED]>
- Mandrake adaptations
- bzipped the sources
- Make the package relocatable
* Sun Sep 05 1999 Vu Hung Quan <[EMAIL PROTECTED]>
- update to 0.7.5 ; redhat adaptation
* Sat Jun 26 1999 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- create (more or less) generic spec file...