diff --git a/build/rpm/GNUmakefile b/build/rpm/GNUmakefile index aaa6c74..c295d98 100644 --- a/build/rpm/GNUmakefile +++ b/build/rpm/GNUmakefile @@ -60,6 +60,7 @@ pcp.spec: pcp.spec.in -e's|@package_configure@|$(PACKAGE_CONFIGURE)|g' \ -e's|@package_distribution@|$(PACKAGE_DISTRIBUTION)|g' \ -e's|@package_builder@|$(PACKAGE_BUILDER)|g' \ + -e's|@have_libmicrohttpd@|$(HAVE_LIBMICROHTTPD)|g' \ -e"s|@build_root@|$${DIST_ROOT}|g" \ -e's|@pcp_sysconf_dir@|$(PCP_SYSCONF_DIR)|g' \ -e's|@pcp_log_dir@|$(PCP_LOG_DIR)|g' \ diff --git a/build/rpm/pcp.spec.in b/build/rpm/pcp.spec.in index 0c5172d..bdb1ab3 100644 --- a/build/rpm/pcp.spec.in +++ b/build/rpm/pcp.spec.in @@ -13,9 +13,10 @@ BuildRequires: procps bison flex BuildRequires: python-devel BuildRequires: ncurses-devel BuildRequires: readline-devel -BuildRequires: libmicrohttpd-devel BuildRequires: perl(ExtUtils::MakeMaker) - +%if @have_libmicrohttpd@ == 1 +BuildRequires: libmicrohttpd-devel +%endif %if "%{_vendor}" == "redhat" BuildRequires: initscripts man /bin/hostname %endif @@ -291,10 +292,13 @@ pmie/stomp pmlogger/config.default pmlogger/control pmlogger/crontab -pmwebd/pmwebd.options pmproxy/pmproxy.options bash_completion.d/pcp EOFEOF +%if @have_libmicrohttpd@ == 1 +cat >>conf_files <