[Dovecot] configure: error: unrecognized option: --docdir=/usr/share/doc/dovecot-2.0.11

Bruce Cheng itlist at gmail.com
Tue Apr 5 11:11:32 EEST 2011


Hi,

I tried to use ATrpms
(http://dl.atrpms.net/all/dovecot-2.0.11-1_126.src.rpm) to rebuild the
rpms. It is shown the error message as following:
configure: error: unrecognized option: --docdir=/usr/share/doc/dovecot-2.0.11
Try `./configure --help' for more information.

I checked `./configure --help', it did contain the '--docdir' option.
I don't know how to fix it.

Then I tried to remove ' --docdir=%{_docdir}/%{name}-%{version} \' and
rebuild it again. It is shown another error message as following:
mv: cannot stat
`/var/tmp/dovecot-2.0.11-1_126-root//usr/share/doc/dovecot-2.0.11': No
such file or directory

I tried to modify dovecot.spec again, replace 'mv
$RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
%{_builddir}/%{name}-%{version}/docinstall
' with 'mv $RPM_BUILD_ROOT/%{_docdir}/%{name}
%{_builddir}/%{name}-%{version}/docinstall' and rebuild it again.

Antoher error shown 'File must begin with "/": %{_initddir}/dovecot',
therefore I add '%define _initddir /etc/rc.d/init.d'

Finally, I can rebuild the RPMS,  but it is shown error message again
while I install RPMS:

[root at testmail SPECS]# rpm -ivh ../RPMS/x86_64/dovecot-2.0.11-1_126.x86_64.rpm
Preparing...                ########################################### [100%]
   1:dovecot                ########################################### [100%]
/var/tmp/rpm-tmp.13056: line 3: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.13056: line 3: `fi'
error: %post(dovecot-2.0.11-1_126.x86_64) scriptlet failed, exit status 2

Please advise me how to fix the problem and thank you in advance.
--
Best Regards,
Bruce


More information about the dovecot mailing list