I have the source rpm package of cfengine 3.2.4. Now I want to change the workdir /var/lib/cfengine/work to /var/cfengine, like it's in version 3.5.2. Finally I want to build it to have an installable rpm package.

I think I have to edit only the spec file, where I found the following lines:

Name:           cfengine
%define         libname   libpromises
%define         libsoname %{libname}1
%define         basedir   /var/lib/%{name}
%define         workdir   %{basedir}/work