Fri, 15 Oct 2010 19:06:09 +0200
Correct shared library and plugin link logic, as well as informal text.
Update file server URL, update build resource estimations, correct RPATH
logic, allow for qmake(1) static to shared library changes via CONFIG
argument, correct documentation broken title and index links, correct
shared library install path, install only one set of (correct) plugins,
install the designer shared library (as required by QtCreator), announce
features related to shared linking using qmake(1), and correclty
substitute hard coded paths in prl and la library files.
michael@68 | 1 | ## |
michael@68 | 2 | ## binutils.spec -- OpenPKG RPM Package Specification |
michael@68 | 3 | ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@68 | 4 | ## |
michael@68 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@68 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@68 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@68 | 8 | ## copies. |
michael@68 | 9 | ## |
michael@68 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@68 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@68 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@68 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@68 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@68 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@68 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@68 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@68 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@68 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@68 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@68 | 21 | ## SUCH DAMAGE. |
michael@68 | 22 | ## |
michael@68 | 23 | |
michael@68 | 24 | # package information |
michael@68 | 25 | Name: binutils |
michael@68 | 26 | Summary: GNU Binary Utilities |
michael@68 | 27 | URL: http://sources.redhat.com/binutils/ |
michael@68 | 28 | Vendor: Free Software Foundation |
michael@68 | 29 | Packager: OpenPKG Foundation e.V. |
michael@68 | 30 | Distribution: OpenPKG Community |
michael@68 | 31 | Class: CORE |
michael@68 | 32 | Group: Compiler |
michael@68 | 33 | License: GPL |
michael@68 | 34 | Version: 2.18 |
michael@69 | 35 | Release: 20090106 |
michael@68 | 36 | |
michael@68 | 37 | # list of sources |
michael@68 | 38 | Source0: ftp://sources.redhat.com/pub/binutils/releases/binutils-%{version}.tar.bz2 |
michael@68 | 39 | Patch0: binutils.patch |
michael@68 | 40 | |
michael@68 | 41 | # build information |
michael@68 | 42 | Prefix: %{l_prefix} |
michael@68 | 43 | BuildRoot: %{l_buildroot} |
michael@68 | 44 | BuildPreReq: OpenPKG, openpkg >= 20060419, make |
michael@68 | 45 | PreReq: OpenPKG, openpkg >= 20060419 |
michael@68 | 46 | AutoReq: no |
michael@68 | 47 | AutoReqProv: no |
michael@68 | 48 | |
michael@68 | 49 | %description |
michael@68 | 50 | Binutils is a collection of binary utilities. It includes: ld |
michael@68 | 51 | (the GNU linker), addr2line (converts addresses into filenames |
michael@68 | 52 | and line numbers), as (the portable GNU assembler), ar (a utility |
michael@68 | 53 | for creating, modifying and extracting from archives), nm (lists |
michael@68 | 54 | symbols from object files), objcopy (copys and translates object |
michael@68 | 55 | files), objdump (displays information from object files), ranlib |
michael@68 | 56 | (generates an index to the contents of an archive), readelf |
michael@68 | 57 | (displays information from any ELF format object file), size (lists |
michael@68 | 58 | the section sizes of an object or archive file), strings (lists |
michael@68 | 59 | printable strings from files), strip (discards symbols) and gprof |
michael@68 | 60 | (displays profiling information). |
michael@68 | 61 | |
michael@68 | 62 | %track |
michael@68 | 63 | prog binutils = { |
michael@68 | 64 | version = %{version} |
michael@68 | 65 | url = ftp://sources.redhat.com/pub/binutils/releases/ |
michael@68 | 66 | regex = binutils-(__VER__)\.tar\.bz2 |
michael@68 | 67 | } |
michael@68 | 68 | |
michael@68 | 69 | %prep |
michael@68 | 70 | %setup -q |
michael@68 | 71 | %patch -p0 |
michael@68 | 72 | |
michael@68 | 73 | %build |
michael@68 | 74 | # configure package |
michael@68 | 75 | CC="%{l_cc}"; export CC |
michael@68 | 76 | CFLAGS="%{l_cflags}"; export CFLAGS |
michael@68 | 77 | ARGS="" |
michael@68 | 78 | case "%{l_platform -t}" in |
michael@68 | 79 | *-freebsd* ) CFLAGS="$CFLAGS -DOPENPKG_OS_FREEBSD" ;; |
michael@68 | 80 | *-linux* ) CFLAGS="$CFLAGS -DOPENPKG_OS_LINUX" ;; |
michael@68 | 81 | *-sunos* ) CFLAGS="$CFLAGS -DOPENPKG_OS_SOLARIS" ;; |
michael@68 | 82 | *-aix* ) ARGS="$ARGS --without-gnu-as --without-gnu-ld" ;; |
michael@68 | 83 | *-darwin* ) ARGS="$ARGS --without-gnu-as --without-gnu-ld" ;; |
michael@68 | 84 | esac |
michael@68 | 85 | case "%{l_platform -t}" in |
michael@68 | 86 | amd64-sunos* ) ARGS="$ARGS --enable-64-bit-bdf" ;; |
michael@68 | 87 | esac |
michael@68 | 88 | ( echo "#!/bin/sh" |
michael@68 | 89 | echo "touch lex.yy.c" |
michael@68 | 90 | echo "echo 'lex.sh:WARNING: local Lex wrapper unexpectedly called.' 1>&2" |
michael@68 | 91 | ) >lex.sh && chmod a+x lex.sh |
michael@68 | 92 | echo "ac_cv_prog_LEX=`pwd`/lex.sh" >ld/config.cache |
michael@68 | 93 | INSTALL="%{l_shtool} install -c" \ |
michael@68 | 94 | AR="%{l_ar}" \ |
michael@68 | 95 | MAKE="%{l_make}" \ |
michael@68 | 96 | CONFIG_SHELL="%{l_bash}" \ |
michael@68 | 97 | ./configure \ |
michael@68 | 98 | --prefix=%{l_prefix} \ |
michael@68 | 99 | --includedir=%{l_prefix}/include/binutils \ |
michael@68 | 100 | --libdir=%{l_prefix}/lib/binutils \ |
michael@68 | 101 | --disable-werror \ |
michael@68 | 102 | --disable-nls \ |
michael@68 | 103 | $ARGS |
michael@68 | 104 | |
michael@68 | 105 | # build package |
michael@68 | 106 | %{l_make} %{l_mflags} |
michael@68 | 107 | |
michael@68 | 108 | %install |
michael@68 | 109 | rm -rf $RPM_BUILD_ROOT |
michael@68 | 110 | |
michael@68 | 111 | # build package |
michael@68 | 112 | %{l_make} %{l_mflags} install \ |
michael@68 | 113 | prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@68 | 114 | exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@68 | 115 | includedir=$RPM_BUILD_ROOT%{l_prefix}/include/binutils \ |
michael@68 | 116 | libdir=$RPM_BUILD_ROOT%{l_prefix}/lib/binutils |
michael@68 | 117 | |
michael@68 | 118 | # platform specific stripping down of installation: |
michael@68 | 119 | # o GNU binutils strip(1) is broken on AIX, use of OS supplied |
michael@68 | 120 | # /usr/bin/strip from bos.rte.bind_cmds is mandatory. |
michael@68 | 121 | # o GNU binutils strip(1), ar(1) and ranlib(1) do not work under |
michael@68 | 122 | # Mac OS X (aka Darwin), system versions have to be used. |
michael@68 | 123 | case "%{l_platform -t}" in |
michael@68 | 124 | *-aix* ) |
michael@68 | 125 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/strip \ |
michael@68 | 126 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/strip.1 |
michael@68 | 127 | ;; |
michael@68 | 128 | *-darwin* ) |
michael@68 | 129 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/strip \ |
michael@68 | 130 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/strip.1 |
michael@68 | 131 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ar \ |
michael@68 | 132 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ar.1 |
michael@68 | 133 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ranlib \ |
michael@68 | 134 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ranlib.1 |
michael@68 | 135 | ;; |
michael@68 | 136 | esac |
michael@68 | 137 | |
michael@68 | 138 | # strip down installation |
michael@68 | 139 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
michael@68 | 140 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/standards.info |
michael@68 | 141 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/configure.info* |
michael@68 | 142 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/c++filt.1 |
michael@68 | 143 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/dlltool.1 |
michael@68 | 144 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/nlmconv.1 |
michael@68 | 145 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/windres.1 |
michael@68 | 146 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/*-*-* |
michael@68 | 147 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin/c++filt |
michael@68 | 148 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@68 | 149 | |
michael@68 | 150 | # determine installation files |
michael@68 | 151 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@68 | 152 | |
michael@68 | 153 | %files -f files |
michael@68 | 154 | |
michael@68 | 155 | %clean |
michael@68 | 156 | rm -rf $RPM_BUILD_ROOT |
michael@68 | 157 |