Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 ##
2 ## cgicc.spec -- OpenPKG RPM Specification
3 ## Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
25 # package information
26 Name: cgicc
27 Summary: C++ class library for writing CGI applications
28 URL: http://www.gnu.org/software/cgicc/
29 Vendor: Stephen F. Booth
30 Packager: Michael Schloh von Bennewitz
31 Distribution: Europalab Networks Production
32 Class: EVAL
33 Group: Web
34 License: GPL
35 Version: 3.2.9
36 Release: 20120800
38 # package options
39 %option with_htmldocs no
41 # list of sources
42 Source0: ftp://ftp.gnu.org/gnu/cgicc/cgicc-%{version}.tar.gz
44 # build information
45 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, automake, libtool
46 PreReq: OpenPKG, openpkg >= 20100101
47 %if "%{with_htmldocs}" == "yes"
48 BuildPreReq: doxygen
49 %endif
51 %description
52 Compatible with FastCGI, GNU cgicc is a ANSI C++ compliant
53 class library that greatly simplifies the creation of CGI
54 applications. It parses both GET and POST form data transparently,
55 provides string, integer, floating-point and single and multiple
56 choice retrieval methods for form data, provides methods for
57 saving and restoring CGI environments to aid in application
58 debugging, provides full on the fly HTML generation capabilities,
59 with support for cookies, and supports HTTP file upload.
61 %track
62 prog cgicc = {
63 version = %{version}
64 url = ftp://ftp.gnu.org/gnu/cgicc/
65 regex = cgicc-(__VER__)\.tar\.gz
66 }
68 %prep
69 # unpack sources
70 %setup -q
72 # reconstruct broken build configuration
73 aclocal
74 libtoolize
75 automake --add-missing
77 %if "%{with_htmldocs}" != "yes"
78 # avoid Doxygen dependent targets
79 %{l_shtool} subst \
80 -e 's;\(.*\$(MAKE) html-doc\);#\1;' \
81 -e 's;\(install-data-am:.*\)install-data-local;\1;' \
82 doc/Makefile.in
83 %endif
85 # repair still incorrect build configuration
86 %{l_shtool} subst \
87 -e 's;^docdir *=.*;docdir = @docdir@;' \
88 doc/Makefile.*
90 %build
91 # prepare configuration
92 CC="%{l_cc}" \
93 CFLAGS="%{l_cflags -O}" \
94 CPPFLAGS="%{l_cppflags}" \
95 LDFLAGS="%{l_ldflags}" \
96 ./configure \
97 --prefix=%{l_prefix} \
98 --docdir=%{l_prefix}/share/%{name}/doc \
99 --disable-shared
101 # build using parallel make
102 %{l_make} %{l_mflags -O}
104 %install
105 # run the native installation logic
106 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
108 # determine installation files
109 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
110 %if "%{with_htmldocs}" == "yes"
111 "%doc %{l_prefix}/share/%{name}/doc" \
112 %endif
113 %{l_files_std}
115 %files -f files
117 %clean