| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- ##
- ## xalan-c.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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.
- ##
- # FIXME: mlelstv: - does not build with newer xerces-c
- # package version
- %define V_opkg 1.5
- %define V_dist 1_5
- # package information
- Name: xalan-c
- Summary: XSLT processor
- URL: http://xml.apache.org/xalan-c/
- Vendor: Apache Software Foundation
- Packager: The OpenPKG Project
- Distribution: OpenPKG [JUNK]
- Group: Web
- License: Apache Software License 1.1
- Version: %{V_opkg}
- Release: 20030708
- # package options
- %option with_threads no
- # list of sources
- Source0: http://xml.apache.org/dist/xalan-c/Xalan-C_%{V_dist}-src.tar.gz
- Patch0: xalan-c.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 1.2.0, autoconf, gcc >= 3.2.2, make
- BuildPreReq: xerces-c >= 2.1.0, xerces-c::with_cpp_namespace = no
- PreReq: OpenPKG, openpkg >= 1.2.0, xerces-c >= 2.1.0
- PreReq: xerces-c::with_cpp_namespace = no
- %if "%{with_threads}" == "yes"
- BuildPreReq: xerces-c::with_threads = yes
- PreReq: xerces-c::with_threads = yes
- %else
- BuildPreReq: xerces-c::with_threads = no
- PreReq: xerces-c::with_threads = no
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Xalan is an XSLT processor for transforming XML documents into HTML,
- text, or other XML document types.
- %prep
- %setup -q -n xml-xalan
- %patch -p0
- %build
- rm -rf $RPM_BUILD_ROOT
- ( XALANCROOT=`pwd`/c ;
- XERCESCROOT=%{l_prefix} ;
- export XALANCROOT XERCESCROOT ;
- cd c/src ;
- %{l_shtool} subst \
- -e 's;@l_ar@;ar cru;' \
- -e 's;@l_ranlib@;ranlib;' \
- Makefile.in ;
- pf=LINUX;
- cf="";
- lf="";
- %if "%{with_threads}" == "yes"
- case "%{l_target}" in
- *-freebsd*) pf=LINUX
- cf="-pthread"
- lf=""
- ;;
- *-linux*) pf=LINUX
- cf="-pthread"
- lf=""
- ;;
- *-hpux*) pf=LINUX
- cf="-pthread"
- lf=""
- ;;
- *-solaris*) pf=LINUX
- cf=""
- lf="-lpthread -lsocket -lnsl"
- ;;
- *-aix*) pf=AIX;
- cf="-pthread"
- lf=""
- ;;
- esac ;
- %else
- case "%{l_target}" in
- *-freebsd*) pf=LINUX
- cf=""
- lf=""
- ;;
- *-linux*) pf=LINUX
- cf=""
- lf=""
- ;;
- *-hpux*) pf=LINUX
- cf=""
- lf=""
- ;;
- *-solaris*) pf=LINUX
- cf=""
- lf="-lsocket -lnsl"
- ;;
- *-aix*) pf=AIX;
- cf=""
- lf=""
- ;;
- esac ;
- %endif
- CC="%{l_cc}" \
- CXX="%{l_cxx}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cxxflags -O}" \
- LDFLAGS="%{l_ldflags} $lf" \
- ./configure \
- --prefix=%{l_prefix}
- %{l_make} %{l_mflags -O} PLATFORM="$pf"
- ) || exit $?
- %install
- %{l_shtool} mkdir -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
- %{l_shtool} install -c -s -m 755 \
- bin/Xalan $RPM_BUILD_ROOT%{l_prefix}/bin/
- %{l_shtool} mkdir -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib
- %{l_shtool} install -c -m 644 \
- lib/libxalan-c.a $RPM_BUILD_ROOT%{l_prefix}/lib/
- %{l_shtool} mkdir -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/share/xalan-c
- ( cd c
- for f in `find xdocs -type d \( -name CVS -prune -o -print \)`; do
- %{l_shtool} mkdir -m 755 $RPM_BUILD_ROOT%{l_prefix}/share/xalan-c/$f
- done
- for f in `find xdocs -type d -name CVS -prune -o -type f -print`; do
- %{l_shtool} install -c -m 644 \
- $f $RPM_BUILD_ROOT%{l_prefix}/share/xalan-c/
- done
- cd src
- for f in */*.hpp ; do
- %{l_shtool} mkdir -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/include/xalan/`dirname $f`
- %{l_shtool} install -c -m 644 \
- $f $RPM_BUILD_ROOT%{l_prefix}/include/xalan/
- done
- ) || exit $?
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|