xalan-c.spec 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. ##
  2. ## xalan-c.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # FIXME: mlelstv: - does not build with newer xerces-c
  26. # package version
  27. %define V_opkg 1.5
  28. %define V_dist 1_5
  29. # package information
  30. Name: xalan-c
  31. Summary: XSLT processor
  32. URL: http://xml.apache.org/xalan-c/
  33. Vendor: Apache Software Foundation
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [JUNK]
  36. Group: Web
  37. License: Apache Software License 1.1
  38. Version: %{V_opkg}
  39. Release: 20030708
  40. # package options
  41. %option with_threads no
  42. # list of sources
  43. Source0: http://xml.apache.org/dist/xalan-c/Xalan-C_%{V_dist}-src.tar.gz
  44. Patch0: xalan-c.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 1.2.0, autoconf, gcc >= 3.2.2, make
  49. BuildPreReq: xerces-c >= 2.1.0, xerces-c::with_cpp_namespace = no
  50. PreReq: OpenPKG, openpkg >= 1.2.0, xerces-c >= 2.1.0
  51. PreReq: xerces-c::with_cpp_namespace = no
  52. %if "%{with_threads}" == "yes"
  53. BuildPreReq: xerces-c::with_threads = yes
  54. PreReq: xerces-c::with_threads = yes
  55. %else
  56. BuildPreReq: xerces-c::with_threads = no
  57. PreReq: xerces-c::with_threads = no
  58. %endif
  59. AutoReq: no
  60. AutoReqProv: no
  61. %description
  62. Xalan is an XSLT processor for transforming XML documents into HTML,
  63. text, or other XML document types.
  64. %prep
  65. %setup -q -n xml-xalan
  66. %patch -p0
  67. %build
  68. rm -rf $RPM_BUILD_ROOT
  69. ( XALANCROOT=`pwd`/c ;
  70. XERCESCROOT=%{l_prefix} ;
  71. export XALANCROOT XERCESCROOT ;
  72. cd c/src ;
  73. %{l_shtool} subst \
  74. -e 's;@l_ar@;ar cru;' \
  75. -e 's;@l_ranlib@;ranlib;' \
  76. Makefile.in ;
  77. pf=LINUX;
  78. cf="";
  79. lf="";
  80. %if "%{with_threads}" == "yes"
  81. case "%{l_target}" in
  82. *-freebsd*) pf=LINUX
  83. cf="-pthread"
  84. lf=""
  85. ;;
  86. *-linux*) pf=LINUX
  87. cf="-pthread"
  88. lf=""
  89. ;;
  90. *-hpux*) pf=LINUX
  91. cf="-pthread"
  92. lf=""
  93. ;;
  94. *-solaris*) pf=LINUX
  95. cf=""
  96. lf="-lpthread -lsocket -lnsl"
  97. ;;
  98. *-aix*) pf=AIX;
  99. cf="-pthread"
  100. lf=""
  101. ;;
  102. esac ;
  103. %else
  104. case "%{l_target}" in
  105. *-freebsd*) pf=LINUX
  106. cf=""
  107. lf=""
  108. ;;
  109. *-linux*) pf=LINUX
  110. cf=""
  111. lf=""
  112. ;;
  113. *-hpux*) pf=LINUX
  114. cf=""
  115. lf=""
  116. ;;
  117. *-solaris*) pf=LINUX
  118. cf=""
  119. lf="-lsocket -lnsl"
  120. ;;
  121. *-aix*) pf=AIX;
  122. cf=""
  123. lf=""
  124. ;;
  125. esac ;
  126. %endif
  127. CC="%{l_cc}" \
  128. CXX="%{l_cxx}" \
  129. CFLAGS="%{l_cflags -O}" \
  130. CXXFLAGS="%{l_cxxflags -O}" \
  131. LDFLAGS="%{l_ldflags} $lf" \
  132. ./configure \
  133. --prefix=%{l_prefix}
  134. %{l_make} %{l_mflags -O} PLATFORM="$pf"
  135. ) || exit $?
  136. %install
  137. %{l_shtool} mkdir -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  138. %{l_shtool} install -c -s -m 755 \
  139. bin/Xalan $RPM_BUILD_ROOT%{l_prefix}/bin/
  140. %{l_shtool} mkdir -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib
  141. %{l_shtool} install -c -m 644 \
  142. lib/libxalan-c.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  143. %{l_shtool} mkdir -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/share/xalan-c
  144. ( cd c
  145. for f in `find xdocs -type d \( -name CVS -prune -o -print \)`; do
  146. %{l_shtool} mkdir -m 755 $RPM_BUILD_ROOT%{l_prefix}/share/xalan-c/$f
  147. done
  148. for f in `find xdocs -type d -name CVS -prune -o -type f -print`; do
  149. %{l_shtool} install -c -m 644 \
  150. $f $RPM_BUILD_ROOT%{l_prefix}/share/xalan-c/
  151. done
  152. cd src
  153. for f in */*.hpp ; do
  154. %{l_shtool} mkdir -p -m 755 \
  155. $RPM_BUILD_ROOT%{l_prefix}/include/xalan/`dirname $f`
  156. %{l_shtool} install -c -m 644 \
  157. $f $RPM_BUILD_ROOT%{l_prefix}/include/xalan/
  158. done
  159. ) || exit $?
  160. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  161. %files -f files
  162. %clean
  163. rm -rf $RPM_BUILD_ROOT