perl-dbi.spec 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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.32
  27. %define V_sql_statement 1.005
  28. %define V_dbd_anydata 0.05
  29. %define V_dbd_sprite 0.40
  30. %define V_dbd_sqlite 0.23
  31. %define V_dbd_mysql 2.1022
  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: 20030113
  44. Release: 20030113
  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 >= 5.8.0, perl-net
  62. PreReq: OpenPKG, openpkg >= 20030103, perl >= 5.8.0, 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. AutoReq: no
  72. AutoReqProv: no
  73. %description
  74. Various modules for using the DBI API of Perl:
  75. - DBI (%{V_dbi})
  76. - SQL::Statement (%{V_sql_statement})
  77. - DBD::AnyData (%{V_dbd_anydata})
  78. - DBD::Sprite (%{V_dbd_sprite})
  79. - DBD::SQLite (%{V_dbd_sqlite})
  80. - DBD::mysql (%{V_dbd_mysql}) [%{with_dbd_mysql}]
  81. - DBD::Pg (%{V_dbd_pg}) [%{with_dbd_pg}]
  82. - DBD::Oracle (%{V_dbd_oracle}) [%{with_dbd_oracle}]
  83. %prep
  84. %setup0 -q -c
  85. %setup1 -q -T -D -a 1
  86. %setup2 -q -T -D -a 2
  87. %setup3 -q -T -D -a 3
  88. %setup4 -q -T -D -a 4
  89. %setup5 -q -T -D -a 5
  90. %setup6 -q -T -D -a 6
  91. %setup7 -q -T -D -a 7
  92. %build
  93. # FIXME: remove in later version of DBD::Sprite
  94. ( cd DBD-Sprite-%{V_dbd_sprite}
  95. %{l_shtool} subst -e '/realclean/d' Makefile.PL )
  96. %install
  97. # perform common prolog operations
  98. %{l_prefix}/bin/perl-openpkg prolog
  99. # build and install individual modules
  100. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE0}
  101. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE1}
  102. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE2}
  103. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE3}
  104. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE4}
  105. %if "%{with_dbd_mysql}" == "yes"
  106. # build DBD::mysql
  107. ( cd DBD-mysql-%{V_dbd_mysql}
  108. # (determines MySQL header/lib paths via mysql_config in $PATH)
  109. %{l_prefix}/bin/perl-openpkg install
  110. )
  111. %endif
  112. %if "%{with_dbd_pg}" == "yes"
  113. # build DBD::Pg
  114. ( cd DBD-Pg-%{V_dbd_pg}
  115. POSTGRES_HOME=%{l_prefix}
  116. export POSTGRES_HOME
  117. %{l_prefix}/bin/perl-openpkg install
  118. )
  119. %endif
  120. %if "%{with_dbd_oracle}" == "yes"
  121. # build DBD::oracle
  122. ( cd DBD-Oracle-%{V_dbd_oracle}
  123. ORACLE_HOME=${ORACLE_HOME-%{l_prefix}}
  124. export ORACLE_HOME
  125. %{l_prefix}/bin/perl-openpkg install
  126. )
  127. %endif
  128. # perform common epilog operations
  129. %{l_prefix}/bin/perl-openpkg epilog
  130. %files -f files
  131. %clean
  132. rm -rf $RPM_BUILD_ROOT