## ## perl-dbi.spec -- OpenPKG RPM Specification ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH ## Copyright (c) 2000-2003 The OpenPKG Project ## Copyright (c) 2000-2003 Ralf S. Engelschall ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # versions of individual parts %define V_dbi 1.37 %define V_sql_statement 1.005 %define V_dbd_anydata 0.05 %define V_dbd_sprite 0.44 %define V_dbd_sqlite 0.25 %define V_dbd_mysql 2.9002 %define V_dbd_pg 1.22 %define V_dbd_oracle 1.14 %define V_dbd_odbc 1.06 # package information Name: perl-dbi Summary: Perl Modules for use with DBI API URL: http://www.cpan.org/ Vendor: Perl Community Packager: The OpenPKG Project Distribution: OpenPKG [BASE] Group: Language License: GPL/Artistic Version: 20030701 Release: 20030701 # package options %option with_dbd_mysql no %option with_dbd_pg no %option with_dbd_oracle no %option with_dbd_odbc no # list of sources Source0: http://www.cpan.org/modules/by-module/DBI/DBI-%{V_dbi}.tar.gz Source1: http://www.cpan.org/modules/by-module/SQL/SQL-Statement-%{V_sql_statement}.tar.gz Source2: http://www.cpan.org/modules/by-module/DBD/DBD-AnyData-%{V_dbd_anydata}.tar.gz Source3: http://www.cpan.org/modules/by-module/DBD/DBD-Sprite-%{V_dbd_sprite}.tar.gz Source4: http://www.cpan.org/modules/by-module/DBD/DBD-SQLite-%{V_dbd_sqlite}.tar.gz Source5: http://www.cpan.org/modules/by-module/DBD/DBD-mysql-%{V_dbd_mysql}.tar.gz Source6: http://www.cpan.org/modules/by-module/DBD/DBD-Pg-%{V_dbd_pg}.tar.gz Source7: http://www.cpan.org/modules/by-module/DBD/DBD-Oracle-%{V_dbd_oracle}.tar.gz Source8: http://www.cpan.org/modules/by-module/DBD/DBD-ODBC-%{V_dbd_odbc}.tar.gz Patch0: perl-dbi.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net PreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg, perl-net %if "%{with_dbd_mysql}" == "yes" BuildPreReq: MYSQL PreReq: MYSQL %endif %if "%{with_dbd_pg}" == "yes" BuildPreReq: postgresql PreReq: postgresql %endif %if "%{with_dbd_oracle}" == "yes" BuildPreReq: ORACLE PreReq: ORACLE %endif %if "%{with_dbd_odbc}" == "yes" BuildPreReq: unixodbc PreReq: unixodbc %endif AutoReq: no AutoReqProv: no %description Various modules for using the DBI API of Perl: - DBI (%{V_dbi}) - SQL::Statement (%{V_sql_statement}) - DBD::AnyData (%{V_dbd_anydata}) - DBD::Sprite (%{V_dbd_sprite}) - DBD::SQLite (%{V_dbd_sqlite}) - DBD::mysql (%{V_dbd_mysql}) [%{with_dbd_mysql}] - DBD::Pg (%{V_dbd_pg}) [%{with_dbd_pg}] - DBD::Oracle (%{V_dbd_oracle}) [%{with_dbd_oracle}] - DBD::ODBC (%{V_dbd_odbc}) [%{with_dbd_odbc}] %prep %setup0 -q -c %setup1 -q -T -D -a 1 %setup2 -q -T -D -a 2 %setup3 -q -T -D -a 3 %setup4 -q -T -D -a 4 %setup5 -q -T -D -a 5 %setup6 -q -T -D -a 6 %setup7 -q -T -D -a 7 %setup8 -q -T -D -a 8 %patch0 -p0 %build %install # perform common prolog operations %{l_prefix}/bin/perl-openpkg prolog # build and install individual modules %{l_prefix}/bin/perl-openpkg install -d %{SOURCE0} %{l_prefix}/bin/perl-openpkg install -d %{SOURCE1} %{l_prefix}/bin/perl-openpkg install -d %{SOURCE2} %{l_prefix}/bin/perl-openpkg install -d %{SOURCE3} %{l_prefix}/bin/perl-openpkg install -d %{SOURCE4} %if "%{with_dbd_mysql}" == "yes" # build DBD::mysql ( cd DBD-mysql-%{V_dbd_mysql} # (determines MySQL header/lib paths via mysql_config in $PATH) %{l_prefix}/bin/perl-openpkg install ) %endif %if "%{with_dbd_pg}" == "yes" # build DBD::Pg ( cd DBD-Pg-%{V_dbd_pg} %{l_shtool} subst -e 's;-lpq;-lpq -lssl -lcrypto -lcrypt;' Makefile.PL POSTGRES_HOME=%{l_prefix} export POSTGRES_HOME %{l_prefix}/bin/perl-openpkg install ) %endif %if "%{with_dbd_oracle}" == "yes" # build DBD::oracle ( cd DBD-Oracle-%{V_dbd_oracle} ORACLE_HOME="`%{l_prefix}/etc/rc --query oracle_home`" export ORACLE_HOME %{l_prefix}/bin/perl-openpkg install ) %endif %if "%{with_dbd_odbc}" == "yes" # build DBD::odbc ( cd DBD-ODBC-%{V_dbd_odbc} ODBCHOME="%{l_prefix}" DBROOT= export ODBCHOME DBROOT %{l_prefix}/bin/perl-openpkg install ) %endif # perform common epilog operations %{l_prefix}/bin/perl-openpkg epilog %files -f files %clean rm -rf $RPM_BUILD_ROOT