cego.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. ##
  2. ## cego.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2011 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_cego 2.7.18
  26. %define V_lfc 1.1.36
  27. %define V_lfcxml 1.0.24
  28. %define V_jdbc 1.3.0
  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: 20110323
  41. # package options
  42. %option with_jdbc no
  43. # list of sources
  44. Source0: http://www.lemke-it.com/lfc-%{V_lfc}.tar.gz
  45. Source1: http://www.lemke-it.com/lfcxml-%{V_lfcxml}.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. BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, make
  51. PreReq: OpenPKG, openpkg >= 20100101
  52. BuildPreReq: readline, ncurses
  53. PreReq: readline, ncurses
  54. %if "%{with_jdbc}" == "yes"
  55. PreReq: java, JAVA-JDK
  56. %endif
  57. %description
  58. Cego is a Relational Database Management System (RDBMS). Cego
  59. supports transactional SQL query requests in a multithreaded
  60. architecture. For high availablility requirements, Cego supports a
  61. database shadowing feature. Several compute nodes can be defined in
  62. a Cego database configuration, where each node is able to manage a
  63. number of so called table sets. For each tableset, a backup node
  64. can be defined, which runs is recover mode for the corresponding
  65. tableset. If required, the tableset can be switched to the backup
  66. node and this node gets the active node for the tableset.
  67. %track
  68. prog cego:lfc = {
  69. version = %{V_lfc}
  70. url = http://www.lemke-it.com/opensource.html
  71. regex = lfc-(__VER__)\.tar\.gz
  72. }
  73. prog cego:lfcxml = {
  74. version = %{V_lfcxml}
  75. url = http://www.lemke-it.com/opensource.html
  76. regex = lfcxml-(__VER__)\.tar\.gz
  77. }
  78. prog cego:cego = {
  79. version = %{V_cego}
  80. url = http://www.lemke-it.com/opensource.html
  81. regex = cego-(__VER__)\.tar\.gz
  82. }
  83. prog cego:jdbc = {
  84. version = %{V_jdbc}
  85. url = http://www.lemke-it.com/opensource.html
  86. regex = cegojdbc-(__VER__)\.jar
  87. }
  88. %prep
  89. %setup -q -c
  90. %setup -q -T -D -a 1
  91. %setup -q -T -D -a 2
  92. %patch -p0
  93. %build
  94. ( cd lfc-%{V_lfc}
  95. export CC="%{l_cc}"
  96. export CXX="%{l_cxx}"
  97. export CFLAGS="%{l_cflags -O}"
  98. export CXXFLAGS="%{l_cxxflags -O}"
  99. export CPPFLAGS="%{l_cppflags}"
  100. export LDFLAGS="%{l_ldflags}"
  101. ./configure \
  102. --prefix=%{l_prefix}
  103. %{l_make} %{l_mflags -O}
  104. ln -s src lfc
  105. ) || exit $?
  106. ( cd lfcxml-%{V_lfcxml}
  107. export CC="%{l_cc}"
  108. export CXX="%{l_cxx}"
  109. export CFLAGS="%{l_cflags -O}"
  110. export CXXFLAGS="%{l_cxxflags -O}"
  111. export CPPFLAGS="%{l_cppflags} -I`pwd`/../lfc-%{V_lfc} -I`pwd`/../lfc-%{V_lfc}/src"
  112. export LDFLAGS="%{l_ldflags} -L`pwd`/../lfc-%{V_lfc}/src"
  113. ./configure \
  114. --prefix=%{l_prefix}
  115. %{l_make} %{l_mflags -O}
  116. ln -s src lfc
  117. ) || exit $?
  118. ( cd cego-%{V_cego}
  119. export CC="%{l_cc}"
  120. export CXX="%{l_cxx}"
  121. export CFLAGS="%{l_cflags -O}"
  122. export CXXFLAGS="%{l_cxxflags -O}"
  123. export CPPFLAGS="%{l_cppflags} -I`pwd`/../lfc-%{V_lfc} -I`pwd`/../lfc-%{V_lfc}/src -I`pwd`/../lfcxml-%{V_lfcxml} -I`pwd`/../lfcxml-%{V_lfcxml}/src"
  124. export LDFLAGS="%{l_ldflags} -L`pwd`/../lfc-%{V_lfc}/src -L`pwd`/../lfcxml-%{V_lfcxml}/src"
  125. export LIBS=""
  126. case "%{l_platform -t}" in
  127. *-linux* ) LIBS="$LIBS -lcrypt" ;;
  128. *-freebsd* ) LIBS="$LIBS -lcrypt" ;;
  129. *-netbsd* ) LIBS="$LIBS -lcrypt" ;;
  130. esac
  131. ./configure \
  132. --prefix=%{l_prefix}
  133. %{l_make} %{l_mflags -O}
  134. ) || exit $?
  135. %install
  136. %{l_shtool} mkdir -f -p -m 755 \
  137. $RPM_BUILD_ROOT%{l_prefix}/bin \
  138. $RPM_BUILD_ROOT%{l_prefix}/lib \
  139. $RPM_BUILD_ROOT%{l_prefix}/include/cego
  140. ( cd lfc-%{V_lfc}
  141. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  142. ) || exit $?
  143. ( cd lfcxml-%{V_lfcxml}
  144. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  145. ) || exit $?
  146. ( cd cego-%{V_cego}
  147. %{l_make} %{l_mflags} install PREFIX=$RPM_BUILD_ROOT%{l_prefix}
  148. ) || exit $?
  149. %if "%{with_jdbc}" == "yes"
  150. %{l_shtool} mkdir -f -p -m 755 \
  151. $RPM_BUILD_ROOT%{l_prefix}/lib/cego
  152. %{l_shtool} install -c -m 644 \
  153. %{SOURCE cegojdbc-%{V_jdbc}.jar} \
  154. $RPM_BUILD_ROOT%{l_prefix}/lib/cego/cego.jar
  155. %endif
  156. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  157. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  158. %files -f files
  159. %clean