flvtool/flvtool.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 387
33ae2d61c751
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@115 1 ##
michael@115 2 ## flvtool.spec -- OpenPKG RPM Specification
michael@115 3 ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
michael@115 4 ##
michael@115 5 ## Permission to use, copy, modify, and distribute this software for
michael@115 6 ## any purpose with or without fee is hereby granted, provided that
michael@115 7 ## the above copyright notice and this permission notice appear in all
michael@115 8 ## copies.
michael@115 9 ##
michael@115 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@115 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@115 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@115 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@115 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@115 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@115 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@115 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@115 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@115 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@115 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@115 21 ## SUCH DAMAGE.
michael@115 22 ##
michael@115 23
michael@115 24
michael@115 25 # package information
michael@115 26 Name: flvtool
michael@115 27 Summary: Flash video and meta data manipulation
michael@115 28 URL: http://www.inlet-media.de/flvtool2/
michael@115 29 Vendor: Norman Timmler
michael@115 30 Packager: Michael Schloh von Bennewitz
michael@115 31 Distribution: Michael Schloh von Bennewitz
michael@115 32 Class: EVAL
michael@115 33 Group: Flash
michael@115 34 License: BSD
michael@115 35 Version: 1.0.6
michael@115 36 Release: 20090106
michael@115 37
michael@115 38 # list of sources
michael@115 39 Source0: http://rubyforge.org/frs/download.php/17497/flvtool2-%{version}.tgz
michael@115 40
michael@115 41 # build information
michael@115 42 Prefix: %{l_prefix}
michael@115 43 BuildRoot: %{l_buildroot}
michael@115 44 BuildPreReq: OpenPKG, openpkg >= 20040130, ruby
michael@115 45 PreReq: OpenPKG, openpkg >= 20040130, ruby
michael@115 46 AutoReq: no
michael@115 47 AutoReqProv: no
michael@115 48
michael@115 49 %description
michael@115 50 FLVTool2 is a manipulation tool for Macromedia Flash Video files
michael@115 51 (FLV). It can calculate a lot of meta data and insert a onMetaData
michael@115 52 tag. It can cut FLV files and add cue Points (onCuePoint). A debug
michael@115 53 command lets you see inside our FLV and the print command gives you
michael@115 54 meta data information in XML or YAML format.
michael@115 55
michael@115 56 %track
michael@115 57 prog flvtool = {
michael@115 58 version = %{version}
michael@115 59 url = http://rubyforge.org/frs/download.php/17497/
michael@115 60 regex = flvtool2-(__VER__)\.tgz
michael@115 61 }
michael@115 62
michael@115 63 %prep
michael@115 64 # unpack sources
michael@115 65 %setup -q -n flvtool2-%{version}
michael@115 66
michael@115 67 # correct build configuration
michael@115 68 %{l_shtool} subst \
michael@115 69 -e 's;\(File.open(path\));\1, :encoding => "ISO-8859-1");g' \
michael@115 70 setup.rb
michael@115 71
michael@115 72 %build
michael@115 73 ruby setup.rb config
michael@115 74 ruby setup.rb setup
michael@115 75 ruby setup.rb test
michael@115 76
michael@115 77 %install
michael@115 78 # remove previously existing installations
michael@115 79 rm -rf $RPM_BUILD_ROOT
michael@115 80
michael@115 81 # run the native installation logic
michael@115 82 ruby setup.rb install --prefix=$RPM_BUILD_ROOT
michael@115 83
michael@115 84 # determine installation files
michael@115 85 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@115 86
michael@115 87 %files -f files
michael@115 88
michael@115 89 %clean
michael@115 90 rm -rf $RPM_BUILD_ROOT
michael@115 91

mercurial