sproxy/sproxy.spec

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
child 594
bfc60517623b
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

michael@66 1 ##
michael@66 2 ## sproxy.spec -- OpenPKG RPM Specification
michael@66 3 ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
michael@66 4 ##
michael@66 5 ## Permission to use, copy, modify, and distribute this software for
michael@66 6 ## any purpose with or without fee is hereby granted, provided that
michael@66 7 ## the above copyright notice and this permission notice appear in all
michael@66 8 ## copies.
michael@66 9 ##
michael@66 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@66 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@66 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@66 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@66 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@66 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@66 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@66 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@66 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@66 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@66 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@66 21 ## SUCH DAMAGE.
michael@66 22 ##
michael@66 23
michael@66 24
michael@66 25 # package information
michael@66 26 Name: sproxy
michael@66 27 Summary: URL Harvesting HTTP Proxy
michael@66 28 URL: http://www.joedog.org/index/sproxy-home/
michael@66 29 Vendor: Jeffrey Fulmer
michael@66 30 Packager: Michael Schloh von Bennewitz
michael@66 31 Distribution: Europalab Production
michael@66 32 Class: EVAL
michael@66 33 Group: Network
michael@66 34 License: GPL
michael@66 35 Version: 1.01
michael@66 36 Release: 20090106
michael@66 37
michael@66 38 # list of sources
michael@66 39 Source0: ftp://sid.joedog.org/pub/sproxy/sproxy-%{version}.tar.gz
michael@66 40
michael@66 41 # build information
michael@66 42 Prefix: %{l_prefix}
michael@66 43 BuildRoot: %{l_buildroot}
michael@66 44 BuildPreReq: OpenPKG, openpkg >= 20040130, perl
michael@66 45 PreReq: OpenPKG, openpkg >= 20040130, perl, perl-www
michael@66 46 AutoReq: no
michael@66 47 AutoReqProv: no
michael@66 48
michael@66 49 %description
michael@66 50 Sproxy is a tool designed to harvest URLs for a HTTP/HTTPS test tool
michael@66 51 such as Siege. Sproxy is designed to work like a regular HTTP proxy.
michael@66 52 It listens for HTTP requests on port 9001 (default) and it returns
michael@66 53 requested content to the web browser while writing the URL along
michael@66 54 with any GET or POST data to a file.
michael@66 55
michael@66 56 %track
michael@66 57 prog sproxy = {
michael@66 58 version = %{version}
michael@66 59 url = ftp://sid.joedog.org/pub/sproxy/
michael@66 60 regex = sproxy-(__VER__)\.tar\.gz
michael@66 61 }
michael@66 62
michael@66 63 %prep
michael@66 64 %setup -q
michael@66 65 %{l_shtool} subst \
michael@66 66 -e 's; \(\$(bindir)\); $(DESTDIR)\1;' \
michael@66 67 -e 's; \(\$(prefix)\); $(DESTDIR)\1;' \
michael@66 68 -e 's;\$(prefix)/etc;$(sysconfdir);' \
michael@66 69 doc/Makefile.in \
michael@66 70 src/Makefile.in
michael@66 71
michael@66 72 %build
michael@66 73 ./configure \
michael@66 74 --prefix=%{l_prefix} \
michael@66 75 --sysconfdir=%{l_prefix}/etc/sproxy
michael@66 76 %{l_make} %{l_mflags}
michael@66 77
michael@66 78 %install
michael@66 79 rm -rf $RPM_BUILD_ROOT
michael@66 80 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@66 81 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/sproxy
michael@66 82 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@66 83
michael@66 84 %files -f files
michael@66 85

mercurial