File xalan-c.spec of Package xalan-c
#
# spec file for package xalan-c (Version 1.10.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: xalan-c
BuildRequires: Xerces-c-devel gcc-c++ libicu-devel
License: Apache Software License ..
Group: Productivity/Publishing/XML
AutoReqProv: on
Version: 1.10.0
Release: 3
%define tarver 1_10_0
Summary: An XSLT Transformation Engine in C++
Url: http://xml.apache.org/xalan-c/
Source: Xalan-C_%{tarver}-src.tar.bz2
Patch: xalan-c-svn-20090415.patch
Patch1: %{name}-%{version}-lib64.patch
Patch2: %{name}-%{version}-fixes.patch
Patch3: %{name}-%{version}-optflags.patch
Patch4: %{name}-%{version}-gcc4.patch
Patch5: %{name}-%{version}-fix_build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: Xalan-C = 1.10.0
Obsoletes: Xalan-C <= 1.10.0
%description
Xalan is an XSL processor for transforming XML documents into HTML,
text, or other XML document types. Xalan-C++ represents an almost
complete and robust C++ reference implementation of the W3C
Recommendations for XSL Transformations (XSLT) and the XML Path
Language (XPath).
Authors:
--------
Apache Project <xalan-dev@xml.apache.org>
%package -n libxalan-c110
License: Apache Software License ..
# Requires: Xalan-c = %{version}
Group: Development/Libraries/C and C++
Summary: An XSLT Transformation Engine in C++
Provides: libXalan-c110 = 1.10.0
Obsoletes: libXalan-c110 <= 1.10.0
%description -n libxalan-c110
Xalan is an XSL processor for transforming XML documents into HTML,
text, or other XML document types. Xalan-C++ represents an almost
complete and robust C++ reference implementation of the W3C
Recommendations for XSL Transformations (XSLT) and the XML Path
Language (XPath).
Authors:
--------
Apache Project <xalan-dev@xml.apache.org>
%package -n libxalan-c-devel
License: Apache Software License ..
Requires: libxalan-c110 = %{version}
Provides: Xalan-c-devel = 1.9
Obsoletes: Xalan-c-devel <= 1.9
Provides: libXalan-c-devel = 1.10.0
Obsoletes: libXalan-c-devel <= 1.10.0
Group: Development/Libraries/C and C++
Summary: An XSLT Transformation Engine in C++ - Development Files
%description -n libxalan-c-devel
Xalan is an XSL processor for transforming XML documents into HTML,
text, or other XML document types. Xalan-C++ represents an almost
complete and a robust C++ reference implementation of the W3C
Recommendations for XSL Transformations (XSLT) and the XML Path
Language (XPath).
This package contains files needed for development with Xalanc
Authors:
--------
Apache Project <xalan-dev@xml.apache.org>
%prep
%setup -q -n xml-xalan
%patch -p1
%patch1
%patch2
%patch3
%patch4
%patch5
%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
DIRS=$(find -type d)
%{?suse_update_config:%{suse_update_config -f $DIRS}}
[ -f configure.in ] && autoreconf -f -i # libtoolize --copy --force
export XERCESCROOT=%{_prefix}
export XALANCROOT=$RPM_BUILD_DIR/xml-xalan/c
export ICUROOT=%{_prefix}
export RPM_OPT_FLAGS
cd c
chmod a+x runConfigure
chmod a+x conf*
%ifarch alpha ppc64 s390x sparc64 x86_64
BITSTOBUILD=64
%else
BITSTOBUILD=32
%endif
./runConfigure -p linux -c gcc -x g++ -t icu -m inmem -b "$BITSTOBUILD" -P %{_prefix} -C --libdir -C %{_libdir}
# Parallel build is broken, disable it for now
make
make samples
make tests
%install
export XERCESCROOT=%{_prefix}
export XALANCROOT=$RPM_BUILD_DIR/xml-xalan/c
export ICUROOT=%{_prefix}
pushd c
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
ln -s testXSLT $RPM_BUILD_ROOT%{_bindir}/xsl-c
ln -s testXPath $RPM_BUILD_ROOT%{_bindir}/xpath-c
echo PREFIX=$RPM_BUILD_ROOT%{_prefix} >> Makefile.incl
echo prefix=$RPM_BUILD_ROOT%{_prefix} >> Makefile.incl
echo libdir=$RPM_BUILD_ROOT%{_libdir} >> Makefile.incl
echo "XSL_LIB_DIR=\${OUTDIR}/%{_lib}" >> Makefile.incl
echo "ICULIB_LOC=\${ICUROOT}/%{_lib}" >> Makefile.incl
make install
rm -f $RPM_BUILD_ROOT%{_libdir}/libicu*
popd
%clean
rm -rf "$RPM_BUILD_ROOT"
%post -n libxalan-c110 -p /sbin/ldconfig
%postun -n libxalan-c110 -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc c/LICENSE
%{_bindir}/*
%files -n libxalan-c110
%defattr(-, root, root)
%{_libdir}/*.so.*
%files -n libxalan-c-devel
%defattr(-,root,root)
%{_includedir}/xalanc/
%{_libdir}/*.so
%changelog