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@68 | 1 | ## |
michael@68 | 2 | ## binutils.spec -- OpenPKG RPM Package Specification |
michael@425 | 3 | ## Copyright (c) 2000-2011 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@425 | 24 | # package version |
michael@425 | 25 | %define V_opkg 2.22 |
michael@425 | 26 | %define V_base 2.22 |
michael@425 | 27 | %define V_patch %nil |
michael@425 | 28 | |
michael@68 | 29 | # package information |
michael@68 | 30 | Name: binutils |
michael@68 | 31 | Summary: GNU Binary Utilities |
michael@68 | 32 | URL: http://sources.redhat.com/binutils/ |
michael@68 | 33 | Vendor: Free Software Foundation |
michael@68 | 34 | Packager: OpenPKG Foundation e.V. |
michael@68 | 35 | Distribution: OpenPKG Community |
michael@68 | 36 | Class: CORE |
michael@68 | 37 | Group: Compiler |
michael@68 | 38 | License: GPL |
michael@425 | 39 | Version: %{V_opkg} |
michael@426 | 40 | Release: 20120800 |
michael@68 | 41 | |
michael@68 | 42 | # list of sources |
michael@425 | 43 | Source0: ftp://sources.redhat.com/pub/binutils/releases/binutils-%{V_base}.tar.bz2 |
michael@68 | 44 | Patch0: binutils.patch |
michael@68 | 45 | |
michael@68 | 46 | # build information |
michael@425 | 47 | BuildPreReq: OpenPKG, openpkg >= 20100101, make |
michael@425 | 48 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@68 | 49 | |
michael@68 | 50 | %description |
michael@68 | 51 | Binutils is a collection of binary utilities. It includes: ld |
michael@68 | 52 | (the GNU linker), addr2line (converts addresses into filenames |
michael@68 | 53 | and line numbers), as (the portable GNU assembler), ar (a utility |
michael@68 | 54 | for creating, modifying and extracting from archives), nm (lists |
michael@68 | 55 | symbols from object files), objcopy (copys and translates object |
michael@68 | 56 | files), objdump (displays information from object files), ranlib |
michael@68 | 57 | (generates an index to the contents of an archive), readelf |
michael@68 | 58 | (displays information from any ELF format object file), size (lists |
michael@68 | 59 | the section sizes of an object or archive file), strings (lists |
michael@68 | 60 | printable strings from files), strip (discards symbols) and gprof |
michael@68 | 61 | (displays profiling information). |
michael@68 | 62 | |
michael@68 | 63 | %track |
michael@68 | 64 | prog binutils = { |
michael@425 | 65 | version = %{V_base} |
michael@68 | 66 | url = ftp://sources.redhat.com/pub/binutils/releases/ |
michael@68 | 67 | regex = binutils-(__VER__)\.tar\.bz2 |
michael@68 | 68 | } |
michael@68 | 69 | |
michael@68 | 70 | %prep |
michael@425 | 71 | %setup -q -n binutils-%{V_base} |
michael@68 | 72 | %patch -p0 |
michael@426 | 73 | %{l_shtool} subst \ |
michael@426 | 74 | -e 's;MULTIOSDIR =.*;MULTIOSDIR =;' \ |
michael@426 | 75 | libiberty/Makefile.in |
michael@68 | 76 | |
michael@68 | 77 | %build |
michael@68 | 78 | # configure package |
michael@68 | 79 | CC="%{l_cc}"; export CC |
michael@68 | 80 | CFLAGS="%{l_cflags}"; export CFLAGS |
michael@68 | 81 | ARGS="" |
michael@68 | 82 | case "%{l_platform -t}" in |
michael@68 | 83 | *-freebsd* ) CFLAGS="$CFLAGS -DOPENPKG_OS_FREEBSD" ;; |
michael@68 | 84 | *-linux* ) CFLAGS="$CFLAGS -DOPENPKG_OS_LINUX" ;; |
michael@68 | 85 | *-sunos* ) CFLAGS="$CFLAGS -DOPENPKG_OS_SOLARIS" ;; |
michael@68 | 86 | *-aix* ) ARGS="$ARGS --without-gnu-as --without-gnu-ld" ;; |
michael@68 | 87 | *-darwin* ) ARGS="$ARGS --without-gnu-as --without-gnu-ld" ;; |
michael@68 | 88 | esac |
michael@68 | 89 | case "%{l_platform -t}" in |
michael@68 | 90 | amd64-sunos* ) ARGS="$ARGS --enable-64-bit-bdf" ;; |
michael@68 | 91 | esac |
michael@68 | 92 | ( echo "#!/bin/sh" |
michael@68 | 93 | echo "touch lex.yy.c" |
michael@68 | 94 | echo "echo 'lex.sh:WARNING: local Lex wrapper unexpectedly called.' 1>&2" |
michael@68 | 95 | ) >lex.sh && chmod a+x lex.sh |
michael@68 | 96 | echo "ac_cv_prog_LEX=`pwd`/lex.sh" >ld/config.cache |
michael@68 | 97 | INSTALL="%{l_shtool} install -c" \ |
michael@68 | 98 | AR="%{l_ar}" \ |
michael@68 | 99 | MAKE="%{l_make}" \ |
michael@68 | 100 | CONFIG_SHELL="%{l_bash}" \ |
michael@68 | 101 | ./configure \ |
michael@68 | 102 | --prefix=%{l_prefix} \ |
michael@331 | 103 | --mandir=%{l_prefix}/man \ |
michael@331 | 104 | --infodir=%{l_prefix}/info \ |
michael@68 | 105 | --includedir=%{l_prefix}/include/binutils \ |
michael@68 | 106 | --libdir=%{l_prefix}/lib/binutils \ |
michael@68 | 107 | --disable-werror \ |
michael@68 | 108 | --disable-nls \ |
michael@68 | 109 | $ARGS |
michael@68 | 110 | |
michael@68 | 111 | # build package |
michael@636 | 112 | %{l_make} %{l_mflags -O} |
michael@68 | 113 | |
michael@68 | 114 | %install |
michael@426 | 115 | # install package |
michael@68 | 116 | %{l_make} %{l_mflags} install \ |
michael@68 | 117 | prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@68 | 118 | exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@331 | 119 | mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ |
michael@331 | 120 | infodir=$RPM_BUILD_ROOT%{l_prefix}/info \ |
michael@68 | 121 | includedir=$RPM_BUILD_ROOT%{l_prefix}/include/binutils \ |
michael@68 | 122 | libdir=$RPM_BUILD_ROOT%{l_prefix}/lib/binutils |
michael@68 | 123 | |
michael@68 | 124 | # platform specific stripping down of installation: |
michael@68 | 125 | # o GNU binutils strip(1) is broken on AIX, use of OS supplied |
michael@68 | 126 | # /usr/bin/strip from bos.rte.bind_cmds is mandatory. |
michael@68 | 127 | # o GNU binutils strip(1), ar(1) and ranlib(1) do not work under |
michael@68 | 128 | # Mac OS X (aka Darwin), system versions have to be used. |
michael@68 | 129 | case "%{l_platform -t}" in |
michael@68 | 130 | *-aix* ) |
michael@68 | 131 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/strip \ |
michael@68 | 132 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/strip.1 |
michael@68 | 133 | ;; |
michael@68 | 134 | *-darwin* ) |
michael@68 | 135 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/strip \ |
michael@68 | 136 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/strip.1 |
michael@68 | 137 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ar \ |
michael@68 | 138 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ar.1 |
michael@68 | 139 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ranlib \ |
michael@68 | 140 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ranlib.1 |
michael@68 | 141 | ;; |
michael@68 | 142 | esac |
michael@68 | 143 | |
michael@68 | 144 | # strip down installation |
michael@68 | 145 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
michael@68 | 146 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/standards.info |
michael@68 | 147 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/configure.info* |
michael@68 | 148 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/c++filt.1 |
michael@68 | 149 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/dlltool.1 |
michael@68 | 150 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/nlmconv.1 |
michael@68 | 151 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/windres.1 |
michael@331 | 152 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/windmc.1 |
michael@68 | 153 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/*-*-* |
michael@68 | 154 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin/c++filt |
michael@68 | 155 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@68 | 156 | |
michael@68 | 157 | # determine installation files |
michael@68 | 158 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@68 | 159 | |
michael@68 | 160 | %files -f files |
michael@68 | 161 | |
michael@68 | 162 | %clean |
michael@68 | 163 |