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 |