redland.spec 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. ##
  2. ## redland.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_raptor 1.4.16
  26. %define V_rasqal 0.9.14
  27. %define V_redland 1.0.6
  28. # package information
  29. Name: redland
  30. Summary: Redland RDF Application Framework
  31. URL: http://librdf.org/
  32. Vendor: Dave Beckett
  33. Packager: OpenPKG Foundation e.V.
  34. Distribution: OpenPKG Community
  35. Class: EVAL
  36. Group: XML
  37. License: LGPL/GPL
  38. Version: %{V_redland}
  39. Release: 20071001
  40. # list of sources
  41. Source0: http://download.librdf.org/source/raptor-%{V_raptor}.tar.gz
  42. Source1: http://download.librdf.org/source/rasqal-%{V_rasqal}.tar.gz
  43. Source2: http://download.librdf.org/source/redland-%{V_redland}.tar.gz
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130
  48. PreReq: OpenPKG, openpkg >= 20040130
  49. BuildPreReq: libxml, libxslt, pcre, openssl, sqlite
  50. PreReq: libxml, libxslt, pcre, openssl, sqlite
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. Redland is a set of free software libraries that provide support
  55. for the Resource Description Framework (RDF). It provides APIs for
  56. manipulating the RDF graph, triples, URIs and Literals; Parsers
  57. and Serializers for reading and writing RDF; Storage for graphs.
  58. %track
  59. prog redland:raptor = {
  60. version = %{V_raptor}
  61. url = http://librdf.org/
  62. regex = raptor-(__VER__)\.tar\.gz
  63. }
  64. prog redland:rasqal = {
  65. version = %{V_rasqal}
  66. url = http://librdf.org/
  67. regex = rasqal-(__VER__)\.tar\.gz
  68. }
  69. prog redland:redland = {
  70. version = %{V_redland}
  71. url = http://librdf.org/
  72. regex = redland-(__VER__)\.tar\.gz
  73. }
  74. %prep
  75. %setup -q -c
  76. %setup -q -D -T -a 1
  77. %setup -q -D -T -a 2
  78. %build
  79. ln -s raptor-%{V_raptor} raptor
  80. ln -s rasqal-%{V_rasqal} rasqal
  81. ln -s redland-%{V_redland} redland
  82. ( cd raptor-%{V_raptor}
  83. CC="%{l_cc}" \
  84. CFLAGS="%{l_cflags -O}" \
  85. CPPFLAGS="%{l_cppflags}" \
  86. LDFLAGS="%{l_ldflags}" \
  87. ./configure \
  88. --prefix=%{l_prefix} \
  89. --datarootdir=%{l_prefix} \
  90. --includedir=%{l_prefix}/include/redland \
  91. --with-xml2-config=%{l_prefix}/bin/xml2-config \
  92. --with-xslt-config=%{l_prefix}/bin/xslt-config \
  93. --with-xml-parser=libxml \
  94. --with-www=xml \
  95. --disable-shared
  96. %{l_make} %{l_mflags -O}
  97. ) || exit $?
  98. ( cd rasqal-%{V_rasqal}
  99. CC="%{l_cc}" \
  100. CFLAGS="%{l_cflags -O}" \
  101. CPPFLAGS="%{l_cppflags}" \
  102. LDFLAGS="%{l_ldflags}" \
  103. ./configure \
  104. --prefix=%{l_prefix} \
  105. --includedir=%{l_prefix}/include/redland \
  106. --enable-pcre \
  107. --with-pcre-config=%{l_prefix}/bin/pcre-config \
  108. --with-regex-library=pcre \
  109. --enable-xml2 \
  110. --with-xml2-config=%{l_prefix}/bin/xml2-config \
  111. --with-raptor=internal \
  112. --with-redland=internal \
  113. --disable-shared
  114. %{l_make} %{l_mflags -O}
  115. ) || exit $?
  116. ( cd redland-%{V_redland}
  117. for subdir in raptor rasqal; do
  118. rm -rf $subdir/*
  119. ( echo "#!/bin/sh"; echo "exit 0" ) >$subdir/configure; chmod a+x $subdir/configure
  120. ( echo "all:"; echo "install:" ) >$subdir/Makefile
  121. ln -s ../../$subdir/src $subdir/src
  122. done
  123. CC="%{l_cc}" \
  124. CFLAGS="%{l_cflags -O}" \
  125. CPPFLAGS="%{l_cppflags}" \
  126. LDFLAGS="%{l_ldflags}" \
  127. RAPTOR_CONFIG="`pwd`/../raptor-%{V_raptor}/src/raptor-config" \
  128. RASQAL_CONFIG="`pwd`/../rasqal-%{V_rasqal}/src/rasqal-config" \
  129. ./configure \
  130. --prefix=%{l_prefix} \
  131. --includedir=%{l_prefix}/include/redland \
  132. --enable-release \
  133. --disable-assertions \
  134. --with-raptor=internal \
  135. --with-rasqal=internal \
  136. --with-openssl-digests \
  137. --with-sqlite=yes \
  138. --with-sqlite-version=3 \
  139. --without-threestore \
  140. --without-mysql \
  141. --without-postgresql \
  142. --disable-shared
  143. %{l_make} %{l_mflags -O}
  144. ) || exit $?
  145. %install
  146. rm -rf $RPM_BUILD_ROOT
  147. ( cd raptor-%{V_raptor}
  148. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  149. ) || exit $?
  150. ( cd rasqal-%{V_rasqal}
  151. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  152. ) || exit $?
  153. ( cd redland-%{V_redland}
  154. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  155. ) || exit $?
  156. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  157. rm -rf $RPM_BUILD_ROOT%{l_prefix}/gtk-doc
  158. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  159. %files -f files
  160. %clean
  161. rm -rf $RPM_BUILD_ROOT