# BUILD OPTIONS: 1 for yes, 0 for no %define enable_static __UNIX_CAN_BUILD_STATIC__ %define enable_debug __ABI_OPT_DEBUG__ %define enable_gnome __ABI_OPT_GNOME__ %define enable_bidi __ABI_OPT_BIDI_ENABLED__ %define enable_perl __ABI_OPT_PERL__ %define enable_jpeg __ABI_OPT_LIBJPEG__ %define enable_xml2 __ABI_OPT_LIBXML2__ %define enable_optimize __ABI_OPT_OPTIMIZE__ %define enable_pspell __ABI_OPT_PSPELL__ # PLUGIN OPTIONS: 1 for yes, 0 for no %define enable_abicommand 1 %define enable_abigimp 1 %define enable_aiksaurus 1 %define enable_babelfish 1 %define enable_bz2abw 1 %define enable_eg 0 %define enable_eml 0 %define enable_festvox 0 %define enable_freetranslation 0 %define enable_gdict 1 %define enable_gdkpixbuf 1 %define enable_html 1 %define enable_imagemagick 0 %define enable_openwriter 0 %define enable_shell 1 %define enable_urldict 1 %define enable_wikipedia 1 %define name abiword %define prefix /usr %define version __ABI_BUILD_VERSION__ %define release __ABI_RELEASE_NUMBER__ %if %{enable_gnome} %define enable_gdkpixbuf 1 %endif %if %{enable_abicommand} %define plugin_abicommand --enable-abicommand %else %define plugin_abicommand --disable-abicommand %endif %if %{enable_abigimp} %define plugin_abigimp --enable-abigimp %else %define plugin_abigimp --disable-abigimp %endif %if %{enable_aiksaurus} %define plugin_aiksaurus --enable-aiksaurus %else %define plugin_aiksaurus --disable-aiksaurus %endif %if %{enable_babelfish} %define plugin_babelfish --enable-babelfish %else %define plugin_babelfish --disable-babelfish %endif %if %{enable_bz2abw} %define plugin_bz2abw --enable-bz2abw %else %define plugin_bz2abw --disable-bz2abw %endif %if %{enable_eg} %define plugin_tests --enable-eg %else %define plugin_tests --disable-eg %endif %if %{enable_eml} %define plugin_eml --enable-eml %else %define plugin_eml --disable-eml %endif %if %{enable_festvox} %define plugin_festvox --enable-festvox %else %define plugin_festvox --disable-festvox %endif %if %{enable_freetranslation} %define plugin_freetranslation --enable-freetranslation %else %define plugin_freetranslation --disable-freetranslation %endif %if %{enable_gdict} %define plugin_gdict --enable-gdict %else %define plugin_gdict --disable-gdict %endif %if %{enable_gdkpixbuf} %define plugin_gdkpixbuf --enable-gdkpixbuf %else %define plugin_gdkpixbuf --disable-gdkpixbuf %endif %if %{enable_html} %define plugin_html --enable-html %else %define plugin_html --disable-html %endif %if %{enable_imagemagick} %define plugin_imagemagick --enable-magick %else %define plugin_imagemagick --disable-magick %endif %if %{enable_openwriter} %define plugin_openwriter --enable-OpenWriter %else %define plugin_openwriter --disable-OpenWriter %endif %if %{enable_shell} %define plugin_shell --enable-shell %else %define plugin_shell --disable-shell %endif %if %{enable_urldict} %define plugin_urldict --enable-urldict %else %define plugin_urldict --disable-urldict %endif %if %{enable_wikipedia} %define plugin_wikipedia --enable-wikipedia %else %define plugin_wikipedia --disable-wikipedia %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: __ABI_BUILD_PACKAGER__ 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: libxml >= 2.0 BuildRequires: libxml-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 %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. %package embeddable Requires: bonobo BuildRequires: bonobo-devel Summary: Files for embedding AbiWord in other bonobo-aware programs. Group: Development/Libraries %description embeddable Files for embedding AbiWord in other bonobo-aware programs. %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_abicommand} %package plugin-abicommand Summary: Enables AbiWord to be used as a commanded daemon. Group: Applications/Productivity Requires: abiword %description plugin-abicommand Installing this plugin will enable you to use AbiWord as a commanded daemon. %endif %if %{enable_abigimp} %package plugin-abigimp Summary: Enables editing of your images in The GIMP. Group: Applications/Productivity Requires: abiword %description plugin-abigimp Installing this plugin will allow AbiWord to transfer images to The GIMP for editing. %endif %if %{enable_aiksaurus} %package plugin-aiksaurus Summary: Plugin to allow abiword to connect with AikSaurus. Group: Applications/Productivity BuildRequires: Aiksaurus, AiksaurusGTK Requires: abiword, Aiksaurus, AiksaurusGTK %description plugin-aiksaurus Plugin to allow abiword to connect with AikSaurus. Go to http://www.aiksaurus.com and download AikSaurus and AikSaurusGTK. %endif %if %{enable_babelfish} %package plugin-babelfish Summary: Plugin to allow abiword to show babelfish translations. Group: Applications/Productivity Requires: abiword %description plugin-babelfish Installing this plugin will allow abiword fetch babelfish translations for selected text. %endif %if %{enable_bz2abw} %package plugin-bz2abw Summary: Plugin to allow abiword documents compressed with bzip2 Group: Applications/Productivity Requires: bzip2, abiword BuildRequires: bzip2-devel %description plugin-bz2abw Installing this plugin will allow abiword to open abiword documents compressed with bzip2. %endif %if %{enable_festvox} %package plugin-festvox Summary: Plugin for festvox Group: Applications/Productivity Requires: abiword %description plugin-festvox Plugin for festvox %endif %if %{enable_freetranslation} %package plugin-freetranslation Summary: Plugin to allow abiword to connect with freetranslation. Group: Applications/Productivity Requires: abiword %description plugin-freetranslation Plugin to allow abiword to connect with freetranslation. %endif %if %{enable_gdict} %package plugin-gdict Summary: Plugin to allow abiword to use gdict Group: Applications/Productivity Requires: abiword %description plugin-gdict Plugin to allow abiword to use gdict %endif %if %{enable_gdkpixbuf} && ! %{enable_gnome} %package plugin-gdkpixbuf Summary: Plugin to allow abiword to import several image types with gdk-pixbuf Group: Applications/Productivity Requires: gdk-pixbuf, abiword BuildRequires: gdk-pixbuf-devel %description plugin-gdkpixbuf Installing this plugin will allow abiword to import all image types supported by gdk-pixbuf. %endif %if %{enable_html} %package plugin-html Summary: Plugin to enable import of arbitrary HTML documents (experimental) Group: Applications/Productivity Requires: libxml2, abiword BuildRequires: libxml2-devel %description plugin-html Installing this plugin will allow abiword to import of arbitrary HTML documents (experimental) %endif %if %{enable_imagemagick} %package plugin-imagemagick Summary: Plugin to allow abiword to use imagemagick. Group: Applications/Productivity Requires: abiword %description plugin-imagemagick Installing this plugin will allow abiword to use imagemagick. %endif %if %{enable_openwriter} %package plugin-openwriter Summary: Plugin to allow abiword to read/write OpenWriter and StartWriter documents Group: Applications/Productivity Requires: abiword %description plugin-openwriter Plugin to allow abiword to read/write OpenWriter and StartWriter documents %endif %if %{enable_shell} %package plugin-shell Summary: Enables redirection of shell output into AbiWord. Group: Applications/Productivity Requires: abiword %description plugin-shell Installing this plugin will allow AbiWord to read output of shell commands. %endif %if %{enable_urldict} %package plugin-urldict Summary: Plugin to allow abiword to use dict through a web browser Group: Applications/Productivity Requires: abiword %description plugin-urldict Installing this plugin will allow abiword to use dict through a web browser on selected text. %endif %if %{enable_wikipedia} %package plugin-wikipedia Summary: Plugin to allow abiword to connect with WikiPedia. Group: Applications/Productivity Requires: abiword %description plugin-wikipedia Plugin to allow abiword to connect with WikiPedia. %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. #%package help-de-DE #Summary: AbiWord Help for de-DE #Group: Documentation # #%description help-de-DE #This is the AbiWord Manual for German. %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_abicommand} %{plugin_abigimp} %{plugin_aiksaurus} %{plugin_babelfish} %{plugin_bz2abw} %{plugin_eml} %{plugin_festvox} %{plugin_freetranslation} %{plugin_gdict} %{plugin_gdkpixbuf} %{plugin_html} %{plugin_imagemagick} %{plugin_openwriter} %{plugin_shell} %{plugin_urldict} %{plugin_wikipedia} %{plugin_tests} 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 %if %{enable_gnome} %attr(644,root,root) %{prefix}/share/gnome/apps/Applications/abiword.desktop %attr(644,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiGdkPixbuf.* %files embeddable %attr(-,root,root) %{ABIPREFIX}/oaf %endif %if %{enable_abicommand} %files plugin-abicommand %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiCommand.* %endif %if %{enable_abigimp} %files plugin-abigimp %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiGimp.* %endif %if %{enable_aiksaurus} %files plugin-aiksaurus %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAikSaurusABI.* %endif %if %{enable_babelfish} %files plugin-babelfish %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiBabelfish.* %endif %if %{enable_bz2abw} %files plugin-bz2abw %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libBZ2Abw.* %endif %if %{enable_festvox} %files plugin-festvox %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiFestVox.* %endif %if %{enable_freetranslation} %files plugin-freetranslation %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiFreeTranslation.* %endif %if %{enable_gdict} %files plugin-gdict %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libGdictAbiPlugin.* %endif %if %{enable_gdkpixbuf} && ! %{enable_gnome} %files plugin-gdkpixbuf %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiGdkPixbuf.* %endif %if %{enable_html} %files plugin-html %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiHTML.* %endif %if %{enable_openwriter} %files plugin-openwriter %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libOpenWriter.* %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiSDW.* %endif %if %{enable_shell} %files plugin-shell %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libScriptHappy.* %endif %if %{enable_urldict} %files plugin-urldict %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiURLDict.* %endif %if %{enable_wikipedia} %files plugin-wikipedia %attr(-,root,root) %{ABIPREFIX}/AbiSuite/AbiWord/plugins/libAbiWikipedia.* %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 * 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...