Fri, 03 Aug 2012 20:11:53 +0200
Neutralize buggy code causing OpenPKG to have 'fatal problems' in
spite of correct installation, configuration, and operation. An
administrator suffering from this failure is even unable to
uninstall the flawed software.
michael@120 | 1 | ## |
michael@120 | 2 | ## cgicc.spec -- OpenPKG RPM Specification |
michael@245 | 3 | ## Copyright (c) 2010 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@245 | 36 | Release: 20100510 |
michael@120 | 37 | |
michael@120 | 38 | # list of sources |
michael@120 | 39 | Source0: ftp://ftp.gnu.org/gnu/cgicc/cgicc-%{version}.tar.gz |
michael@120 | 40 | |
michael@120 | 41 | # build information |
michael@120 | 42 | Prefix: %{l_prefix} |
michael@120 | 43 | BuildRoot: %{l_buildroot} |
michael@120 | 44 | BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, automake, libtool |
michael@120 | 45 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@120 | 46 | AutoReq: no |
michael@120 | 47 | AutoReqProv: no |
michael@120 | 48 | |
michael@120 | 49 | %description |
michael@120 | 50 | Compatible with FastCGI, GNU cgicc is a ANSI C++ compliant |
michael@120 | 51 | class library that greatly simplifies the creation of CGI |
michael@120 | 52 | applications. It parses both GET and POST form data transparently, |
michael@120 | 53 | provides string, integer, floating-point and single and multiple |
michael@120 | 54 | choice retrieval methods for form data, provides methods for |
michael@120 | 55 | saving and restoring CGI environments to aid in application |
michael@120 | 56 | debugging, provides full on the fly HTML generation capabilities, |
michael@120 | 57 | with support for cookies, and supports HTTP file upload. |
michael@120 | 58 | |
michael@120 | 59 | %track |
michael@120 | 60 | prog cgicc = { |
michael@120 | 61 | version = %{version} |
michael@120 | 62 | url = ftp://ftp.gnu.org/gnu/cgicc/ |
michael@120 | 63 | regex = cgicc-(__VER__)\.tar\.gz |
michael@120 | 64 | } |
michael@120 | 65 | |
michael@120 | 66 | %prep |
michael@120 | 67 | # unpack sources |
michael@120 | 68 | %setup -q |
michael@120 | 69 | |
michael@120 | 70 | # reconstruct broken build configuration |
michael@120 | 71 | aclocal |
michael@120 | 72 | libtoolize |
michael@120 | 73 | automake --add-missing |
michael@120 | 74 | |
michael@120 | 75 | # repair still incorrect build configuration |
michael@120 | 76 | %{l_shtool} subst \ |
michael@120 | 77 | -e 's;^docdir *=.*;docdir = @docdir@;' \ |
michael@120 | 78 | doc/Makefile.* |
michael@120 | 79 | |
michael@120 | 80 | %build |
michael@120 | 81 | # prepare configuration |
michael@120 | 82 | CC="%{l_cc}" \ |
michael@120 | 83 | CFLAGS="%{l_cflags -O}" \ |
michael@120 | 84 | CPPFLAGS="%{l_cppflags}" \ |
michael@120 | 85 | LDFLAGS="%{l_ldflags}" \ |
michael@120 | 86 | ./configure \ |
michael@120 | 87 | --prefix=%{l_prefix} \ |
michael@120 | 88 | --docdir=%{l_prefix}/share/%{name}/doc \ |
michael@120 | 89 | --disable-shared |
michael@120 | 90 | |
michael@120 | 91 | # build using parallel make |
michael@120 | 92 | %{l_make} %{l_mflags -O} |
michael@120 | 93 | |
michael@120 | 94 | %install |
michael@120 | 95 | # remove previously existing installations |
michael@120 | 96 | rm -rf $RPM_BUILD_ROOT |
michael@120 | 97 | |
michael@120 | 98 | # run the native installation logic |
michael@120 | 99 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@120 | 100 | |
michael@120 | 101 | # determine installation files |
michael@133 | 102 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@133 | 103 | %{l_files_std} \ |
michael@245 | 104 | "%doc %{l_prefix}/share/%{name}/doc" |
michael@120 | 105 | |
michael@120 | 106 | %files -f files |
michael@120 | 107 | |
michael@120 | 108 | %clean |
michael@120 | 109 | rm -rf $RPM_BUILD_ROOT |
michael@120 | 110 |