cego.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. ##
  2. ## cego.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # FIXME: rse: seems to have problems during building if old version is still installed
  24. # package version
  25. %define V_base 1.1.6
  26. %define V_xml 1.0.11
  27. %define V_cego 2.0.4
  28. %define V_jdbc 1.2.9
  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: 20080428
  41. # package options
  42. %option with_jdbc no
  43. # list of sources
  44. Source0: http://www.lemke-it.com/base-%{V_base}.tar.gz
  45. Source1: http://www.lemke-it.com/xml-%{V_xml}.tar.gz
  46. Source2: http://www.lemke-it.com/cego-%{V_cego}.tar.gz
  47. Source3: http://www.lemke-it.com/cegojdbc-%{V_jdbc}.jar
  48. Patch0: cego.patch
  49. # build information
  50. Prefix: %{l_prefix}
  51. BuildRoot: %{l_buildroot}
  52. BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, gcc::with_cxx = yes, make
  53. PreReq: OpenPKG, openpkg >= 20060823
  54. BuildPreReq: readline, ncurses
  55. PreReq: readline, ncurses
  56. %if "%{with_jdbc}" == "yes"
  57. PreReq: java, JAVA-JDK
  58. %endif
  59. AutoReq: no
  60. AutoReqProv: no
  61. %description
  62. Cego is a Relational Database Management System (RDBMS). Cego
  63. supports transactional SQL query requests in a multithreaded
  64. architecture. For high availablility requirements, Cego supports a
  65. database shadowing feature. Several compute nodes can be defined in
  66. a Cego database configuration, where each node is able to manage a
  67. number of so called table sets. For each tableset, a backup node
  68. can be defined, which runs is recover mode for the corresponding
  69. tableset. If required, the tableset can be switched to the backup
  70. node and this node gets the active node for the tableset.
  71. %track
  72. prog cego:base = {
  73. version = %{V_base}
  74. url = http://www.lemke-it.com/opensource.html
  75. regex = base-(__VER__)\.tar\.gz
  76. }
  77. prog cego:xml = {
  78. version = %{V_xml}
  79. url = http://www.lemke-it.com/opensource.html
  80. regex = xml-(__VER__)\.tar\.gz
  81. }
  82. prog cego:cego = {
  83. version = %{V_cego}
  84. url = http://www.lemke-it.com/opensource.html
  85. regex = cego-(__VER__)\.tar\.gz
  86. }
  87. prog cego:jdbc = {
  88. version = %{V_jdbc}
  89. url = http://www.lemke-it.com/opensource.html
  90. regex = cegojdbc-(__VER__)\.jar
  91. }
  92. %prep
  93. %setup -q -c
  94. %setup -q -T -D -a 1
  95. %setup -q -T -D -a 2
  96. %patch -p0
  97. %build
  98. ( cd base
  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}"
  104. export LDFLAGS="%{l_ldflags}"
  105. ./configure \
  106. --prefix=%{l_prefix}
  107. %{l_make} %{l_mflags -O}
  108. ) || exit $?
  109. ( cd xml
  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"
  115. export LDFLAGS="%{l_ldflags} -L`pwd`/../base/src"
  116. ./configure \
  117. --prefix=%{l_prefix}
  118. %{l_make} %{l_mflags -O}
  119. ) || exit $?
  120. ( cd cego
  121. export CC="%{l_cc}"
  122. export CXX="%{l_cxx}"
  123. export CFLAGS="%{l_cflags -O}"
  124. export CXXFLAGS="%{l_cxxflags -O}"
  125. export CPPFLAGS="%{l_cppflags} -I`pwd`/../base/src -I`pwd`/../xml/src"
  126. export LDFLAGS="%{l_ldflags} -L`pwd`/../base/src -L`pwd`/../xml/src"
  127. export LIBS=""
  128. case "%{l_platform -t}" in
  129. *-linux* ) LIBS="$LIBS -lcrypt" ;;
  130. *-freebsd* ) LIBS="$LIBS -lcrypt" ;;
  131. *-netbsd* ) LIBS="$LIBS -lcrypt" ;;
  132. esac
  133. ./configure \
  134. --prefix=%{l_prefix}
  135. %{l_make} %{l_mflags -O}
  136. ) || exit $?
  137. %install
  138. rm -rf $RPM_BUILD_ROOT
  139. %{l_shtool} mkdir -f -p -m 755 \
  140. $RPM_BUILD_ROOT%{l_prefix}/bin \
  141. $RPM_BUILD_ROOT%{l_prefix}/lib \
  142. $RPM_BUILD_ROOT%{l_prefix}/include/cego
  143. ( cd base
  144. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  145. ) || exit $?
  146. ( cd xml
  147. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  148. ) || exit $?
  149. ( cd cego
  150. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  151. ) || exit $?
  152. %if "%{with_jdbc}" == "yes"
  153. %{l_shtool} mkdir -f -p -m 755 \
  154. $RPM_BUILD_ROOT%{l_prefix}/lib/cego
  155. %{l_shtool} install -c -m 644 \
  156. %{SOURCE cegojdbc-%{V_jdbc}.jar} \
  157. $RPM_BUILD_ROOT%{l_prefix}/lib/cego/cego.jar
  158. %endif
  159. mv $RPM_BUILD_ROOT%{l_prefix}/include/*.h \
  160. $RPM_BUILD_ROOT%{l_prefix}/include/cego/
  161. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  162. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  163. %files -f files
  164. %clean
  165. rm -rf $RPM_BUILD_ROOT