Update version integrating new dependency to tokyocabinet in place of

Tue, 28 Aug 2012 18:33:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:33:55 +0200
changeset 563
e39a632d12f7
parent 562
fb1ea36eaee4
child 564
afdc12167a56

Update version integrating new dependency to tokyocabinet in place of
Berkeley DB, use parallel make, leverage pkg-config(1), correct paths
and binary names, and correct silly spelling mistakes in build logic.

cfengine/cfengine.spec file | annotate | diff | comparison | revisions
     1.1 --- a/cfengine/cfengine.spec	Tue Aug 28 18:33:50 2012 +0200
     1.2 +++ b/cfengine/cfengine.spec	Tue Aug 28 18:33:55 2012 +0200
     1.3 @@ -31,8 +31,8 @@
     1.4  Class:        BASE
     1.5  Group:        System
     1.6  License:      GPL
     1.7 -Version:      3.2.4
     1.8 -Release:      20120211
     1.9 +Version:      3.3.5
    1.10 +Release:      20120800
    1.11  
    1.12  #   package options
    1.13  %option       with_fsl  yes
    1.14 @@ -43,10 +43,10 @@
    1.15  Source2:      fsl.cfengine
    1.16  
    1.17  #   build information
    1.18 -BuildPreReq:  OpenPKG, openpkg >= 20100101, bison, flex, gcc
    1.19 +BuildPreReq:  OpenPKG, openpkg >= 20100101, bison, flex, make, gcc, pkgconfig
    1.20  PreReq:       OpenPKG, openpkg >= 20100101
    1.21 -BuildPreReq:  db, openssl, pcre
    1.22 -PreReq:       db, openssl, pcre
    1.23 +BuildPreReq:  tokyocabinet, openssl, pcre
    1.24 +PreReq:       tokyocabinet, openssl, pcre
    1.25  %if "%{with_fsl}" == "yes"
    1.26  BuildPreReq:  fsl
    1.27  PreReq:       fsl
    1.28 @@ -66,37 +66,39 @@
    1.29      prog cfengine = {
    1.30          version   = %{version}
    1.31          url       = http://cfengine.com/source-code
    1.32 -        regex     = \bcfengine-(\d+.\d+\.\d+(p\d+)?)\.tar\.gz
    1.33 +        regex     = cfengine-(\d+.\d+\.\d+(p\d+)?)\.tar\.gz
    1.34      }
    1.35  
    1.36  %prep
    1.37      %setup -q
    1.38 +    %{l_shtool} subst \
    1.39 +        -e 's;\(LIBS=.*\)-ltokyocabinet;\1`%{l_prefix}/bin/pkg-config --libs-only-l tokyocabinet`;' \
    1.40 +        -e 's;\(LIBS=.*\)-lcrypto;\1`%{l_prefix}/bin/pkg-config --libs-only-l openssl`;' \
    1.41 +        configure
    1.42 +    %{l_shtool} subst \
    1.43 +        -e 's;\(masterfilesdir = \$(projdatadir)\)/CoreBase;\1/cfengine;' \
    1.44 +        masterfiles/Makefile.in
    1.45  
    1.46  %build
    1.47      #   configure package
    1.48 -    loclibs=""
    1.49 -    case "%{l_platform -t}" in
    1.50 -        *-sunos* )
    1.51 -            loclibs="-lrt"
    1.52 -        ;;
    1.53 -    esac
    1.54      CC="%{l_cc}" \
    1.55      CFLAGS="%{l_cflags -O}" \
    1.56 -    CPPFLAGS="%{l_cppflags postgresql .}" \
    1.57 -    LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
    1.58 -    LIBS="%{l_fsl_libs} $loclibs" \
    1.59 +    CPPFLAGS="%{l_cppflags}" \
    1.60 +    LDFLAGS="%{l_fsl_ldflags}" \
    1.61 +    LIBS="%{l_fsl_libs}" \
    1.62      ./configure \
    1.63          --prefix=%{l_prefix} \
    1.64          --mandir=%{l_prefix}/man \
    1.65          --infodir=%{l_prefix}/info \
    1.66          --with-workdir=%{l_prefix}/var/cfengine \
    1.67 -        --with-berkeleydb=%{l_prefix} \
    1.68 +        --with-tokyocabinet=%{l_prefix} \
    1.69          --with-openssl=%{l_prefix} \
    1.70          --with-pcre=%{l_prefix} \
    1.71 -        --without-sql
    1.72 +        --without-sql \
    1.73 +        --disable-shared
    1.74  
    1.75      #   build package
    1.76 -    %{l_make} %{l_mflags}
    1.77 +    %{l_make} %{l_mflags -O}
    1.78  
    1.79  %install
    1.80      #   install package
    1.81 @@ -134,6 +136,6 @@
    1.82  %post
    1.83      #   generate a public/private key pair for localhost
    1.84      if [ ! -f $RPM_INSTALL_PREFIX/var/cfengine/ppkeys/localhost.priv ]; then
    1.85 -        $RPM_INSTALL_PREFIX/sbin/cfkey
    1.86 +        $RPM_INSTALL_PREFIX/bin/cf-key
    1.87      fi
    1.88  

mercurial