You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
243 lines
9.5 KiB
243 lines
9.5 KiB
## |
|
## abiword.spec -- OpenPKG RPM Specification |
|
## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/> |
|
## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com> |
|
## Copyright (c) 2000-2005 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 information |
|
Name: abiword |
|
Summary: X11 Word Processor |
|
URL: http://www.abisource.com/ |
|
Vendor: Abi the Ant |
|
Packager: The OpenPKG Project |
|
Distribution: OpenPKG |
|
Class: EVAL |
|
Group: Editor |
|
License: GPL |
|
Version: 2.2.2 |
|
Release: 20041215 |
|
|
|
# list of sources |
|
Source0: http://osdn.dl.sourceforge.net/sourceforge/abiword/abiword-%{version}.tar.gz |
|
Source1: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-de-DE.i386.tar.gz |
|
Source2: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-de-DE.ppc.tar.gz |
|
Source3: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-es-ES.i386.tar.gz |
|
Source4: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-es-ES.ppc.tar.gz |
|
Source5: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-fr-FR.i386.tar.gz |
|
Source6: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-fr-FR.ppc.tar.gz |
|
Source7: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-en-GB.i386.tar.gz |
|
Source8: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-en-GB.ppc.tar.gz |
|
Source9: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-en-US.i386.tar.gz |
|
Source10: http://osdn.dl.sourceforge.net/sourceforge/abiword/abispell-en-US.ppc.tar.gz |
|
Patch0: abiword.patch |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20040130, fontconfig, pkgconfig, fribidi, xft |
|
BuildPreReq: glib2, glib2::with_threads = yes, libiconv, libglade, zlib, popt, png |
|
PreReq: OpenPKG, openpkg >= 20040130, 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. |
|
|
|
%track |
|
prog abiword = { |
|
version = %{version} |
|
url = http://prdownloads.sourceforge.net/abiword/ |
|
regex = abiword-(\d+\.\d+\.\d+(-\d+)?)\.tar\.gz |
|
} |
|
|
|
%prep |
|
%setup -q |
|
%patch -p0 |
|
case "%{l_platform -t}" in |
|
sun4*-* ) |
|
%setup -q -T -D -a 2 |
|
%setup -q -T -D -a 4 |
|
%setup -q -T -D -a 6 |
|
%setup -q -T -D -a 8 |
|
%setup -q -T -D -a 10 |
|
;; |
|
*86*-* ) |
|
%setup -q -T -D -a 1 |
|
%setup -q -T -D -a 3 |
|
%setup -q -T -D -a 5 |
|
%setup -q -T -D -a 7 |
|
%setup -q -T -D -a 9 |
|
;; |
|
* ) echo "Only SPARC and ix86 architectures are supported" 2>&1 |
|
exit 1 |
|
;; |
|
esac |
|
%{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/barbarisms.cpp \ |
|
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-2.2\(/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 \ |
|
abiword-plugins/configure |
|
%{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;/@PACKAGE@;;' \ |
|
`find . -name "GNUmakefile.in" -print` |
|
|
|
%build |
|
# calculate X11 paths in advance |
|
l_x11_incdir=`%{l_rc} --query x11_incdir` |
|
l_x11_libdir=`%{l_rc} --query x11_libdir` |
|
l_x11_pkgdir=`%{l_rc} --query x11_libdir | \ |
|
%{l_shtool} subst -e 's;\(.*\)/[^/]*;\1/libdata/pkgconfig;'` |
|
|
|
# move to a dedicated build directory |
|
mkdir build |
|
cd build |
|
|
|
# finally configure |
|
( echo 'enable_dlopen=no' |
|
) >config.cache |
|
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} \ |
|
--cache-file=./config.cache \ |
|
--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.2 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/abiword |
|
%{l_shtool} install -c -m 644 \ |
|
abiword-docs/Manual/en/Abiword_Manual.abw \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/abiword/docs/ |
|
%{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 |
|
|
|
|