Mon, 01 Jul 2013 21:20:32 +0200
Import package vendor original specs for necessary manipulations.
perl-db/perl-db.patch | file | annotate | diff | comparison | revisions | |
perl-db/perl-db.spec | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/perl-db/perl-db.patch Mon Jul 01 21:20:32 2013 +0200 1.3 @@ -0,0 +1,25 @@ 1.4 +Index: BerkeleyDB-0.52/Makefile.PL 1.5 +--- BerkeleyDB-0.51/Makefile.PL.orig 2005-08-31 23:30:09.000000000 +0200 1.6 ++++ BerkeleyDB-0.51/Makefile.PL 2005-11-16 20:50:32.640927202 +0100 1.7 +@@ -32,6 +32,9 @@ 1.8 + else { 1.9 + if ($^O eq 'MSWin32') 1.10 + { $LIBS = '-llibdb' } 1.11 ++ elsif ($^O =~ /solaris/i ) { 1.12 ++ $LIBS .= '-ldb -lrt'; 1.13 ++ } 1.14 + elsif ($^O =~ /aix/i ) { 1.15 + $LIBS .= '-ldb -lpthread '; 1.16 + if ($Config{'cc'} eq 'gcc' && $Config{'osvers'} eq '5.1') 1.17 +Index: DB_File-1.828/Makefile.PL 1.18 +--- DB_File-1.826/Makefile.PL.orig 2005-08-31 23:29:18.000000000 +0200 1.19 ++++ DB_File-1.826/Makefile.PL 2005-11-16 20:50:32.640641367 +0100 1.20 +@@ -29,7 +29,7 @@ 1.21 + } 1.22 + 1.23 + # Solaris is special. 1.24 +-#$LIBS .= " -lthread" if $^O eq 'solaris' ; 1.25 ++$LIBS .= " -lrt" if $^O eq 'solaris' ; 1.26 + 1.27 + # AIX is special. 1.28 + $LIBS .= " -lpthread" if $^O eq 'aix' ;
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/perl-db/perl-db.spec Mon Jul 01 21:20:32 2013 +0200 2.3 @@ -0,0 +1,140 @@ 2.4 +## 2.5 +## perl-db.spec -- OpenPKG RPM Package Specification 2.6 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 2.7 +## 2.8 +## Permission to use, copy, modify, and distribute this software for 2.9 +## any purpose with or without fee is hereby granted, provided that 2.10 +## the above copyright notice and this permission notice appear in all 2.11 +## copies. 2.12 +## 2.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 2.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 2.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 2.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2.24 +## SUCH DAMAGE. 2.25 +## 2.26 + 2.27 +# versions of individual parts 2.28 +%define V_perl 5.16 2.29 +%define V_berkeleydb 0.51 2.30 +%define V_bdb 1.89 2.31 +%define V_db_file 1.826 2.32 +%define V_db_file_lock 0.05 2.33 + 2.34 +# package information 2.35 +Name: perl-db 2.36 +Summary: Perl Modules for use with Berkeley-DB 2.37 +URL: http://www.cpan.org/ 2.38 +Vendor: Perl Community 2.39 +Packager: OpenPKG Foundation e.V. 2.40 +Distribution: OpenPKG Community 2.41 +Class: BASE 2.42 +Group: Perl 2.43 +License: GPL/Artistic 2.44 +Version: %{V_perl} 2.45 +Release: 20120531 2.46 + 2.47 +# package options 2.48 +%option with_pthreads no 2.49 + 2.50 +# list of sources 2.51 +Source0: http://www.cpan.org/authors/id/P/PM/PMQS/BerkeleyDB-%{V_berkeleydb}.tar.gz 2.52 +Source1: http://www.cpan.org/authors/id/M/ML/MLEHMANN/BDB-%{V_bdb}.tar.gz 2.53 +Source2: http://www.cpan.org/authors/id/P/PM/PMQS/DB_File-%{V_db_file}.tar.gz 2.54 +Source3: http://www.cpan.org/authors/id/D/DH/DHARRIS/DB_File-Lock-%{V_db_file_lock}.tar.gz 2.55 +Patch0: perl-db.patch 2.56 + 2.57 +# build information 2.58 +BuildPreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126 2.59 +PreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl} 2.60 +BuildPreReq: db >= 4.1.24 2.61 +PreReq: db >= 4.1.24 2.62 +%if "%{with_pthreads}" == "yes" 2.63 +BuildPreReq: db::with_pthreads = yes 2.64 +PreReq: db::with_pthreads = yes 2.65 +%endif 2.66 + 2.67 +%description 2.68 + Various modules for using the Berkeley-DB library from within Perl: 2.69 + - BerkeleyDB (%{V_berkeleydb}) 2.70 + - BDB (%{V_bdb}) 2.71 + - DB_File (%{V_db_file}) 2.72 + - DB_File::Lock (%{V_db_file_lock}) 2.73 + 2.74 +%track 2.75 + prog perl-db:BerkeleyDB = { 2.76 + version = %{V_berkeleydb} 2.77 + url = http://www.cpan.org/authors/id/P/PM/PMQS/ 2.78 + regex = BerkeleyDB-(__VER__)\.tar\.gz 2.79 + } 2.80 + prog perl-db:BDB = { 2.81 + version = %{V_bdb} 2.82 + url = http://www.cpan.org/authors/id/M/ML/MLEHMANN/ 2.83 + regex = BDB-(__VER__)\.tar\.gz 2.84 + } 2.85 + prog perl-db:DB_File = { 2.86 + version = %{V_db_file} 2.87 + url = http://www.cpan.org/authors/id/P/PM/PMQS/ 2.88 + regex = DB_File-(__VER__)\.tar\.gz 2.89 + } 2.90 + prog perl-db:DB_File-Lock = { 2.91 + version = %{V_db_file_lock} 2.92 + url = http://www.cpan.org/authors/id/D/DH/DHARRIS/ 2.93 + regex = DB_File-Lock-(__VER__)\.tar\.gz 2.94 + } 2.95 + 2.96 +%prep 2.97 + %setup -q -c 2.98 + %setup -q -T -D -a 1 2.99 + %setup -q -T -D -a 2 2.100 + %setup -q -T -D -a 3 2.101 + %patch -p0 2.102 + 2.103 +%build 2.104 + 2.105 +%install 2.106 + %{l_prefix}/bin/perl-openpkg prepare 2.107 + 2.108 + # build BerkeleyDB 2.109 + ( cd BerkeleyDB-%{V_berkeleydb} 2.110 + ( echo "INCLUDE = %{l_prefix}/include" 2.111 + echo "LIB = %{l_prefix}/lib" 2.112 + ) >config.in 2.113 + ) || exit $? 2.114 + %{l_prefix}/bin/perl-openpkg -d BerkeleyDB-%{V_berkeleydb} configure build install 2.115 + 2.116 + # build BDB 2.117 +%if "%{with_pthreads}" == "yes" 2.118 + %{l_shtool} subst \ 2.119 + -e 's;$INC = "";$INC = "%{l_cppflags} -pthread";' \ 2.120 + -e 's;-lpthread -ldb;%{l_ldflags} -pthread -ldb;' \ 2.121 + BDB-%{V_bdb}/Makefile.PL 2.122 + %{l_prefix}/bin/perl-openpkg -d BDB-%{V_bdb} configure build install 2.123 +%endif 2.124 + 2.125 + # build DB_File 2.126 + ( cd DB_File-%{V_db_file} 2.127 + ( echo "PREFIX = size_t" 2.128 + echo "HASH = u_int32_t" 2.129 + echo "INCLUDE = %{l_prefix}/include" 2.130 + echo "LIB = %{l_prefix}/lib" 2.131 + ) >config.in 2.132 + %{l_shtool} subst -e "s;INSTALLDIRS => .perl.,;;" Makefile.PL 2.133 + ) || exit $? 2.134 + %{l_prefix}/bin/perl-openpkg -d DB_File-%{V_db_file} configure build install 2.135 + 2.136 + %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install 2.137 + %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup 2.138 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files` 2.139 + 2.140 +%files -f files 2.141 + 2.142 +%clean 2.143 +