# BUILD OPTIONS: 1 for yes, 0 for no ## Hardwired for rpm3 %define enable_static 0 %define enable_debug 0 %define enable_gnome 0 %define enable_bidi 1 %define enable_perl 0 %define enable_jpeg 1 %define enable_xml2 1 %define enable_optimize 1 %define enable_pspell 0 # PLUGIN OPTIONS: 1 for yes, 0 for no %define enable_tools 1 %define enable_impexp 1 %define name abiword %define prefix /usr %define version 1.0.3 %define release 1 %if !%{enable_gnome} %define enable_gdkpixbuf --enable-gdkpixbuf %else %define enable_gdkpixbuf --disable-gdkpixbuf %endif %if %{enable_tools} %define plugin_tools --enable-eml --enable-wikipedia --enable-urldict --enable-shell --enable-magick --enable-gdict --enable-babelfish --enable-abicommand --enable-abigimp --enable-aiksaurus %else %define plugin_tools --disable-eml --disable-wikipedia --disable-urldict --disable-shell --disable-magick --disable-gdict --disable-babelfish --disable-abicommand --disable-abigimp --disable-aiksaurus %endif %if %{enable_impexp} %define plugin_bz2abw --enable-bz2abw %{enable_gdkpixbuf} --enable-html --enable-openwriter %else %define plugin_bz2abw --disable-bz2abw --disable-gdkpixbuf --disable-html --disable-openwriter %endif %define version_flag ABI_BUILD_VERSION=%{version} %define ABIPREFIX %{prefix}/share Name: %{name} Summary: Multi-platform word processor Version: %{version} Release: %{release} Source: %{name}-%{version}.tar.gz Group: Applications/Publishing URL: http://www.abisource.com/ BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot License: GPL Prefix: %{prefix} Packager: MG Distribution: RedHat 7.x Contrib # Basic requirements Requires: gtk+ >= 1.2.7 Requires: glib >= 1.2.7 Requires: %{name}-fonts %if %{enable_jpeg} Requires: libjpeg BuildRequires: libjpeg-devel %endif %if %{enable_pspell} Requires: pspell >= 0.11.1 BuildRequires: pspell-devel >= 0.11.1 %endif %if %{enable_xml2} Requires: libxml2 >= 2.0 BuildRequires: libxml2-devel >= 2.0 %else Requires: expat >= 1.95.1 BuildRequires: expat-devel >= 1.95.1 %endif # Requirements for GNOME build %if %{enable_gnome} Requires: gnome-libs >= 1.0.57 Requires: gal >= 0.8 Requires: gnome-print >= 0.29 Requires: gnome-vfs BuildRequires: gnome-libs-devel BuildRequires: gal-devel BuildRequires: gnome-print-devel BuildRequires: gnome-vfs-devel Requires: bonobo BuildRequires: bonobo-devel %description AbiWord is a multi-platform word processor with a GTK+ interface on the UNIX platform. For extended functionality and integration this version is compiled with GNOME support. Abiword with the GNOME front-end is part of the GNOME Office Suite. AbiWord is made available under the GNU GPL license. %else %description AbiWord is a multi-platform word processor with a GTK+ interface on the UNIX platform. For extended functionality and integration it is also possible to compile AbiWord with GNOME support. Abiword with the GNOME front-end is part of the GNOME Office Suite. AbiWord is made available under the GNU GPL license. %endif %if %{enable_perl} %package perl Summary: Perl Bindings Module Group: Development/Libraries Requires: perl >= 5.005 BuildRequires: perl >= 5.005 %description perl Perl Module containing classes for AbiWord Scripting. %endif %if %{enable_tools} %package plugins-tools Summary: Various tools that can be used to extend AbiWord's capabilities. Group: Applications/Productivity Requires: abiword %description plugins-tools This is a set of plugins for AbiWord. It includes eml: Use mathematical notation in AbiWord. abicommand: Perform AbiWord operations from the command prompt. abigimp: Process images in AbiWord using the Gimp. abimagick: Process images in AbiWord using ImageMagick. wikipedia: Access the Wikipedia reference from AbiWord. urldict: Cross-platform url dictionary plugin. gdict: Use the gnome dictionary application from within AbiWord. aiksaurus: Use the Aiksaurus thesaurus in AbiWord. babelfish: Translate text online using Babelfish. ScriptHappy: Run other programs in a shell and direct the output to AbiWord. %endif %if %{enable_impexp} %package plugins-impexp Summary: Plugins to import and export otherwise unsupported formats. Group: Applications/Productivity Requires: abiword %description plugins-impexp This is a set of plugins for AbiWord. It includes support for OpenWriter, bzipped AbiWord, and (x)html document formats. Additionally, it adds support for certain image types to AbiWord builds that were not gnome-enabled. %endif %package fonts Summary: AbiWord Fonts Group: Applications/Productivity Epoch: 1 %description fonts These are the basic fonts used by AbiWord. %package clipart Summary: AbiWord Clipart Group: Applications/Productivity %description clipart This is the clipart portfolio used by AbiWord. %prep %__rm -rf $RPM_BUILD_ROOT %setup -q -n %{name}-%{version}/abi %build make %{version_flag} ABI_OPT_DEBUG=%{enable_debug} ABI_OPT_LIBXML2=%{enable_xml2} UNIX_CAN_BUILD_STATIC=%{enable_static} ABI_OPT_GNOME=%{enable_gnome} ABI_OPT_LIBJPEG=%{enable_jpeg} ABI_OPT_BIDI_ENABLED=%{enable_bidi} ABI_OPT_PERL=%{enable_perl} ABI_OPT_OPTIMIZE=%{enable_optimize} compile canonical prefix=$RPM_BUILD_ROOT%{ABIPREFIX} cd ../abiword-plugins ./configure --prefix=$RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite %{plugin_tools} %{plugin_impexp} make cd ../abi %install umask 022 cd ../abiword-plugins %__make install cd ../abi %__make %{version_flag} ABI_OPT_DEBUG=%{enable_debug} ABI_OPT_LIBXML2=%{enable_xml2} UNIX_CAN_BUILD_STATIC=%{enable_static} ABI_OPT_GNOME=%{enable_gnome} ABI_OPT_LIBJPEG=%{enable_jpeg} ABI_OPT_BIDI_ENABLED=%{enable_bidi} ABI_OPT_PERL=%{enable_perl} ABI_OPT_OPTIMIZE=%{enable_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 # Creates GNOME menu entries %__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 %if %{enable_gnome} %__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 %endif %if %{enable_gnome} # Copies oaf files %__mkdir_p $RPM_BUILD_ROOT/%{prefix}/share/oaf %__cp $RPM_BUILD_DIR/%{name}-%{version}/abidistfiles/*.oaf $RPM_BUILD_ROOT/%{prefix}/share/oaf %__cp $RPM_BUILD_DIR/%{name}-%{version}/abidistfiles/nautilus-abiword-content-view-ui.xml $RPM_BUILD_ROOT/%{prefix}/share/oaf %endif # 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/* %__chmod 644 $RPM_BUILD_ROOT%{ABIPREFIX}/AbiSuite/templates/* %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/readme.txt %{ABIPREFIX}/AbiSuite/AbiWord/help/en-US %{ABIPREFIX}/AbiSuite/AbiWord/strings %{ABIPREFIX}/AbiSuite/AbiWord/system.profile-* %{ABIPREFIX}/AbiSuite/bin %attr(644,root,root) %{ABIPREFIX}/AbiSuite/dictionary/*american*.hash* %{ABIPREFIX}/AbiSuite/icons %{ABIPREFIX}/AbiSuite/templates %attr(644,root,root) %{prefix}/share/pixmaps/abiword_48.png %attr(-,root,root) %{ABIPREFIX}/oaf %if %{enable_gnome} %attr(644,root,root) %{prefix}/share/gnome/apps/Applications/abiword.desktop %attr(644,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiGdkPixbuf.* %if %{enable_tools} %files plugins-tools %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiCommand.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiGimp.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAikSaurusABI.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiBabelfish.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libGdictAbiPlugin.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libScriptHappy.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiWikipedia.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiURLDict.* %endif %if %{enable_impexp} %files plugins-impexp %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libBZ2Abw.* %if ! %{enable_gnome} %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiGdkPixbuf.* %endif %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiHTML.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libOpenWriter.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiSDW.* %endif %files clipart %defattr(-,root,root) %{ABIPREFIX}/AbiSuite/clipart %files fonts %defattr(-,root,root) %config(noreplace) %{ABIPREFIX}/AbiSuite/fonts/fonts.dir %config(noreplace) %{ABIPREFIX}/AbiSuite/fonts/fonts.scale %{ABIPREFIX}/AbiSuite/fonts/*.afm %{ABIPREFIX}/AbiSuite/fonts/*.pfa %{ABIPREFIX}/AbiSuite/fonts/*.pfb %{ABIPREFIX}/AbiSuite/fonts/*.e2u %{ABIPREFIX}/AbiSuite/fonts/*.u2g #%files help-de-DE #%defattr(-,root,root) #%{ABIPREFIX}/AbiSuite/AbiWord/help/de-DE %post # Fixes for symlink in {prefix}/bin %__mkdir_p %{prefix}/bin %__ln_s -f %{ABIPREFIX}/AbiSuite/bin/AbiWord %{prefix}/bin/abiword %postun if test ! -x %{ABIPREFIX}/AbiSuite/bin/AbiWord ; then %__rm -f %{prefix}/bin/abiword fi %post fonts if test -z "`grep AbiSuite /etc/X11/fs/config`" ; then if test -x /usr/sbin/chkfontpath ; then /usr/sbin/chkfontpath --add %{ABIPREFIX}/AbiSuite/fonts fi fi %postun fonts if test ! -e %{ABIPREFIX}/AbiSuite/fonts/fonts.dir ; then if test -x /usr/sbin/chkfontpath ; then /usr/sbin/chkfontpath --remove %{ABIPREFIX}/AbiSuite/fonts fi fi %changelog * Sat Jun 8 2002 Mark Gilbert - Pretty much a total rewrite. * Thu May 30 2002 Rui M. Silva Seabra - Remove copying of dictionary install (works with diving make build) * Thu May 23 2002 Rui M. Silva Seabra - Add Embeddable package with files that allow AbiWord to be embeddable in GNOME * Sat Apr 6 2002 Joaquín Cuenca Abela Rui M. Silva Seabra - Add %post fonts and %postun fonts to use (if found) redhat's chkfontpath program to add abiword's font path on install and remove it on uninstall * Sun Mar 31 2002 Rui M. Silva Seabra - Partially solve bug http://bugzilla.abisource.com/show_bug.cgi?id=1938 Added postun to remove the symlink * Thu Mar 28 2002 Rui M. Silva Seabra - Solved bug http://bugzilla.abisource.com/show_bug.cgi?id=1938 fonts.dir and fonts.scale will no longer be replaced. * Mon Mar 25 2002 Rui M. Silva Seabra - Removed ispell dictionaries to rpm spec too much clutter and one too many sad voices * Thu Mar 17 2002 Francis James Franklin - Added festvox, abigimp & shell importer plugin to list * Thu Mar 14 2002 Rui M. Silva Seabra - Added ispell dictionaries to rpm spec - fix permissions and owners * Thu Feb 21 2002 Francis James Franklin - Added HTML importer plugin to list * Thu Dec 27 2001 Rui M. Silva Seabra - Simplified spec's ifs, gdkpixbuf plugin is installed by default in gnome build * Sun Dec 9 2001 Rui M. Silva Seabra - The spec now compiles plugins (for the time being, this is not an option) * Sat Nov 24 2001 Rui M. Silva Seabra - Made some minor corrections * Sat Nov 24 2001 Francis James Franklin - Made spec ready to be included in tree * Sat Nov 3 2001 Rui M. Silva Seabra - Seperated the help packages. * Fri Oct 26 2001 Rui M. Silva Seabra - Tweaked spec to make gtk build not include gnome files. - Increase requirements details. - Start preparations for _real_ perl enabled builds. * Wed Oct 24 2001 Rui M. Silva Seabra - Separated fonts and clipart into sub packages. * Tue Oct 23 2001 Rui M. Silva Seabra - Applied Michele Baldessari 's patch to correct some bugs. * Mon Sep 10 2001 Rui M. Silva Seabra - Unified Gtk+/Gnome rpm specs into The One Spec * 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...