cego.spec 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. ##
  2. ## cego.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2020 OpenPKG Project <http://openpkg.org/>
  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.45.20
  26. %define V_lfcbase 1.14.4
  27. %define V_lfcxml 1.2.10
  28. %define V_jdbc 1.9.6
  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 Project
  35. Distribution: OpenPKG Community
  36. Class: PLUS
  37. Group: Database
  38. License: GPL
  39. Version: %{V_cego}
  40. Release: 20200830
  41. # package options
  42. %option with_jdbc no
  43. # list of sources
  44. Source0: http://www.lemke-it.com/lfcbase-%{V_lfcbase}.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 >= 20160101, gcc, gcc::with_cxx = yes, make
  51. PreReq: OpenPKG, openpkg >= 20160101
  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:lfcbase = {
  69. version = %{V_lfcbase}
  70. url = http://www.lemke-it.com/litexec?request=pubcego&user=&lang=en
  71. regex = lfcbase-(__VER__)\.tar\.gz
  72. }
  73. prog cego:lfcxml = {
  74. version = %{V_lfcxml}
  75. url = http://www.lemke-it.com/litexec?request=pubcego&user=&lang=en
  76. regex = lfcxml-(__VER__)\.tar\.gz
  77. }
  78. prog cego:cego = {
  79. version = %{V_cego}
  80. url = http://www.lemke-it.com/litexec?request=pubcego&user=&lang=en
  81. regex = cego-(__VER__)\.tar\.gz
  82. }
  83. prog cego:jdbc = {
  84. version = %{V_jdbc}
  85. url = http://www.lemke-it.com/litexec?request=pubcego&user=&lang=en
  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 -d cego-%{V_cego}
  93. %build
  94. ( cd lfcbase-%{V_lfcbase}
  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. --disable-shared
  104. %{l_make} %{l_mflags -O}
  105. ln -s src lfcbase
  106. ) || exit $?
  107. ( cd lfcxml-%{V_lfcxml}
  108. export CC="%{l_cc}"
  109. export CXX="%{l_cxx}"
  110. export CFLAGS="%{l_cflags -O}"
  111. export CXXFLAGS="%{l_cxxflags -O}"
  112. export CPPFLAGS="%{l_cppflags} -I`pwd`/../lfcbase-%{V_lfcbase} -I`pwd`/../lfcbase-%{V_lfcbase}/src"
  113. export LDFLAGS="%{l_ldflags} -L`pwd`/../lfcbase-%{V_lfcbase}/src"
  114. ./configure \
  115. --prefix=%{l_prefix} \
  116. --disable-shared
  117. %{l_make} %{l_mflags -O}
  118. ln -s src lfcxml
  119. ) || exit $?
  120. ( cd cego-%{V_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`/../lfcbase-%{V_lfcbase} -I`pwd`/../lfcbase-%{V_lfcbase}/src -I`pwd`/../lfcxml-%{V_lfcxml} -I`pwd`/../lfcxml-%{V_lfcxml}/src"
  126. export LDFLAGS="%{l_ldflags} -L`pwd`/../lfcbase-%{V_lfcbase}/src -L`pwd`/../lfcbase-%{V_lfcbase}/src/.libs -L`pwd`/../lfcxml-%{V_lfcxml}/src -L`pwd`/../lfcxml-%{V_lfcxml}/src/.libs"
  127. export LIBS="-llfcxml -llfcbase"
  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. --disable-shared
  136. %{l_make} %{l_mflags -O}
  137. ) || exit $?
  138. %install
  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 lfcbase-%{V_lfcbase}
  144. # %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  145. ) || exit $?
  146. ( cd lfcxml-%{V_lfcxml}
  147. # %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  148. ) || exit $?
  149. ( cd cego-%{V_cego}
  150. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  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. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  160. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  161. %files -f files
  162. %clean