# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171635 -7200 # Node ID e39a632d12f7ab9fc81991b21543e031b4e535b4 # Parent fb1ea36eaee4bdc4ec429d426372ff515285ef45 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. diff -r fb1ea36eaee4 -r e39a632d12f7 cfengine/cfengine.spec --- a/cfengine/cfengine.spec Tue Aug 28 18:33:50 2012 +0200 +++ b/cfengine/cfengine.spec Tue Aug 28 18:33:55 2012 +0200 @@ -31,8 +31,8 @@ Class: BASE Group: System License: GPL -Version: 3.2.4 -Release: 20120211 +Version: 3.3.5 +Release: 20120800 # package options %option with_fsl yes @@ -43,10 +43,10 @@ Source2: fsl.cfengine # build information -BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex, gcc +BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex, make, gcc, pkgconfig PreReq: OpenPKG, openpkg >= 20100101 -BuildPreReq: db, openssl, pcre -PreReq: db, openssl, pcre +BuildPreReq: tokyocabinet, openssl, pcre +PreReq: tokyocabinet, openssl, pcre %if "%{with_fsl}" == "yes" BuildPreReq: fsl PreReq: fsl @@ -66,37 +66,39 @@ prog cfengine = { version = %{version} url = http://cfengine.com/source-code - regex = \bcfengine-(\d+.\d+\.\d+(p\d+)?)\.tar\.gz + regex = cfengine-(\d+.\d+\.\d+(p\d+)?)\.tar\.gz } %prep %setup -q + %{l_shtool} subst \ + -e 's;\(LIBS=.*\)-ltokyocabinet;\1`%{l_prefix}/bin/pkg-config --libs-only-l tokyocabinet`;' \ + -e 's;\(LIBS=.*\)-lcrypto;\1`%{l_prefix}/bin/pkg-config --libs-only-l openssl`;' \ + configure + %{l_shtool} subst \ + -e 's;\(masterfilesdir = \$(projdatadir)\)/CoreBase;\1/cfengine;' \ + masterfiles/Makefile.in %build # configure package - loclibs="" - case "%{l_platform -t}" in - *-sunos* ) - loclibs="-lrt" - ;; - esac CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags postgresql .}" \ - LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ - LIBS="%{l_fsl_libs} $loclibs" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_fsl_ldflags}" \ + LIBS="%{l_fsl_libs}" \ ./configure \ --prefix=%{l_prefix} \ --mandir=%{l_prefix}/man \ --infodir=%{l_prefix}/info \ --with-workdir=%{l_prefix}/var/cfengine \ - --with-berkeleydb=%{l_prefix} \ + --with-tokyocabinet=%{l_prefix} \ --with-openssl=%{l_prefix} \ --with-pcre=%{l_prefix} \ - --without-sql + --without-sql \ + --disable-shared # build package - %{l_make} %{l_mflags} + %{l_make} %{l_mflags -O} %install # install package @@ -134,6 +136,6 @@ %post # generate a public/private key pair for localhost if [ ! -f $RPM_INSTALL_PREFIX/var/cfengine/ppkeys/localhost.priv ]; then - $RPM_INSTALL_PREFIX/sbin/cfkey + $RPM_INSTALL_PREFIX/bin/cf-key fi