%define name abiword %define prefix /usr %define version 0.9.3 %define release 1 %define build_id rms # define to 0 if you don't want, 1 if you want %define no_static UNIX_CAN_BUILD_STATIC=0 %define gnome ABI_OPT_GNOME=1 %define perl ABI_OPT_PERL=1 %define optimize ABI_OPT_OPTIMIZE=1 %define version_flag ABI_BUILD_VERSION=%{version} ABI_BUILD_ID=%{build_id} %define ABIPREFIX %{prefix}/share Name: %{name} Summary: Multiplattform word processor Version: %{version} Release: %{release} Source: %{name}-%{version}.tar Group: Applications/Publishing URL: http://www.abisource.com/ BuildRoot: /var/tmp/%{name}-%{version}-buildroot Copyright: GPL Prefix: %{prefix} Packager: Rui M. Silva Seabra 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 %if %(echo %{gnome}|cut -f 2 -d '=') Requires: gnome-libs >= 1.0.57 Requires: gal >= 0.8 Requires: gnome-print >= 0.25 %endif # 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 make %{version_flag} %{no_static} %{gnome} %{perl} %{optimize} compile canonical prefix=$RPM_BUILD_ROOT%{ABIPREFIX} %install umask 022 make %{version_flag} %{no_static} %{gnome} %{perl} %{optimize} 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 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 - 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 - Updated to version 0.7.9 - Changed icon from xpm to png - Made sure Icon had correct rights * Wed Mar 1 2000 Christian Schaller - Updated for TurboLinux 6.0 - Updated to 0.7.8 - Updated for Gnome-enablement - Minor SPEC file changes * Tue Jan 25 2000 Chmouel Boudjnah 0.7.7-2mdk - Fix alpha/sparc compilation. * Thu Jan 13 2000 Saugey Vincent - update to 0.7.7 * Thu Oct 21 1999 Thierry Vignaud - update to 0.7.6 * Thu Sep 23 1999 Chmouel Boudjnah - Build for cooker. * Fri Sep 10 1999 Daouda LO - Mandrake adaptations - bzipped the sources - Make the package relocatable * Sun Sep 05 1999 Vu Hung Quan - update to 0.7.5 ; redhat adaptation * Sat Jun 26 1999 Bernhard Rosenkraenzer - create (more or less) generic spec file...