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@22 | 1 | ## |
michael@22 | 2 | ## bison.spec -- OpenPKG RPM Package Specification |
michael@451 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@22 | 4 | ## |
michael@22 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@22 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@22 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@22 | 8 | ## copies. |
michael@22 | 9 | ## |
michael@22 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@22 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@22 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@22 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@22 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@22 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@22 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@22 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@22 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@22 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@22 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@22 | 21 | ## SUCH DAMAGE. |
michael@22 | 22 | ## |
michael@22 | 23 | |
michael@22 | 24 | # package versions |
michael@451 | 25 | %define V_new 2.6 |
michael@22 | 26 | %define V_old 1.35 |
michael@22 | 27 | |
michael@22 | 28 | # package information |
michael@22 | 29 | Name: bison |
michael@22 | 30 | Summary: Yacc-compatible LALR(1) Parser Generator |
michael@22 | 31 | URL: http://www.gnu.org/software/bison/ |
michael@22 | 32 | Vendor: Free Software Foundation |
michael@22 | 33 | Packager: OpenPKG Foundation e.V. |
michael@22 | 34 | Distribution: OpenPKG Community |
michael@22 | 35 | Class: CORE |
michael@22 | 36 | Group: CompilerCompiler |
michael@22 | 37 | License: GPL |
michael@22 | 38 | Version: %{V_new} |
michael@452 | 39 | Release: 20120800 |
michael@22 | 40 | |
michael@22 | 41 | # package options |
michael@22 | 42 | %option with_old no |
michael@22 | 43 | |
michael@22 | 44 | # list of sources |
michael@452 | 45 | Source0: ftp://ftp.gnu.org/gnu/bison/bison-%{V_new}.tar.gz |
michael@452 | 46 | Source1: ftp://ftp.gnu.org/gnu/bison/bison-%{V_old}.tar.gz |
michael@22 | 47 | Patch0: bison.patch |
michael@22 | 48 | |
michael@22 | 49 | # build information |
michael@451 | 50 | BuildPreReq: OpenPKG, openpkg >= 20100101, m4, make |
michael@451 | 51 | PreReq: OpenPKG, openpkg >= 20100101, m4 |
michael@22 | 52 | Conflicts: yacc |
michael@22 | 53 | |
michael@22 | 54 | %description |
michael@22 | 55 | Bison is a general-purpose parser generator that converts a grammar |
michael@22 | 56 | description for an LALR(1) context-free grammar into a C program |
michael@22 | 57 | to parse that grammar. Once you are proficient with bison, you may |
michael@22 | 58 | use it to develop a wide range of language parsers, from those used |
michael@22 | 59 | in simple desk calculators to complex programming languages. Bison |
michael@22 | 60 | is upward compatible with yacc: all properly-written yacc grammars |
michael@22 | 61 | ought to work with bison with no change. Anyone familiar with yacc |
michael@22 | 62 | should be able to use bison with little trouble. |
michael@22 | 63 | |
michael@22 | 64 | %track |
michael@22 | 65 | prog bison:new = { |
michael@22 | 66 | version = %{V_new} |
michael@452 | 67 | url = ftp://ftp.gnu.org/gnu/bison/ |
michael@22 | 68 | regex = bison-(2.\d+(.\d+)*[a-z]?)\.tar\.gz |
michael@22 | 69 | } |
michael@22 | 70 | prog bison:old = { |
michael@22 | 71 | version = %{V_old} |
michael@452 | 72 | url = ftp://ftp.gnu.org/gnu/bison/ |
michael@22 | 73 | regex = bison-(1\.3\d+)\.tar\.gz |
michael@22 | 74 | } |
michael@22 | 75 | |
michael@22 | 76 | %prep |
michael@22 | 77 | %setup -q -c -n bison-%{V_new} |
michael@22 | 78 | %patch -p0 -d bison-%{V_new} |
michael@22 | 79 | %setup -q -T -D -a 1 |
michael@22 | 80 | %{l_shtool} subst \ |
michael@451 | 81 | -e 's;ac_config_files.*etc/bench\.pl";;' \ |
michael@452 | 82 | -e 's;\(\$LEX_IS_FLEX\) \(|| as_fn_error\);#\1-CHICK_EGG \2;' \ |
michael@451 | 83 | bison-%{V_new}/configure |
michael@451 | 84 | %{l_shtool} subst \ |
michael@22 | 85 | -e 's;^\( *SUBDIRS = .*\) examples\(.*\)$;\1\2;' \ |
michael@451 | 86 | -e 's;^\( *SUBDIRS = .*\) tests\(.*\)$;\1\2;' \ |
michael@451 | 87 | -e 's;^\( *SUBDIRS = .*\) etc\(.*\)$;\1\2;' \ |
michael@22 | 88 | bison-%{V_new}/Makefile.in |
michael@451 | 89 | touch bison-%{V_new}/doc/bison.1 |
michael@22 | 90 | |
michael@22 | 91 | %build |
michael@22 | 92 | ( cd bison-%{V_new} |
michael@22 | 93 | CC="%{l_cc}" \ |
michael@22 | 94 | CFLAGS="%{l_cflags -O}" \ |
michael@451 | 95 | CONFIG_SHELL="%{l_bash}" \ |
michael@451 | 96 | GREP="grep" \ |
michael@451 | 97 | "%{l_bash}" configure \ |
michael@22 | 98 | --prefix=%{l_prefix} \ |
michael@22 | 99 | --mandir=%{l_prefix}/man \ |
michael@22 | 100 | --infodir=%{l_prefix}/info \ |
michael@22 | 101 | --disable-nls |
michael@636 | 102 | %{l_make} -f Makefile %{l_mflags -O} |
michael@22 | 103 | ) || exit $? |
michael@22 | 104 | %if "%{with_old}" == "yes" |
michael@22 | 105 | ( cd bison-%{V_old} |
michael@22 | 106 | CC="%{l_cc}" \ |
michael@22 | 107 | CFLAGS="%{l_cflags -O}" \ |
michael@451 | 108 | GREP="grep" \ |
michael@22 | 109 | ./configure \ |
michael@22 | 110 | --prefix=%{l_prefix} \ |
michael@22 | 111 | --mandir=%{l_prefix}/man \ |
michael@22 | 112 | --infodir=%{l_prefix}/info \ |
michael@22 | 113 | --disable-nls |
michael@636 | 114 | %{l_make} -f Makefile %{l_mflags -O} |
michael@22 | 115 | ) || exit $? |
michael@22 | 116 | %endif |
michael@22 | 117 | |
michael@22 | 118 | %install |
michael@22 | 119 | %if "%{with_old}" == "yes" |
michael@22 | 120 | ( cd bison-%{V_old} |
michael@636 | 121 | %{l_make} -f Makefile %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" |
michael@22 | 122 | mv $RPM_BUILD_ROOT%{l_prefix}/bin/bison \ |
michael@22 | 123 | $RPM_BUILD_ROOT%{l_prefix}/bin/bison-old |
michael@22 | 124 | mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/bison.1 \ |
michael@22 | 125 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/bison-old.1 |
michael@22 | 126 | ) || exit $? |
michael@22 | 127 | %endif |
michael@22 | 128 | ( cd bison-%{V_new} |
michael@636 | 129 | %{l_make} -f Makefile %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" |
michael@22 | 130 | ) || exit $? |
michael@22 | 131 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale |
michael@22 | 132 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
michael@22 | 133 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias |
michael@22 | 134 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@22 | 135 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@22 | 136 | |
michael@22 | 137 | %files -f files |
michael@22 | 138 | |
michael@22 | 139 | %clean |
michael@22 | 140 |