perl-db/perl-db.spec

Mon, 01 Jul 2013 21:20:32 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 01 Jul 2013 21:20:32 +0200
changeset 778
389c33ef5a93
child 779
8a3648cce554
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

michael@778 1 ##
michael@778 2 ## perl-db.spec -- OpenPKG RPM Package Specification
michael@778 3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@778 4 ##
michael@778 5 ## Permission to use, copy, modify, and distribute this software for
michael@778 6 ## any purpose with or without fee is hereby granted, provided that
michael@778 7 ## the above copyright notice and this permission notice appear in all
michael@778 8 ## copies.
michael@778 9 ##
michael@778 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@778 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@778 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@778 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@778 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@778 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@778 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@778 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@778 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@778 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@778 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@778 21 ## SUCH DAMAGE.
michael@778 22 ##
michael@778 23
michael@778 24 # versions of individual parts
michael@778 25 %define V_perl 5.16
michael@778 26 %define V_berkeleydb 0.51
michael@778 27 %define V_bdb 1.89
michael@778 28 %define V_db_file 1.826
michael@778 29 %define V_db_file_lock 0.05
michael@778 30
michael@778 31 # package information
michael@778 32 Name: perl-db
michael@778 33 Summary: Perl Modules for use with Berkeley-DB
michael@778 34 URL: http://www.cpan.org/
michael@778 35 Vendor: Perl Community
michael@778 36 Packager: OpenPKG Foundation e.V.
michael@778 37 Distribution: OpenPKG Community
michael@778 38 Class: BASE
michael@778 39 Group: Perl
michael@778 40 License: GPL/Artistic
michael@778 41 Version: %{V_perl}
michael@778 42 Release: 20120531
michael@778 43
michael@778 44 # package options
michael@778 45 %option with_pthreads no
michael@778 46
michael@778 47 # list of sources
michael@778 48 Source0: http://www.cpan.org/authors/id/P/PM/PMQS/BerkeleyDB-%{V_berkeleydb}.tar.gz
michael@778 49 Source1: http://www.cpan.org/authors/id/M/ML/MLEHMANN/BDB-%{V_bdb}.tar.gz
michael@778 50 Source2: http://www.cpan.org/authors/id/P/PM/PMQS/DB_File-%{V_db_file}.tar.gz
michael@778 51 Source3: http://www.cpan.org/authors/id/D/DH/DHARRIS/DB_File-Lock-%{V_db_file_lock}.tar.gz
michael@778 52 Patch0: perl-db.patch
michael@778 53
michael@778 54 # build information
michael@778 55 BuildPreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
michael@778 56 PreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl}
michael@778 57 BuildPreReq: db >= 4.1.24
michael@778 58 PreReq: db >= 4.1.24
michael@778 59 %if "%{with_pthreads}" == "yes"
michael@778 60 BuildPreReq: db::with_pthreads = yes
michael@778 61 PreReq: db::with_pthreads = yes
michael@778 62 %endif
michael@778 63
michael@778 64 %description
michael@778 65 Various modules for using the Berkeley-DB library from within Perl:
michael@778 66 - BerkeleyDB (%{V_berkeleydb})
michael@778 67 - BDB (%{V_bdb})
michael@778 68 - DB_File (%{V_db_file})
michael@778 69 - DB_File::Lock (%{V_db_file_lock})
michael@778 70
michael@778 71 %track
michael@778 72 prog perl-db:BerkeleyDB = {
michael@778 73 version = %{V_berkeleydb}
michael@778 74 url = http://www.cpan.org/authors/id/P/PM/PMQS/
michael@778 75 regex = BerkeleyDB-(__VER__)\.tar\.gz
michael@778 76 }
michael@778 77 prog perl-db:BDB = {
michael@778 78 version = %{V_bdb}
michael@778 79 url = http://www.cpan.org/authors/id/M/ML/MLEHMANN/
michael@778 80 regex = BDB-(__VER__)\.tar\.gz
michael@778 81 }
michael@778 82 prog perl-db:DB_File = {
michael@778 83 version = %{V_db_file}
michael@778 84 url = http://www.cpan.org/authors/id/P/PM/PMQS/
michael@778 85 regex = DB_File-(__VER__)\.tar\.gz
michael@778 86 }
michael@778 87 prog perl-db:DB_File-Lock = {
michael@778 88 version = %{V_db_file_lock}
michael@778 89 url = http://www.cpan.org/authors/id/D/DH/DHARRIS/
michael@778 90 regex = DB_File-Lock-(__VER__)\.tar\.gz
michael@778 91 }
michael@778 92
michael@778 93 %prep
michael@778 94 %setup -q -c
michael@778 95 %setup -q -T -D -a 1
michael@778 96 %setup -q -T -D -a 2
michael@778 97 %setup -q -T -D -a 3
michael@778 98 %patch -p0
michael@778 99
michael@778 100 %build
michael@778 101
michael@778 102 %install
michael@778 103 %{l_prefix}/bin/perl-openpkg prepare
michael@778 104
michael@778 105 # build BerkeleyDB
michael@778 106 ( cd BerkeleyDB-%{V_berkeleydb}
michael@778 107 ( echo "INCLUDE = %{l_prefix}/include"
michael@778 108 echo "LIB = %{l_prefix}/lib"
michael@778 109 ) >config.in
michael@778 110 ) || exit $?
michael@778 111 %{l_prefix}/bin/perl-openpkg -d BerkeleyDB-%{V_berkeleydb} configure build install
michael@778 112
michael@778 113 # build BDB
michael@778 114 %if "%{with_pthreads}" == "yes"
michael@778 115 %{l_shtool} subst \
michael@778 116 -e 's;$INC = "";$INC = "%{l_cppflags} -pthread";' \
michael@778 117 -e 's;-lpthread -ldb;%{l_ldflags} -pthread -ldb;' \
michael@778 118 BDB-%{V_bdb}/Makefile.PL
michael@778 119 %{l_prefix}/bin/perl-openpkg -d BDB-%{V_bdb} configure build install
michael@778 120 %endif
michael@778 121
michael@778 122 # build DB_File
michael@778 123 ( cd DB_File-%{V_db_file}
michael@778 124 ( echo "PREFIX = size_t"
michael@778 125 echo "HASH = u_int32_t"
michael@778 126 echo "INCLUDE = %{l_prefix}/include"
michael@778 127 echo "LIB = %{l_prefix}/lib"
michael@778 128 ) >config.in
michael@778 129 %{l_shtool} subst -e "s;INSTALLDIRS => .perl.,;;" Makefile.PL
michael@778 130 ) || exit $?
michael@778 131 %{l_prefix}/bin/perl-openpkg -d DB_File-%{V_db_file} configure build install
michael@778 132
michael@778 133 %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
michael@778 134 %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
michael@778 135 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
michael@778 136
michael@778 137 %files -f files
michael@778 138
michael@778 139 %clean
michael@778 140

mercurial