| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- ##
- ## abiword.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_opkg 2.0.2
- %define V_dist 2.0.2
- # package information
- Name: abiword
- Summary: X11 Word Processor
- URL: http://www.abisource.com/
- Vendor: Abi the Ant
- Packager: The OpenPKG Project
- Distribution: OpenPKG [EVAL]
- Group: Editor
- License: GPL
- Version: %{V_opkg}
- Release: 20031211
- # list of sources
- Source0: http://download.sourceforge.net/sourceforge/abiword/abiword-%{V_dist}.tar.gz
- Source1: http://download.sourceforge.net/sourceforge/abiword/abispell-de-DE.i386.tar.gz
- Source2: http://download.sourceforge.net/sourceforge/abiword/abispell-de-DE.ppc.tar.gz
- Source3: http://download.sourceforge.net/sourceforge/abiword/abispell-es-ES.i386.tar.gz
- Source4: http://download.sourceforge.net/sourceforge/abiword/abispell-es-ES.ppc.tar.gz
- Source5: http://download.sourceforge.net/sourceforge/abiword/abispell-fr-FR.i386.tar.gz
- Source6: http://download.sourceforge.net/sourceforge/abiword/abispell-fr-FR.ppc.tar.gz
- Source7: http://download.sourceforge.net/sourceforge/abiword/abispell-en-GB.i386.tar.gz
- Source8: http://download.sourceforge.net/sourceforge/abiword/abispell-en-GB.ppc.tar.gz
- Source9: http://download.sourceforge.net/sourceforge/abiword/abispell-en-US.i386.tar.gz
- Source10: http://download.sourceforge.net/sourceforge/abiword/abispell-en-US.ppc.tar.gz
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20030103, fontconfig, pkgconfig, fribidi, xft
- BuildPreReq: glib2, glib2::with_threads = yes, libiconv, libglade, zlib, popt
- PreReq: OpenPKG, openpkg >= 20030103, fontconfig
- AutoReq: no
- AutoReqProv: no
- %description
- AbiWord is a free word processing program suitable for typing
- papers, letters, reports, memos, and more. It can take advantage
- of the functionality provided by each operating system it runs
- on, such as image loading or printing capabilities.
- AbiWord is able to read and write all industry standard document
- types, such as OpenOffice.org documents, HTML web pages,
- WordPerfect documents, Microsoft Word documents, Rich Text
- Format documents, and many more.
- %prep
- %setup0 -q -n abiword-%{V_dist}
- case "%{l_platform -t}" in
- sparc*-* )
- %setup2 -q -n abiword-%{V_dist} -T -D -a 2
- %setup4 -q -n abiword-%{V_dist} -T -D -a 4
- %setup6 -q -n abiword-%{V_dist} -T -D -a 6
- %setup8 -q -n abiword-%{V_dist} -T -D -a 8
- %setup10 -q -n abiword-%{V_dist} -T -D -a 10
- ;;
- *86*-* )
- %setup1 -q -n abiword-%{V_dist} -T -D -a 1
- %setup3 -q -n abiword-%{V_dist} -T -D -a 3
- %setup5 -q -n abiword-%{V_dist} -T -D -a 5
- %setup7 -q -n abiword-%{V_dist} -T -D -a 7
- %setup9 -q -n abiword-%{V_dist} -T -D -a 9
- ;;
- * ) echo "Only SPARC and ix86 architectures are supported" 2>&1
- exit 1
- ;;
- esac
- %{l_shtool} subst \
- -e 's;^\( *ICONV_CONST char\);//\1;' \
- -e 's;\( *return iconv( cd, \);\1in;' \
- abi/src/af/util/xp/ut_iconv.cpp
- %{l_shtool} subst \
- -e 's;^\(ABIWORD_APP_NAME=\)"AbiWord";\1"abiword";' \
- -e 's;^\(ABIWORD_APP_LIBDIR=\)"AbiWord";\1"abiword";' \
- -e 's;GTK_CFLAGS=;GTK_CFLAGS=%{l_cppflags} ;' \
- abi/configure
- %{l_shtool} subst \
- -e 's;\((pkgdatadir)\/\)AbiWord;\1abiword;' \
- ./abi/src/af/xap/unix/GNUmakefile.in \
- ./abi/src/wp/ap/unix/GNUmakefile.in \
- ./abi/GNUmakefile.in
- %{l_shtool} subst \
- -e 's;AbiWord.*\(/scripts\);abiword\1;' \
- abi/src/af/util/xp/ut_PerlBindings.cpp
- %{l_shtool} subst \
- -e 's;\(AP_PREF_DEFAULT_SpellDirectory.*\)dictionary;\1abiword/dictionary;' \
- abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h
- %{l_shtool} subst \
- -e 's;\(/dictionary/\);/abiword\1;' \
- abi/src/other/spell/xp/ispell_checker.cpp
- %{l_shtool} subst \
- -e 's;\(/templates/\);/abiword\1;' \
- abi/src/text/ptbl/xp/pd_Document.cpp \
- abi/src/wp/ap/qnx/ap_QNXDialog_New.cpp \
- abi/src/wp/ap/unix/ap_UnixDialog_New.cpp \
- abi/src/wp/ap/xp/ap_EditMethods.cpp
- %{l_shtool} subst \
- -e 's;\(/clipart/\);/abiword\1;' \
- abi/src/wp/ap/xp/ap_EditMethods.cpp
- %{l_shtool} subst \
- -e 's;putenv(MYLANG;putenv((char *)MYLANG;' \
- abi/src/af/xap/unix/xap_UnixEncodingManager.cpp
- %{l_shtool} subst \
- -e 's;\(/icons/\);/abiword\1;' \
- abi/src/af/xap/unix/gnome/xap_UnixGnomeDlg_About.cpp \
- abi/src/af/xap/unix/xap_UnixFrameImpl.cpp
- %{l_shtool} subst \
- -e 's;AbiWord.*\(/plugins\);abiword\1;' \
- abi/src/af/xap/unix/xap_UnixDlg_PluginManager.cpp \
- abi/src/wp/ap/unix/ap_UnixApp.cpp \
- abi/src/wp/ap/unix/GNUmakefile.in \
- abi/src/wp/ap/unix/Makefile
- %{l_shtool} subst \
- -e 's;AbiWord.*\(/help\);abiword\1;' \
- abi/src/af/xap/unix/xap_UnixDialogHelper.cpp \
- abi/src/af/xap/win/xap_Win32DialogBase.cpp \
- abi/src/af/xap/win/xap_Win32Dlg_FontChooser.cpp \
- abi/src/wp/ap/win/ap_Win32Dialog_Background.cpp \
- abi/src/wp/ap/xp/ap_EditMethods.cpp
- %{l_shtool} subst \
- -e 's;\(docdir.*share/\)AbiSuite-2.0/AbiWord/help;\1abiword/help;' \
- abiword-docs/Makefile
- %{l_shtool} subst \
- -e 's;/@PACKAGE@;;' \
- abi/src/af/ev/qnx/GNUmakefile.in \
- abi/src/af/ev/unix/GNUmakefile.in \
- abi/src/af/ev/xp/GNUmakefile.in \
- abi/src/af/ev/GNUmakefile.in \
- abi/src/af/gr/qnx/GNUmakefile.in \
- abi/src/af/gr/unix/GNUmakefile.in \
- abi/src/af/gr/xp/GNUmakefile.in \
- abi/src/af/gr/GNUmakefile.in \
- abi/src/af/util/qnx/GNUmakefile.in \
- abi/src/af/util/unix/GNUmakefile.in \
- abi/src/af/util/xp/GNUmakefile.in \
- abi/src/af/util/GNUmakefile.in \
- abi/src/af/xap/qnx/GNUmakefile.in \
- abi/src/af/xap/unix/gnome/GNUmakefile.in \
- abi/src/af/xap/unix/GNUmakefile.in \
- abi/src/af/xap/xp/GNUmakefile.in \
- abi/src/af/xap/GNUmakefile.in \
- abi/src/af/GNUmakefile.in \
- abi/src/bindings/perl/GNUmakefile.in \
- abi/src/bindings/GNUmakefile.in \
- abi/src/other/GNUmakefile.in \
- abi/src/other/spell/xp/GNUmakefile.in \
- abi/src/other/spell/GNUmakefile.in \
- abi/src/other/ttftool/unix/GNUmakefile.in \
- abi/src/other/ttftool/GNUmakefile.in \
- abi/src/text/fmt/xp/GNUmakefile.in \
- abi/src/text/fmt/GNUmakefile.in \
- abi/src/text/ptbl/xp/GNUmakefile.in \
- abi/src/text/ptbl/GNUmakefile.in \
- abi/src/text/GNUmakefile.in \
- abi/src/tools/cdump/qnx/GNUmakefile.in \
- abi/src/tools/cdump/xp/GNUmakefile.in \
- abi/src/tools/cdump/GNUmakefile.in \
- abi/src/tools/pfa2afm/unix/GNUmakefile.in \
- abi/src/tools/pfa2afm/GNUmakefile.in \
- abi/src/tools/scripts/unix/GNUmakefile.in \
- abi/src/tools/scripts/GNUmakefile.in \
- abi/src/tools/GNUmakefile.in \
- abi/src/tools/ttftool/unix/GNUmakefile.in \
- abi/src/tools/ttftool/GNUmakefile.in \
- abi/src/wp/ap/qnx/GNUmakefile.in \
- abi/src/wp/ap/unix/gnome/GNUmakefile.in \
- abi/src/wp/ap/unix/GNUmakefile.in \
- abi/src/wp/ap/xp/GNUmakefile.in \
- abi/src/wp/ap/GNUmakefile.in \
- abi/src/wp/main/qnx/GNUmakefile.in \
- abi/src/wp/main/unix/GNUmakefile.in \
- abi/src/wp/main/xp/GNUmakefile.in \
- abi/src/wp/main/GNUmakefile.in \
- abi/src/wp/impexp/qnx/GNUmakefile.in \
- abi/src/wp/impexp/unix/GNUmakefile.in \
- abi/src/wp/impexp/xp/GNUmakefile.in \
- abi/src/wp/impexp/GNUmakefile.in \
- abi/src/wp/GNUmakefile.in \
- abi/src/GNUmakefile.in \
- abi/GNUmakefile.in
- %build
- # calculate X11 paths in advance
- l_x11_incdir=`%{l_prefix}/etc/rc --query x11_incdir`
- l_x11_libdir=`%{l_prefix}/etc/rc --query x11_libdir`
- l_x11_pkgdir=`%{l_prefix}/etc/rc --query x11_libdir | \
- %{l_shtool} subst -e 's;\(.*\)/[^/]*;\1/libdata/pkgconfig;'`
- # move to a dedicated build directory
- mkdir build
- cd build
- # finally configure
- CC="%{l_cc}" \
- CXX="%{l_cxx}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cxxflags -O}" \
- CPPFLAGS="%{l_cppflags atk pango gtk2} -I%{l_prefix}/lib/gtk2/include -I$l_x11_incdir" \
- LDFLAGS="%{l_ldflags}" \
- ABI_XML_CONFIG="%{l_prefix}/bin/xml2-config" \
- PKG_CONFIG_PATH=%{l_prefix}/lib/pkgconfig:$l_x11_pkgdir \
- ../abi/configure \
- --prefix=%{l_prefix} \
- --with-x \
- --x-includes=$l_x11_incdir \
- --x-libraries=$l_x11_libdir \
- --enable-threads \
- --disable-gnome \
- --disable-shared \
- --enable-extra-optimization \
- --with-zlib=%{l_prefix} \
- --with-libpng=%{l_prefix} \
- --with-libiconv=%{l_prefix} \
- --with-libxml2=%{l_prefix} \
- --with-popt=%{l_prefix} \
- --with-pspell=no \
- --with-libjpeg-prefix=%{l_prefix}
- # build the program
- %{l_make} %{l_mflags}
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/docs \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/glade \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/clipart \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/dictionary \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/templates \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/icons
- %{l_shtool} install -c -s -m 755 \
- build/src/wp/main/unix/AbiWord-2.0 \
- $RPM_BUILD_ROOT%{l_prefix}/bin/abiword
- %{l_shtool} install -c -m 644 \
- abiword-docs/man/abiword.8 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man8/
- %{l_shtool} install -c -m 644 \
- abiword-docs/Manual/en/Abiword_Manual.abw \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/docs/
- cp -rf abiword-docs/help $RPM_BUILD_ROOT%{l_prefix}/share/abiword/
- %{l_shtool} install -c -m 644 \
- abi/src/af/xap/unix/*.glade \
- abi/src/wp/ap/unix/*.glade \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/glade/
- %{l_shtool} install -c -m 644 \
- abidistfiles/clipart/* \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/clipart/
- %{l_shtool} install -c -m 644 \
- abidistfiles/dictionary/*.xml \
- usr/share/AbiSuite/dictionary/deutsch.hash \
- usr/share/AbiSuite/dictionary/espanol.hash \
- usr/share/AbiSuite/dictionary/francais.hash \
- usr/share/AbiSuite/dictionary/british.hash \
- usr/share/AbiSuite/dictionary/american.hash \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/dictionary/
- %{l_shtool} install -c -m 644 \
- abidistfiles/templates/* \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/templates/
- %{l_shtool} install -c -m 644 \
- abidistfiles/icons/* \
- $RPM_BUILD_ROOT%{l_prefix}/share/abiword/icons/
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|