mybatis.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ##
  2. ## mybatis.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. # package versions
  24. %define V_mybatis 3.5.6
  25. %define V_jdbc_mysql 5.1.49
  26. %define V_jdbc_pgsql 42.2.17
  27. %define V_jdbc_h2 2019-03-13
  28. # package information
  29. Name: mybatis
  30. Summary: RDBMS Schema-Migration and Java ORM Toolkit
  31. URL: http://www.mybatis.org/
  32. Vendor: C. Begin, B. Goodin, L. Meadors, N. Maves, J. Butler, K. Grabfelder
  33. Packager: OpenPKG Project
  34. Distribution: OpenPKG Community
  35. Class: EVAL
  36. Group: Database
  37. License: Apache
  38. Version: %{V_mybatis}
  39. Release: 20201013
  40. # list of sources
  41. Source0: https://github.com/mybatis/mybatis-3/releases/download/mybatis-%{V_mybatis}/mybatis-%{V_mybatis}.zip
  42. Source1: http://www.h2database.com/h2-%{V_jdbc_h2}.zip
  43. Source2: http://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-J/mysql-connector-java-%{V_jdbc_mysql}.tar.gz
  44. Source3: http://jdbc.postgresql.org/download/postgresql-%{V_jdbc_pgsql}.jar
  45. Source4: mybatis.sh
  46. # build information
  47. BuildPreReq: OpenPKG, openpkg >= 20160101
  48. PreReq: OpenPKG, openpkg >= 20160101, java, JAVA-JDK
  49. %description
  50. The MyBatis data mapper framework makes it easier to use a
  51. relational database with object-oriented applications. MyBatis
  52. couples objects with stored procedures or SQL statements using a
  53. XML descriptor. Simplicity is the biggest advantage of the MyBatis
  54. data mapper over object relational mapping tools. To use the MyBatis
  55. data mapper, you rely on your own objects, XML, and SQL. There is
  56. little to learn that you don't already know. With the MyBatis Data
  57. Mapper, you have the full power of both SQL and stored procedures
  58. at your fingertips. Additionally, MyBatis has a command-line
  59. interface (CLI) based tool for flexible database schema migrations
  60. (upgrading/downgrading).
  61. %track
  62. prog mybatis = {
  63. version = %{V_mybatis}
  64. url = https://github.com/mybatis/mybatis-3/releases
  65. regex = mybatis-(__VER__)\.zip
  66. }
  67. prog mybatis:jdbc-mysql = {
  68. version = %{V_jdbc_mysql}
  69. url = http://dev.mysql.com/downloads/connector/j/5.1.html
  70. regex = mysql-connector-java-(__VER__)\.tar\.gz
  71. }
  72. prog mybatis:jdbc-pgsql = {
  73. version = %{V_jdbc_pgsql}
  74. url = https://jdbc.postgresql.org/download.html
  75. regex = postgresql-(\d+\.\d+\.\d+)\.jar
  76. }
  77. prog mybatis:jdbc-h2 = {
  78. version = %{V_jdbc_h2}
  79. url = http://www.h2database.com/html/download.html
  80. regex = h2-(\d+-\d+-\d+)\.zip
  81. }
  82. %prep
  83. %setup -q -c
  84. %setup -q -T -D -a 1
  85. %setup -q -T -D -a 2
  86. %build
  87. %install
  88. %{l_shtool} mkdir -f -p -m 755 \
  89. $RPM_BUILD_ROOT%{l_prefix}/bin \
  90. $RPM_BUILD_ROOT%{l_prefix}/lib/mybatis \
  91. $RPM_BUILD_ROOT%{l_prefix}/lib/mybatis/optional \
  92. $RPM_BUILD_ROOT%{l_prefix}/lib/mybatis/jdbc
  93. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  94. %{SOURCE mybatis.sh} \
  95. $RPM_BUILD_ROOT%{l_prefix}/bin/mybatis-migrate
  96. %{l_shtool} install -c -m 644 \
  97. mybatis-%{V_mybatis}/mybatis-%{V_mybatis}.jar \
  98. $RPM_BUILD_ROOT%{l_prefix}/lib/mybatis/mybatis.jar
  99. %{l_shtool} install -c -m 644 \
  100. h2/bin/h2-*.jar \
  101. $RPM_BUILD_ROOT%{l_prefix}/lib/mybatis/jdbc/jdbc-h2.jar
  102. %{l_shtool} install -c -m 644 \
  103. mysql-*/mysql-connector-java-*-bin.jar \
  104. $RPM_BUILD_ROOT%{l_prefix}/lib/mybatis/jdbc/jdbc-mysql.jar
  105. %{l_shtool} install -c -m 644 \
  106. %{SOURCE3} \
  107. $RPM_BUILD_ROOT%{l_prefix}/lib/mybatis/jdbc/jdbc-pgsql.jar
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  109. %files -f files
  110. %clean