perl-dbi.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. ##
  2. ## perl-dbi.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # versions of individual parts
  26. %define V_dbi 1.39
  27. %define V_sql_statement 1.005
  28. %define V_dbd_anydata 0.06
  29. %define V_dbd_sprite 0.44
  30. %define V_dbd_sqlite 0.28
  31. %define V_dbd_mysql 2.9003
  32. %define V_dbd_pg 1.31
  33. %define V_dbd_oracle 1.14
  34. %define V_dbd_odbc 1.06
  35. # package information
  36. Name: perl-dbi
  37. Summary: Perl Modules for use with DBI API
  38. URL: http://www.cpan.org/
  39. Vendor: Perl Community
  40. Packager: The OpenPKG Project
  41. Distribution: OpenPKG [BASE]
  42. Group: Language
  43. License: GPL/Artistic
  44. Version: 20031128
  45. Release: 20031128
  46. # package options
  47. %option with_dbd_mysql no
  48. %option with_dbd_pg no
  49. %option with_dbd_oracle no
  50. %option with_dbd_odbc no
  51. # list of sources
  52. Source0: http://www.cpan.org/modules/by-module/DBI/DBI-%{V_dbi}.tar.gz
  53. Source1: http://www.cpan.org/modules/by-module/SQL/SQL-Statement-%{V_sql_statement}.tar.gz
  54. Source2: http://www.cpan.org/modules/by-module/DBD/DBD-AnyData-%{V_dbd_anydata}.tar.gz
  55. Source3: http://www.cpan.org/modules/by-module/DBD/DBD-Sprite-%{V_dbd_sprite}.tar.gz
  56. Source4: http://www.cpan.org/modules/by-module/DBD/DBD-SQLite-%{V_dbd_sqlite}.tar.gz
  57. Source5: http://www.cpan.org/modules/by-module/DBD/DBD-mysql-%{V_dbd_mysql}.tar.gz
  58. Source6: http://www.cpan.org/modules/by-module/DBD/DBD-Pg-%{V_dbd_pg}.tar.gz
  59. Source7: http://www.cpan.org/modules/by-module/DBD/DBD-Oracle-%{V_dbd_oracle}.tar.gz
  60. Source8: http://www.cpan.org/modules/by-module/DBD/DBD-ODBC-%{V_dbd_odbc}.tar.gz
  61. Patch0: perl-dbi.patch
  62. # build information
  63. Prefix: %{l_prefix}
  64. BuildRoot: %{l_buildroot}
  65. BuildPreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net
  66. PreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net
  67. %if "%{with_dbd_mysql}" == "yes"
  68. BuildPreReq: mysql
  69. PreReq: mysql
  70. %endif
  71. %if "%{with_dbd_pg}" == "yes"
  72. BuildPreReq: postgresql
  73. PreReq: postgresql
  74. %endif
  75. %if "%{with_dbd_oracle}" == "yes"
  76. BuildPreReq: ORACLE
  77. PreReq: ORACLE
  78. %endif
  79. %if "%{with_dbd_odbc}" == "yes"
  80. BuildPreReq: unixodbc
  81. PreReq: unixodbc
  82. %endif
  83. AutoReq: no
  84. AutoReqProv: no
  85. %description
  86. Various modules for using the DBI API of Perl:
  87. - DBI (%{V_dbi})
  88. - SQL::Statement (%{V_sql_statement})
  89. - DBD::AnyData (%{V_dbd_anydata})
  90. - DBD::Sprite (%{V_dbd_sprite})
  91. - DBD::SQLite (%{V_dbd_sqlite})
  92. - DBD::mysql (%{V_dbd_mysql}) [%{with_dbd_mysql}]
  93. - DBD::Pg (%{V_dbd_pg}) [%{with_dbd_pg}]
  94. - DBD::Oracle (%{V_dbd_oracle}) [%{with_dbd_oracle}]
  95. - DBD::ODBC (%{V_dbd_odbc}) [%{with_dbd_odbc}]
  96. %prep
  97. %setup0 -q -c
  98. %setup1 -q -T -D -a 1
  99. %setup2 -q -T -D -a 2
  100. %setup3 -q -T -D -a 3
  101. %setup4 -q -T -D -a 4
  102. %setup5 -q -T -D -a 5
  103. %setup6 -q -T -D -a 6
  104. %setup7 -q -T -D -a 7
  105. %setup8 -q -T -D -a 8
  106. %patch0 -p0
  107. %build
  108. %install
  109. # perform common prolog operations
  110. %{l_prefix}/bin/perl-openpkg prolog
  111. # build and install individual modules
  112. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE0}
  113. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE1}
  114. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE2}
  115. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE3}
  116. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE4}
  117. %if "%{with_dbd_mysql}" == "yes"
  118. # build DBD::mysql
  119. ( cd DBD-mysql-%{V_dbd_mysql}
  120. # (determines MySQL header/lib paths via mysql_config in $PATH)
  121. %{l_prefix}/bin/perl-openpkg install
  122. ) || exit $?
  123. %endif
  124. %if "%{with_dbd_pg}" == "yes"
  125. # build DBD::Pg
  126. ( cd DBD-Pg-%{V_dbd_pg}
  127. %{l_shtool} subst -e 's;-lpq;-lpq -lssl -lcrypto -lcrypt;' Makefile.PL
  128. POSTGRES_HOME=%{l_prefix}
  129. export POSTGRES_HOME
  130. %{l_prefix}/bin/perl-openpkg install
  131. ) || exit $?
  132. %endif
  133. %if "%{with_dbd_oracle}" == "yes"
  134. # build DBD::oracle
  135. ( cd DBD-Oracle-%{V_dbd_oracle}
  136. ORACLE_HOME="`%{l_prefix}/etc/rc --query oracle_home`"
  137. export ORACLE_HOME
  138. %{l_prefix}/bin/perl-openpkg install
  139. ) || exit $?
  140. %endif
  141. %if "%{with_dbd_odbc}" == "yes"
  142. # build DBD::odbc
  143. ( cd DBD-ODBC-%{V_dbd_odbc}
  144. ODBCHOME="%{l_prefix}"
  145. DBROOT=
  146. export ODBCHOME DBROOT
  147. %{l_prefix}/bin/perl-openpkg install
  148. ) || exit $?
  149. %endif
  150. # perform common epilog operations
  151. %{l_prefix}/bin/perl-openpkg epilog
  152. %files -f files
  153. %clean
  154. rm -rf $RPM_BUILD_ROOT