perl-dbi.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. ##
  2. ## perl-dbi.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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.33
  27. %define V_sql_statement 1.005
  28. %define V_dbd_anydata 0.05
  29. %define V_dbd_sprite 0.43
  30. %define V_dbd_sqlite 0.24
  31. %define V_dbd_mysql 2.1025
  32. %define V_dbd_pg 1.21
  33. %define V_dbd_oracle 1.12
  34. # package information
  35. Name: perl-dbi
  36. Summary: Perl Modules for use with DBI API
  37. URL: http://www.cpan.org/
  38. Vendor: Perl Community
  39. Packager: The OpenPKG Project
  40. Distribution: OpenPKG [BASE]
  41. Group: Language
  42. License: GPL/Artistic
  43. Version: 20030227
  44. Release: 20030227
  45. # package options
  46. %option with_dbd_mysql no
  47. %option with_dbd_pg no
  48. %option with_dbd_oracle no
  49. # list of sources
  50. Source0: http://www.cpan.org/modules/by-module/DBI/DBI-%{V_dbi}.tar.gz
  51. Source1: http://www.cpan.org/modules/by-module/SQL/SQL-Statement-%{V_sql_statement}.tar.gz
  52. Source2: http://www.cpan.org/modules/by-module/DBD/DBD-AnyData-%{V_dbd_anydata}.tar.gz
  53. Source3: http://www.cpan.org/modules/by-module/DBD/DBD-Sprite-%{V_dbd_sprite}.tar.gz
  54. Source4: http://www.cpan.org/modules/by-module/DBD/DBD-SQLite-%{V_dbd_sqlite}.tar.gz
  55. Source5: http://www.cpan.org/modules/by-module/DBD/DBD-mysql-%{V_dbd_mysql}.tar.gz
  56. Source6: http://www.cpan.org/modules/by-module/DBD/DBD-Pg-%{V_dbd_pg}.tar.gz
  57. Source7: http://www.cpan.org/modules/by-module/DBD/DBD-Oracle-%{V_dbd_oracle}.tar.gz
  58. # build information
  59. Prefix: %{l_prefix}
  60. BuildRoot: %{l_buildroot}
  61. BuildPreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net
  62. PreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net
  63. %if "%{with_dbd_mysql}" == "yes"
  64. BuildPreReq: MYSQL
  65. PreReq: MYSQL
  66. %endif
  67. %if "%{with_dbd_pg}" == "yes"
  68. BuildPreReq: postgresql
  69. PreReq: postgresql
  70. %endif
  71. %if "%{with_dbd_oracle}" == "yes"
  72. BuildPreReq: ORACLE
  73. PreReq: ORACLE
  74. %endif
  75. AutoReq: no
  76. AutoReqProv: no
  77. %description
  78. Various modules for using the DBI API of Perl:
  79. - DBI (%{V_dbi})
  80. - SQL::Statement (%{V_sql_statement})
  81. - DBD::AnyData (%{V_dbd_anydata})
  82. - DBD::Sprite (%{V_dbd_sprite})
  83. - DBD::SQLite (%{V_dbd_sqlite})
  84. - DBD::mysql (%{V_dbd_mysql}) [%{with_dbd_mysql}]
  85. - DBD::Pg (%{V_dbd_pg}) [%{with_dbd_pg}]
  86. - DBD::Oracle (%{V_dbd_oracle}) [%{with_dbd_oracle}]
  87. %prep
  88. %setup0 -q -c
  89. %setup1 -q -T -D -a 1
  90. %setup2 -q -T -D -a 2
  91. %setup3 -q -T -D -a 3
  92. %setup4 -q -T -D -a 4
  93. %setup5 -q -T -D -a 5
  94. %setup6 -q -T -D -a 6
  95. %setup7 -q -T -D -a 7
  96. %build
  97. # FIXME: can be removed in a later version than DBD::Sprite 0.43
  98. ( cd DBD-Sprite-%{V_dbd_sprite}
  99. %{l_shtool} subst -e '/realclean/d' Makefile.PL )
  100. %install
  101. # perform common prolog operations
  102. %{l_prefix}/bin/perl-openpkg prolog
  103. # build and install individual modules
  104. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE0}
  105. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE1}
  106. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE2}
  107. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE3}
  108. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE4}
  109. %if "%{with_dbd_mysql}" == "yes"
  110. # build DBD::mysql
  111. ( cd DBD-mysql-%{V_dbd_mysql}
  112. # (determines MySQL header/lib paths via mysql_config in $PATH)
  113. %{l_prefix}/bin/perl-openpkg install
  114. )
  115. %endif
  116. %if "%{with_dbd_pg}" == "yes"
  117. # build DBD::Pg
  118. ( cd DBD-Pg-%{V_dbd_pg}
  119. %{l_shtool} subst -e 's;-lpq;-lpq -lssl -lcrypto -lcrypt;' Makefile.PL
  120. POSTGRES_HOME=%{l_prefix}
  121. export POSTGRES_HOME
  122. %{l_prefix}/bin/perl-openpkg install
  123. )
  124. %endif
  125. %if "%{with_dbd_oracle}" == "yes"
  126. # build DBD::oracle
  127. ( cd DBD-Oracle-%{V_dbd_oracle}
  128. ORACLE_HOME="`%{l_prefix}/etc/rc --query oracle_home`"
  129. export ORACLE_HOME
  130. %{l_prefix}/bin/perl-openpkg install
  131. )
  132. %endif
  133. # perform common epilog operations
  134. %{l_prefix}/bin/perl-openpkg epilog
  135. %files -f files
  136. %clean
  137. rm -rf $RPM_BUILD_ROOT