diff --git a/cfengine.spec b/cfengine.spec index 5b921f6..d33ce0f 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -32,9 +32,9 @@ Version: 3.5.1 Release: 0 Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.gz -# there's no /usr/include/acl.h in SUSE, kkaempf@suse.de +# there's no /usr/include/acl.h in SUSE or Fedora, kkaempf@suse.de Patch1: libacl-headers.patch -# SLE 11 autoconf does not support AM_SUBST_NOTMAKE, kkaempf@suse.de +# SLE 11 or RHEL5 autoconf does not support AM_SUBST_NOTMAKE, kkaempf@suse.de Patch2: remove-am_subst_notmake.patch Source1: http://www.cfengine.org/manuals/cf3-Reference.pdf @@ -153,12 +153,16 @@ This package contains the files of the cfengine server. %prep %setup -q -n %{name}-%{version} -%if 0%{?suse_version} +%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?rhel_version} %patch1 -p1 -%if 0%{?suse_version} < 1120 +%endif +%if 0%{?suse_version} > 0 && 0%{?suse_version} <= 1110 %patch2 -p1 %endif +%if 0%{?rhel_version} >= 500 && 0%{?rhel_version} < 600 +%patch2 -p1 %endif + ##### rpmlint #### wrong-file-end-of-line-encoding #### incorrect-fsf-address @@ -174,7 +178,6 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ --enable-fhs \ --with-libxml2 \ --datadir=/var \ - --docdir=%{_docdir}/%{name} \ --with-workdir=%{workdir} \ --with-postgresql \ --with-pthreads \ @@ -182,7 +185,12 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ --with-pcre \ --with-libvirt \ --with-libacl \ - --with-libxml2 + --with-libxml2 \ +%if 0%{?suse_version} >= 1110 || 0%{?rhel_version} >= 600 + --docdir=%{_docdir}/%{name} +%endif +# SLE 10 and RHEL5 don't recognize --docdir + %{__make} %{?_smp_mflags} # --datadir=/var/lib/%%{name}/inputs \