cego.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. ##
  2. ## cego.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. # FIXME: rse: seems to have problems during building if old version is still installed
  25. # package version
  26. %define V_base 1.1.0
  27. %define V_xml 1.0.9
  28. %define V_cego 1.3.2
  29. # package information
  30. Name: cego
  31. Summary: Relational Database Management System (RDBMS)
  32. URL: http://www.lemke-it.com/opensource.html
  33. Vendor: Björn Lemke
  34. Packager: OpenPKG Foundation e.V.
  35. Distribution: OpenPKG Community
  36. Class: EVAL
  37. Group: Database
  38. License: GPL
  39. Version: %{V_cego}
  40. Release: 20070824
  41. # list of sources
  42. Source0: http://www.lemke-it.com/base-%{V_base}.tar.gz
  43. Source1: http://www.lemke-it.com/xml-%{V_xml}.tar.gz
  44. Source2: http://www.lemke-it.com/cego-%{V_cego}.tar.gz
  45. Patch0: cego.patch
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, gcc::with_cxx = yes, make
  50. PreReq: OpenPKG, openpkg >= 20060823
  51. BuildPreReq: readline, ncurses
  52. PreReq: readline, ncurses
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. Cego is a Relational Database Management System (RDBMS). Cego
  57. supports transactional SQL query requests in a multithreaded
  58. architecture. For high availablility requirements, Cego supports a
  59. database shadowing feature. Several compute nodes can be defined in
  60. a Cego database configuration, where each node is able to manage a
  61. number of so called table sets. For each tableset, a backup node
  62. can be defined, which runs is recover mode for the corresponding
  63. tableset. If required, the tableset can be switched to the backup
  64. node and this node gets the active node for the tableset.
  65. %track
  66. prog cego:base = {
  67. version = %{V_base}
  68. url = http://www.lemke-it.com/opensource.html
  69. regex = base-(__VER__)\.tar\.gz
  70. }
  71. prog cego:xml = {
  72. version = %{V_xml}
  73. url = http://www.lemke-it.com/opensource.html
  74. regex = xml-(__VER__)\.tar\.gz
  75. }
  76. prog cego:cego = {
  77. version = %{V_cego}
  78. url = http://www.lemke-it.com/opensource.html
  79. regex = cego-(__VER__)\.tar\.gz
  80. }
  81. %prep
  82. %setup -q -c
  83. %setup -q -T -D -a 1
  84. %setup -q -T -D -a 2
  85. %patch -p0
  86. %build
  87. ( cd base
  88. export CC="%{l_cc}"
  89. export CXX="%{l_cxx}"
  90. export CFLAGS="%{l_cflags -O}"
  91. export CXXFLAGS="%{l_cxxflags -O}"
  92. export CPPFLAGS="%{l_cppflags}"
  93. export LDFLAGS="%{l_ldflags}"
  94. ./configure \
  95. --prefix=%{l_prefix}
  96. %{l_make} %{l_mflags -O}
  97. ) || exit $?
  98. ( cd xml
  99. export CC="%{l_cc}"
  100. export CXX="%{l_cxx}"
  101. export CFLAGS="%{l_cflags -O}"
  102. export CXXFLAGS="%{l_cxxflags -O}"
  103. export CPPFLAGS="%{l_cppflags} -I`pwd`/../base/src"
  104. export LDFLAGS="%{l_ldflags} -L`pwd`/../base/src"
  105. ./configure \
  106. --prefix=%{l_prefix}
  107. %{l_make} %{l_mflags -O}
  108. ) || exit $?
  109. ( cd cego
  110. export CC="%{l_cc}"
  111. export CXX="%{l_cxx}"
  112. export CFLAGS="%{l_cflags -O}"
  113. export CXXFLAGS="%{l_cxxflags -O}"
  114. export CPPFLAGS="%{l_cppflags} -I`pwd`/../base/src -I`pwd`/../xml/src"
  115. export LDFLAGS="%{l_ldflags} -L`pwd`/../base/src -L`pwd`/../xml/src"
  116. export LIBS=""
  117. case "%{l_platform -t}" in
  118. *-linux* ) LIBS="$LIBS -lcrypt" ;;
  119. *-freebsd* ) LIBS="$LIBS -lcrypt" ;;
  120. *-netbsd* ) LIBS="$LIBS -lcrypt" ;;
  121. esac
  122. ./configure \
  123. --prefix=%{l_prefix}
  124. %{l_make} %{l_mflags -O}
  125. ) || exit $?
  126. %install
  127. rm -rf $RPM_BUILD_ROOT
  128. %{l_shtool} mkdir -f -p -m 755 \
  129. $RPM_BUILD_ROOT%{l_prefix}/bin \
  130. $RPM_BUILD_ROOT%{l_prefix}/lib \
  131. $RPM_BUILD_ROOT%{l_prefix}/include/cego
  132. ( cd base
  133. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  134. ) || exit $?
  135. ( cd xml
  136. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  137. ) || exit $?
  138. ( cd cego
  139. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  140. ) || exit $?
  141. mv $RPM_BUILD_ROOT%{l_prefix}/include/*.h \
  142. $RPM_BUILD_ROOT%{l_prefix}/include/cego/
  143. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  144. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  145. %files -f files
  146. %clean
  147. rm -rf $RPM_BUILD_ROOT