Correct build configuration which depends on Doxygen to generate HTML docs.

Tue, 28 Aug 2012 21:44:03 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 21:44:03 +0200
changeset 624
036a3c9dd424
parent 623
1a897ff6f07a
child 625
6a62f7ecb64c

Correct build configuration which depends on Doxygen to generate HTML docs.

cgicc/cgicc.spec file | annotate | diff | comparison | revisions
     1.1 --- a/cgicc/cgicc.spec	Tue Aug 28 18:56:10 2012 +0200
     1.2 +++ b/cgicc/cgicc.spec	Tue Aug 28 21:44:03 2012 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  ##
     1.5  ##  cgicc.spec -- OpenPKG RPM Specification
     1.6 -##  Copyright (c) 2010 Michael Schloh von Bennewitz <michael@schloh.com>
     1.7 +##  Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
     1.8  ##
     1.9  ##  Permission to use, copy, modify, and distribute this software for
    1.10  ##  any purpose with or without fee is hereby granted, provided that
    1.11 @@ -33,18 +33,20 @@
    1.12  Group:        Web
    1.13  License:      GPL
    1.14  Version:      3.2.9
    1.15 -Release:      20100510
    1.16 +Release:      20120800
    1.17 +
    1.18 +#   package options
    1.19 +%option       with_htmldocs  no
    1.20  
    1.21  #   list of sources
    1.22  Source0:      ftp://ftp.gnu.org/gnu/cgicc/cgicc-%{version}.tar.gz
    1.23  
    1.24  #   build information
    1.25 -Prefix:       %{l_prefix}
    1.26 -BuildRoot:    %{l_buildroot}
    1.27 -BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, automake, libtool
    1.28 -PreReq:       OpenPKG, openpkg >= 20040130
    1.29 -AutoReq:      no
    1.30 -AutoReqProv:  no
    1.31 +BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, make, automake, libtool
    1.32 +PreReq:       OpenPKG, openpkg >= 20100101
    1.33 +%if "%{with_htmldocs}" == "yes"
    1.34 +BuildPreReq:  doxygen
    1.35 +%endif
    1.36  
    1.37  %description
    1.38      Compatible with FastCGI, GNU cgicc is a ANSI C++ compliant
    1.39 @@ -72,10 +74,18 @@
    1.40      libtoolize
    1.41      automake --add-missing
    1.42  
    1.43 +%if "%{with_htmldocs}" != "yes"
    1.44 +    #   avoid Doxygen dependent targets
    1.45 +    %{l_shtool} subst \
    1.46 +        -e 's;\(.*\$(MAKE) html-doc\);#\1;' \
    1.47 +        -e 's;\(install-data-am:.*\)install-data-local;\1;' \
    1.48 +        doc/Makefile.in
    1.49 +%endif
    1.50 +
    1.51      #   repair still incorrect build configuration
    1.52      %{l_shtool} subst \
    1.53 -    -e 's;^docdir *=.*;docdir = @docdir@;' \
    1.54 -    doc/Makefile.*
    1.55 +        -e 's;^docdir *=.*;docdir = @docdir@;' \
    1.56 +        doc/Makefile.*
    1.57  
    1.58  %build
    1.59      #   prepare configuration
    1.60 @@ -92,19 +102,17 @@
    1.61      %{l_make} %{l_mflags -O}
    1.62  
    1.63  %install
    1.64 -    #   remove previously existing installations
    1.65 -    rm -rf $RPM_BUILD_ROOT
    1.66 -
    1.67      #   run the native installation logic
    1.68      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    1.69  
    1.70      #   determine installation files
    1.71      %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
    1.72 -        %{l_files_std} \
    1.73 -        "%doc %{l_prefix}/share/%{name}/doc"
    1.74 +%if "%{with_htmldocs}" == "yes"
    1.75 +        "%doc %{l_prefix}/share/%{name}/doc" \
    1.76 +%endif
    1.77 +        %{l_files_std}
    1.78  
    1.79  %files -f files
    1.80  
    1.81  %clean
    1.82 -    rm -rf $RPM_BUILD_ROOT
    1.83  

mercurial