cfengine/cfengine.spec

changeset 563
e39a632d12f7
parent 562
fb1ea36eaee4
child 692
67831a9de168
equal deleted inserted replaced
0:14eb4f8600a2 1:80102c9d76a1
29 Packager: OpenPKG Foundation e.V. 29 Packager: OpenPKG Foundation e.V.
30 Distribution: OpenPKG Community 30 Distribution: OpenPKG Community
31 Class: BASE 31 Class: BASE
32 Group: System 32 Group: System
33 License: GPL 33 License: GPL
34 Version: 3.2.4 34 Version: 3.3.5
35 Release: 20120211 35 Release: 20120800
36 36
37 # package options 37 # package options
38 %option with_fsl yes 38 %option with_fsl yes
39 39
40 # list of sources 40 # list of sources
41 Source0: http://cfengine.com/source-code/download?file=cfengine-%{version}.tar.gz 41 Source0: http://cfengine.com/source-code/download?file=cfengine-%{version}.tar.gz
42 Source1: rc.cfengine 42 Source1: rc.cfengine
43 Source2: fsl.cfengine 43 Source2: fsl.cfengine
44 44
45 # build information 45 # build information
46 BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex, gcc 46 BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex, make, gcc, pkgconfig
47 PreReq: OpenPKG, openpkg >= 20100101 47 PreReq: OpenPKG, openpkg >= 20100101
48 BuildPreReq: db, openssl, pcre 48 BuildPreReq: tokyocabinet, openssl, pcre
49 PreReq: db, openssl, pcre 49 PreReq: tokyocabinet, openssl, pcre
50 %if "%{with_fsl}" == "yes" 50 %if "%{with_fsl}" == "yes"
51 BuildPreReq: fsl 51 BuildPreReq: fsl
52 PreReq: fsl 52 PreReq: fsl
53 %endif 53 %endif
54 54
64 64
65 %track 65 %track
66 prog cfengine = { 66 prog cfengine = {
67 version = %{version} 67 version = %{version}
68 url = http://cfengine.com/source-code 68 url = http://cfengine.com/source-code
69 regex = \bcfengine-(\d+.\d+\.\d+(p\d+)?)\.tar\.gz 69 regex = cfengine-(\d+.\d+\.\d+(p\d+)?)\.tar\.gz
70 } 70 }
71 71
72 %prep 72 %prep
73 %setup -q 73 %setup -q
74 %{l_shtool} subst \
75 -e 's;\(LIBS=.*\)-ltokyocabinet;\1`%{l_prefix}/bin/pkg-config --libs-only-l tokyocabinet`;' \
76 -e 's;\(LIBS=.*\)-lcrypto;\1`%{l_prefix}/bin/pkg-config --libs-only-l openssl`;' \
77 configure
78 %{l_shtool} subst \
79 -e 's;\(masterfilesdir = \$(projdatadir)\)/CoreBase;\1/cfengine;' \
80 masterfiles/Makefile.in
74 81
75 %build 82 %build
76 # configure package 83 # configure package
77 loclibs=""
78 case "%{l_platform -t}" in
79 *-sunos* )
80 loclibs="-lrt"
81 ;;
82 esac
83 CC="%{l_cc}" \ 84 CC="%{l_cc}" \
84 CFLAGS="%{l_cflags -O}" \ 85 CFLAGS="%{l_cflags -O}" \
85 CPPFLAGS="%{l_cppflags postgresql .}" \ 86 CPPFLAGS="%{l_cppflags}" \
86 LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ 87 LDFLAGS="%{l_fsl_ldflags}" \
87 LIBS="%{l_fsl_libs} $loclibs" \ 88 LIBS="%{l_fsl_libs}" \
88 ./configure \ 89 ./configure \
89 --prefix=%{l_prefix} \ 90 --prefix=%{l_prefix} \
90 --mandir=%{l_prefix}/man \ 91 --mandir=%{l_prefix}/man \
91 --infodir=%{l_prefix}/info \ 92 --infodir=%{l_prefix}/info \
92 --with-workdir=%{l_prefix}/var/cfengine \ 93 --with-workdir=%{l_prefix}/var/cfengine \
93 --with-berkeleydb=%{l_prefix} \ 94 --with-tokyocabinet=%{l_prefix} \
94 --with-openssl=%{l_prefix} \ 95 --with-openssl=%{l_prefix} \
95 --with-pcre=%{l_prefix} \ 96 --with-pcre=%{l_prefix} \
96 --without-sql 97 --without-sql \
98 --disable-shared
97 99
98 # build package 100 # build package
99 %{l_make} %{l_mflags} 101 %{l_make} %{l_mflags -O}
100 102
101 %install 103 %install
102 # install package 104 # install package
103 %{l_shtool} mkdir -f -p -m 755 \ 105 %{l_shtool} mkdir -f -p -m 755 \
104 $RPM_BUILD_ROOT%{l_prefix}/var/cfengine 106 $RPM_BUILD_ROOT%{l_prefix}/var/cfengine
132 %clean 134 %clean
133 135
134 %post 136 %post
135 # generate a public/private key pair for localhost 137 # generate a public/private key pair for localhost
136 if [ ! -f $RPM_INSTALL_PREFIX/var/cfengine/ppkeys/localhost.priv ]; then 138 if [ ! -f $RPM_INSTALL_PREFIX/var/cfengine/ppkeys/localhost.priv ]; then
137 $RPM_INSTALL_PREFIX/sbin/cfkey 139 $RPM_INSTALL_PREFIX/bin/cf-key
138 fi 140 fi
139 141

mercurial