# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346183043 -7200 # Node ID 036a3c9dd424ceb7dd7cf103308e5d97000ad520 # Parent 1a897ff6f07a06165e4c5e16ea4ca3a0a8dca3c4 Correct build configuration which depends on Doxygen to generate HTML docs. diff -r 1a897ff6f07a -r 036a3c9dd424 cgicc/cgicc.spec --- a/cgicc/cgicc.spec Tue Aug 28 18:56:10 2012 +0200 +++ b/cgicc/cgicc.spec Tue Aug 28 21:44:03 2012 +0200 @@ -1,6 +1,6 @@ ## ## cgicc.spec -- OpenPKG RPM Specification -## Copyright (c) 2010 Michael Schloh von Bennewitz +## Copyright (c) 2012 Michael Schloh von Bennewitz ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -33,18 +33,20 @@ Group: Web License: GPL Version: 3.2.9 -Release: 20100510 +Release: 20120800 + +# package options +%option with_htmldocs no # list of sources Source0: ftp://ftp.gnu.org/gnu/cgicc/cgicc-%{version}.tar.gz # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, automake, libtool -PreReq: OpenPKG, openpkg >= 20040130 -AutoReq: no -AutoReqProv: no +BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, automake, libtool +PreReq: OpenPKG, openpkg >= 20100101 +%if "%{with_htmldocs}" == "yes" +BuildPreReq: doxygen +%endif %description Compatible with FastCGI, GNU cgicc is a ANSI C++ compliant @@ -72,10 +74,18 @@ libtoolize automake --add-missing +%if "%{with_htmldocs}" != "yes" + # avoid Doxygen dependent targets + %{l_shtool} subst \ + -e 's;\(.*\$(MAKE) html-doc\);#\1;' \ + -e 's;\(install-data-am:.*\)install-data-local;\1;' \ + doc/Makefile.in +%endif + # repair still incorrect build configuration %{l_shtool} subst \ - -e 's;^docdir *=.*;docdir = @docdir@;' \ - doc/Makefile.* + -e 's;^docdir *=.*;docdir = @docdir@;' \ + doc/Makefile.* %build # prepare configuration @@ -92,19 +102,17 @@ %{l_make} %{l_mflags -O} %install - # remove previously existing installations - rm -rf $RPM_BUILD_ROOT - # run the native installation logic %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ - %{l_files_std} \ - "%doc %{l_prefix}/share/%{name}/doc" +%if "%{with_htmldocs}" == "yes" + "%doc %{l_prefix}/share/%{name}/doc" \ +%endif + %{l_files_std} %files -f files %clean - rm -rf $RPM_BUILD_ROOT