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