perl-dbi.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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.37
  27. %define V_sql_statement 1.005
  28. %define V_dbd_anydata 0.05
  29. %define V_dbd_sprite 0.44
  30. %define V_dbd_sqlite 0.25
  31. %define V_dbd_mysql 2.1026
  32. %define V_dbd_pg 1.22
  33. %define V_dbd_oracle 1.14
  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: 20030528
  44. Release: 20030528
  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. Patch0: perl-dbi.patch
  59. # build information
  60. Prefix: %{l_prefix}
  61. BuildRoot: %{l_buildroot}
  62. BuildPreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net
  63. PreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net
  64. %if "%{with_dbd_mysql}" == "yes"
  65. BuildPreReq: MYSQL
  66. PreReq: MYSQL
  67. %endif
  68. %if "%{with_dbd_pg}" == "yes"
  69. BuildPreReq: postgresql
  70. PreReq: postgresql
  71. %endif
  72. %if "%{with_dbd_oracle}" == "yes"
  73. BuildPreReq: ORACLE
  74. PreReq: ORACLE
  75. %endif
  76. AutoReq: no
  77. AutoReqProv: no
  78. %description
  79. Various modules for using the DBI API of Perl:
  80. - DBI (%{V_dbi})
  81. - SQL::Statement (%{V_sql_statement})
  82. - DBD::AnyData (%{V_dbd_anydata})
  83. - DBD::Sprite (%{V_dbd_sprite})
  84. - DBD::SQLite (%{V_dbd_sqlite})
  85. - DBD::mysql (%{V_dbd_mysql}) [%{with_dbd_mysql}]
  86. - DBD::Pg (%{V_dbd_pg}) [%{with_dbd_pg}]
  87. - DBD::Oracle (%{V_dbd_oracle}) [%{with_dbd_oracle}]
  88. %prep
  89. %setup0 -q -c
  90. %setup1 -q -T -D -a 1
  91. %setup2 -q -T -D -a 2
  92. %setup3 -q -T -D -a 3
  93. %setup4 -q -T -D -a 4
  94. %setup5 -q -T -D -a 5
  95. %setup6 -q -T -D -a 6
  96. %setup7 -q -T -D -a 7
  97. %patch0 -p0
  98. %build
  99. %install
  100. # perform common prolog operations
  101. %{l_prefix}/bin/perl-openpkg prolog
  102. # build and install individual modules
  103. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE0}
  104. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE1}
  105. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE2}
  106. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE3}
  107. %{l_prefix}/bin/perl-openpkg install -d %{SOURCE4}
  108. %if "%{with_dbd_mysql}" == "yes"
  109. # build DBD::mysql
  110. ( cd DBD-mysql-%{V_dbd_mysql}
  111. # (determines MySQL header/lib paths via mysql_config in $PATH)
  112. %{l_prefix}/bin/perl-openpkg install
  113. )
  114. %endif
  115. %if "%{with_dbd_pg}" == "yes"
  116. # build DBD::Pg
  117. ( cd DBD-Pg-%{V_dbd_pg}
  118. %{l_shtool} subst -e 's;-lpq;-lpq -lssl -lcrypto -lcrypt;' Makefile.PL
  119. POSTGRES_HOME=%{l_prefix}
  120. export POSTGRES_HOME
  121. %{l_prefix}/bin/perl-openpkg install
  122. )
  123. %endif
  124. %if "%{with_dbd_oracle}" == "yes"
  125. # build DBD::oracle
  126. ( cd DBD-Oracle-%{V_dbd_oracle}
  127. ORACLE_HOME="`%{l_prefix}/etc/rc --query oracle_home`"
  128. export ORACLE_HOME
  129. %{l_prefix}/bin/perl-openpkg install
  130. )
  131. %endif
  132. # perform common epilog operations
  133. %{l_prefix}/bin/perl-openpkg epilog
  134. %files -f files
  135. %clean
  136. rm -rf $RPM_BUILD_ROOT