| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- ##
- ## perl-dbi.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
- ##
- ## 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_perl 5.10.0
- %define V_dbi 1.609
- %define V_sql_statement 1.20
- %define V_sql_abstract 1.56
- %define V_sql_routine 0.70.3
- %define V_sql_builder 0.033
- %define V_sql_interpolate 0.41
- %define V_sql_translator 0.11001
- %define V_dbd_mock 1.39
- %define V_dbd_anydata 0.09
- %define V_dbd_csv 0.22
- %define V_dbd_sprite 0.59
- %define V_dbd_sqlite 1.26_03
- %define V_dbd_mysql 4.012
- %define V_dbd_pgsql 2.15.1
- %define V_dbd_oracle 1.23
- %define V_dbd_sybase 1.09
- %define V_dbd_odbc 1.22
- %define V_dbd_pglite 0.11
- %define V_dbd_cego 1.1.7
- # package information
- Name: perl-dbi
- Summary: Perl Modules for use with DBI API
- URL: http://www.cpan.org/
- Vendor: Perl Community
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: BASE
- Group: Perl
- License: GPL/Artistic
- Version: %{V_perl}
- Release: 20090823
- # package options
- %option with_sqlite yes
- %option with_mysql no
- %option with_pgsql no
- %option with_oracle no
- %option with_sybase no
- %option with_odbc no
- %option with_cego no
- # package backward compatibility
- %option with_dbd_sqlite no
- %option with_dbd_mysql no
- %option with_dbd_pgsql no
- %option with_dbd_oracle no
- %option with_dbd_sybase no
- %option with_dbd_odbc no
- %option with_dbd_cego no
- %if "%{with_dbd_sqlite}" == "yes"
- %undefine with_sqlite
- %define with_sqlite yes
- %endif
- %if "%{with_dbd_mysql}" == "yes"
- %undefine with_mysql
- %define with_mysql yes
- %endif
- %if "%{with_dbd_pgsql}" == "yes"
- %undefine with_pgsql
- %define with_pgsql yes
- %endif
- %if "%{with_dbd_oracle}" == "yes"
- %undefine with_oracle
- %define with_oracle yes
- %endif
- %if "%{with_dbd_sybase}" == "yes"
- %undefine with_sybase
- %define with_sybase yes
- %endif
- %if "%{with_dbd_odbc}" == "yes"
- %undefine with_odbc
- %define with_odbc yes
- %endif
- %if "%{with_dbd_cego}" == "yes"
- %undefine with_cego
- %define with_cego yes
- %endif
- # 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/SQL/SQL-Abstract-%{V_sql_abstract}.tar.gz
- Source3: http://www.darrenduncan.net/d/perl/archives/SQL-Routine-v%{V_sql_routine}.tar.gz
- Source4: ftp://ftp.openpkg.org/sources/CPY/ORPHANED/perl/SQL-Builder-%{V_sql_builder}.tar.gz
- Source5: http://www.cpan.org/modules/by-module/SQL/SQL-Interpolate-%{V_sql_interpolate}.tar.gz
- Source6: http://www.cpan.org/authors/id/J/JR/JROBINSON/SQL-Translator-%{V_sql_translator}.tar.gz
- Source7: http://www.cpan.org/modules/by-module/DBD/DBD-Mock-%{V_dbd_mock}.tar.gz
- Source8: http://www.cpan.org/modules/by-module/DBD/DBD-AnyData-%{V_dbd_anydata}.tar.gz
- Source9: http://www.cpan.org/modules/by-module/DBD/DBD-CSV-%{V_dbd_csv}.tar.gz
- Source10: http://www.cpan.org/modules/by-module/DBD/DBD-Sprite-%{V_dbd_sprite}.tar.gz
- Source11: http://www.cpan.org/authors/id/A/AD/ADAMK/DBD-SQLite-%{V_dbd_sqlite}.tar.gz
- Source12: http://www.cpan.org/modules/by-module/DBD/DBD-mysql-%{V_dbd_mysql}.tar.gz
- Source13: http://www.cpan.org/modules/by-module/DBD/DBD-Pg-%{V_dbd_pgsql}.tar.gz
- Source14: http://www.cpan.org/modules/by-module/DBD/DBD-Oracle-%{V_dbd_oracle}.tar.gz
- Source15: http://www.cpan.org/modules/by-module/DBD/DBD-ODBC-%{V_dbd_odbc}.tar.gz
- Source16: http://www.peppler.org/downloads/DBD-Sybase-%{V_dbd_sybase}.tar.gz
- Source17: http://www.cpan.org/modules/by-module/DBD/DBD-PgLite-%{V_dbd_pglite}.tar.gz
- Source18: http://www.lemke-it.com/DBD-cego-%{V_dbd_cego}.tar.gz
- Patch0: perl-dbi.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, pkgconfig
- PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
- BuildPreReq: perl-module, perl-util, perl-net, perl-locale, perl-text, perl-parse
- PreReq: perl-module, perl-util, perl-net, perl-locale, perl-text, perl-parse
- %if "%{with_sqlite}" == "yes"
- BuildPreReq: sqlite, perl-locale >= %{V_perl}-20060921
- PreReq: sqlite, perl-locale >= %{V_perl}-20060921
- %endif
- %if "%{with_mysql}" == "yes"
- BuildPreReq: mysql
- PreReq: mysql
- %endif
- %if "%{with_pgsql}" == "yes"
- BuildPreReq: postgresql
- PreReq: postgresql
- %endif
- %if "%{with_oracle}" == "yes"
- BuildPreReq: oracle
- PreReq: oracle
- %endif
- %if "%{with_sybase}" == "yes"
- BuildPreReq: freetds, libiconv
- PreReq: freetds, libiconv
- %endif
- %if "%{with_odbc}" == "yes"
- BuildPreReq: ODBC
- PreReq: ODBC
- %endif
- %if "%{with_cego}" == "yes"
- BuildPreReq: cego
- PreReq: cego
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Various modules for using the DBI API of Perl:
- - DBI (%{V_dbi})
- - SQL::Statement (%{V_sql_statement})
- - SQL::Abstract (%{V_sql_abstract})
- - SQL::Routine (%{V_sql_routine})
- - SQL::Builder (%{V_sql_builder})
- - SQL::Interpolate (%{V_sql_interpolate})
- - SQL::Translator (%{V_sql_translator})
- - DBD::Mock (%{V_dbd_mock})
- - DBD::AnyData (%{V_dbd_anydata})
- - DBD::CSV (%{V_dbd_csv})
- - DBD::Sprite (%{V_dbd_sprite})
- - DBD::SQLite (%{V_dbd_sqlite}) [%{with_sqlite}]
- - DBD::PgLite (%{V_dbd_pglite}) [%{with_sqlite}]
- - DBD::mysql (%{V_dbd_mysql}) [%{with_mysql}]
- - DBD::Pg (%{V_dbd_pgsql}) [%{with_pgsql}]
- - DBD::Oracle (%{V_dbd_oracle}) [%{with_oracle}]
- - DBD::Sybase (%{V_dbd_sybase}) [%{with_sybase}]
- - DBD::ODBC (%{V_dbd_odbc}) [%{with_odbc}]
- - DBD::Cego (%{V_dbd_cego}) [%{with_cego}]
- %track
- prog perl-dbi:DBI = {
- version = %{V_dbi}
- url = http://www.cpan.org/modules/by-module/DBI/
- regex = DBI-(\d+\.\d+)\.tar\.gz
- }
- prog perl-dbi:SQL-Statement = {
- version = %{V_sql_statement}
- url = http://www.cpan.org/modules/by-module/SQL/
- regex = SQL-Statement-(__VER__)\.tar\.gz
- }
- prog perl-dbi:SQL-Abstract = {
- version = %{V_sql_abstract}
- url = http://www.cpan.org/modules/by-module/SQL/
- regex = SQL-Abstract-(__VER__)\.tar\.gz
- }
- prog perl-dbi:SQL-Routine = {
- version = %{V_sql_routine}
- url = http://www.darrenduncan.net/d/perl/archives/
- regex = SQL-Routine-v(__VER__)\.tar\.gz
- }
- prog perl-dbi:SQL-Builder = {
- disabled
- comment = "rse: disappeared from CPAN"
- version = %{V_sql_builder}
- url = ftp://ftp.openpkg.org/sources/CPY/ORPHANED/perl/
- regex = SQL-Builder-(__VER__)\.tar\.gz
- }
- prog perl-dbi:SQL-Interpolate = {
- version = %{V_sql_interpolate}
- url = http://www.cpan.org/modules/by-module/SQL/
- regex = SQL-Interpolate-(__VER__)\.tar\.gz
- }
- prog perl-dbi:SQL-Translator = {
- version = %{V_sql_translator}
- url = http://www.cpan.org/authors/id/J/JR/JROBINSON/
- regex = SQL-Translator-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-Mock = {
- version = %{V_dbd_mock}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-Mock-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-AnyData = {
- version = %{V_dbd_anydata}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-AnyData-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-CSV = {
- version = %{V_dbd_csv}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-CSV-(\d+\.\d\d)\.tar\.gz
- }
- prog perl-dbi:DBD-mysql = {
- version = %{V_dbd_mysql}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-mysql-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-ODBC = {
- version = %{V_dbd_odbc}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-ODBC-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-Oracle = {
- version = %{V_dbd_oracle}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-Oracle-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-Pg = {
- version = %{V_dbd_pgsql}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-Pg-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-Sprite = {
- version = %{V_dbd_sprite}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-Sprite-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-SQLite = {
- version = %{V_dbd_sqlite}
- url = http://www.cpan.org/authors/id/A/AD/ADAMK/
- regex = DBD-SQLite-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-PgLite = {
- version = %{V_dbd_pglite}
- url = http://www.cpan.org/modules/by-module/DBD/
- regex = DBD-PgLite-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-Sybase = {
- version = %{V_dbd_sybase}
- url = http://www.peppler.org/downloads/
- regex = DBD-Sybase-(__VER__)\.tar\.gz
- }
- prog perl-dbi:DBD-cego = {
- version = %{V_dbd_cego}
- url = http://www.lemke-it.com/opensource.html
- regex = DBD-cego-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q -c
- %setup -q -T -D -a 1
- %setup -q -T -D -a 2
- %setup -q -T -D -a 3
- %setup -q -T -D -a 4
- %setup -q -T -D -a 5
- %setup -q -T -D -a 6
- %setup -q -T -D -a 7
- %setup -q -T -D -a 8
- %setup -q -T -D -a 9
- %setup -q -T -D -a 10
- %setup -q -T -D -a 11
- %setup -q -T -D -a 12
- %setup -q -T -D -a 13
- %setup -q -T -D -a 14
- %setup -q -T -D -a 15
- %setup -q -T -D -a 16
- %setup -q -T -D -a 17
- %setup -q -T -D -a 18
- %patch -p0
- chmod u+w SQL-Translator-*/*
- %build
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_prefix}/bin/perl-openpkg prepare
- # build and install individual modules
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
- %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
- %if "%{with_sqlite}" == "yes"
- # build DBD::SQLite
- ( cd DBD-SQLite-%{V_dbd_sqlite}
- # remove local SQLite sources (we use external one)
- # in order to not confuse ExtUtils::MakeMaker
- mv ppport.h dbdimp.[ch] SQLiteXS.h ..
- for file in `echo *.[ch] getsqlite.pl`; do
- sed -e "s;^ *$file *$;;" <MANIFEST >MANIFEST.NEW && mv MANIFEST.NEW MANIFEST
- rm -f $file
- done
- mv ../ppport.h ../dbdimp.[ch] ../SQLiteXS.h .
- # substitute paths in patched Makefile.PL
- %{l_shtool} subst %{l_value -s -a} Makefile.PL
- # perform regular build and install
- %{l_prefix}/bin/perl-openpkg configure build install
- ) || exit $?
- # build DBD::PgLite
- %{l_prefix}/bin/perl-openpkg -d DBD-PgLite-%{V_dbd_pglite} configure build install
- %endif
- %if "%{with_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 configure build install
- ) || exit $?
- %endif
- %if "%{with_pgsql}" == "yes"
- # build DBD::Pg
- ( cd DBD-Pg-%{V_dbd_pgsql}
- %{l_shtool} subst \
- -e 's;POSTGRES_LIB -lpq;POSTGRES_LIB -lpq -lssl -lcrypto -lcrypt;' \
- Makefile.PL
- POSTGRES_HOME=%{l_prefix}
- POSTGRES_INCLUDE=%{l_prefix}/include/postgresql
- POSTGRES_LIB=%{l_prefix}/lib
- export POSTGRES_HOME POSTGRES_INCLUDE POSTGRES_LIB
- %{l_prefix}/bin/perl-openpkg configure build install
- ) || exit $?
- %endif
- %if "%{with_oracle}" == "yes"
- # build DBD::oracle
- ( cd DBD-Oracle-%{V_dbd_oracle}
- ORACLE_HOME="`%{l_rc} --query oracle_home`"
- export ORACLE_HOME
- case "%{l_platform -t}" in
- i?86-linux* )
- ;;
- sun*-sunos* | ix86-sunos* )
- # OpenPKG builds with gcc in 32-bit mode by default
- %{l_shtool} subst \
- -e 's;demo_rdbms\.mk;demo_rdbms32.mk;g' \
- Makefile.PL
- ;;
- * )
- echo "Platform \"%{l_platform -t}\" not supported" 1>&2
- exit 1
- ;;
- esac
- %{l_prefix}/bin/perl-openpkg configure build install
- ) || exit $?
- %endif
- %if "%{with_sybase}" == "yes"
- # build DBD::Sybase
- ( cd DBD-Sybase-%{V_dbd_sybase}
- SYBASE="%{l_prefix}"
- export SYBASE
- %{l_shtool} subst \
- -e 's;\([^s(]/lib\);\1/freetds;g' \
- -e 's;-lct;%{l_ldflags} -lct -liconv;g' \
- Makefile.PL
- %{l_prefix}/bin/perl-openpkg configure build install
- ) || exit $?
- %endif
- %if "%{with_odbc}" == "yes"
- # build DBD::odbc
- ( cd DBD-ODBC-%{V_dbd_odbc}
- ODBCHOME="%{l_prefix}"
- DBROOT=
- export ODBCHOME DBROOT
- %{l_prefix}/bin/perl-openpkg configure build install
- ) || exit $?
- %endif
- %if "%{with_cego}" == "yes"
- # build DBD::Cego
- ( cd DBD-cego
- rm -f ._* >/dev/null 2>&1 || true
- %{l_prefix}/bin/perl-openpkg --args=--prefix=%{l_prefix} configure build install
- ) || exit $?
- %endif
- # determine installation files
- %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|