perl-db/perl-db.spec

Tue, 02 Jul 2013 18:21:58 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 02 Jul 2013 18:21:58 +0200
changeset 782
de3379343a7c
parent 778
389c33ef5a93
permissions
-rw-r--r--

Remove superfluous init scripts and introduce SQL population logic.

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

mercurial