| 1 | #define svn_url e:/trees/bison/trunk
|
|---|
| 2 | %define svn_url http://svn.netlabs.org/repos/ports/bison/trunk
|
|---|
| 3 | %define svn_rev 1621
|
|---|
| 4 |
|
|---|
| 5 | Summary: A GNU general-purpose parser generator
|
|---|
| 6 | Name: bison
|
|---|
| 7 | Version: 3.0.4
|
|---|
| 8 | Release: 1%{?dist}
|
|---|
| 9 | License: GPLv3+
|
|---|
| 10 | Group: Development/Tools
|
|---|
| 11 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 12 | URL: http://www.gnu.org/software/bison/
|
|---|
| 13 | Vendor: bww bitwise works GmbH
|
|---|
| 14 |
|
|---|
| 15 | # testsuite dependency
|
|---|
| 16 | BuildRequires: autoconf
|
|---|
| 17 | BuildRequires: flex
|
|---|
| 18 |
|
|---|
| 19 | BuildRoot: %{_tmppath}/%{name}-root
|
|---|
| 20 | BuildRequires: m4 >= 1.4
|
|---|
| 21 | #BuildRequires: java-1.6.0-openjdk-devel
|
|---|
| 22 | #Requires(post): /sbin/install-info
|
|---|
| 23 | #Requires(preun): /sbin/install-info
|
|---|
| 24 |
|
|---|
| 25 | Requires: m4 >= 1.4
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | %description
|
|---|
| 29 | Bison is a general purpose parser generator that converts a grammar
|
|---|
| 30 | description for an LALR(1) context-free grammar into a C program to
|
|---|
| 31 | parse that grammar. Bison can be used to develop a wide range of
|
|---|
| 32 | language parsers, from ones used in simple desk calculators to complex
|
|---|
| 33 | programming languages. Bison is upwardly compatible with Yacc, so any
|
|---|
| 34 | correctly written Yacc grammar should work with Bison without any
|
|---|
| 35 | changes. If you know Yacc, you shouldn't have any trouble using
|
|---|
| 36 | Bison. You do need to be very proficient in C programming to be able
|
|---|
| 37 | to use Bison. Bison is only needed on systems that are used for
|
|---|
| 38 | development.
|
|---|
| 39 |
|
|---|
| 40 | If your system will be used for C development, you should install
|
|---|
| 41 | Bison.
|
|---|
| 42 |
|
|---|
| 43 | %package devel
|
|---|
| 44 | Summary: -ly library for development using Bison-generated parsers
|
|---|
| 45 | Group: Development/Libraries
|
|---|
| 46 | Provides: bison-static = %{version}-%{release}
|
|---|
| 47 |
|
|---|
| 48 | %description devel
|
|---|
| 49 | The bison-devel package contains the -ly library sometimes used by
|
|---|
| 50 | programs using Bison-generated parsers. If you are developing programs
|
|---|
| 51 | using Bison, you might want to link with this library. This library
|
|---|
| 52 | is not required by all Bison-generated parsers, but may be employed by
|
|---|
| 53 | simple programs to supply minimal support for the generated parsers.
|
|---|
| 54 |
|
|---|
| 55 | # -ly is kept static. It only contains two symbols: main and yyerror,
|
|---|
| 56 | # and both of these are extremely simple (couple lines of C total).
|
|---|
| 57 | # It doesn't really pay off to introduce a shared library for that.
|
|---|
| 58 | #
|
|---|
| 59 | # Therefore -devel subpackage could have been created as -static, but
|
|---|
| 60 | # the split was done in Jan 2005, which predates current guidelines.
|
|---|
| 61 | # Besides there is logic to that: the library is devel in the sense
|
|---|
| 62 | # that the generated parser could be distributed together with other
|
|---|
| 63 | # sources, and only bison-devel would be necessary to wrap the build.
|
|---|
| 64 |
|
|---|
| 65 | %package runtime
|
|---|
| 66 | Summary: Runtime support files used by Bison-generated parsers
|
|---|
| 67 | Group: Development/Libraries
|
|---|
| 68 |
|
|---|
| 69 | %description runtime
|
|---|
| 70 | The bison-runtime package contains files used at runtime by parsers
|
|---|
| 71 | that Bison generates. Packages whose binaries contain parsers
|
|---|
| 72 | generated by Bison should depend on bison-runtime to ensure that
|
|---|
| 73 | these files are available. See the Internationalization in the
|
|---|
| 74 | Bison manual section for more information.
|
|---|
| 75 |
|
|---|
| 76 | %debug_package
|
|---|
| 77 |
|
|---|
| 78 | %prep
|
|---|
| 79 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 80 | %setup -q
|
|---|
| 81 | %else
|
|---|
| 82 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 83 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 84 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 85 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 86 | %endif
|
|---|
| 87 |
|
|---|
| 88 | # work-around Rpath
|
|---|
| 89 | autoreconf -fi
|
|---|
| 90 |
|
|---|
| 91 | %build
|
|---|
| 92 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 93 | %configure --docdir=%{_docdir}/%{name}-%{version}
|
|---|
| 94 | make %{?_smp_mflags}
|
|---|
| 95 |
|
|---|
| 96 | %check
|
|---|
| 97 | export POSIXLY_CORRECT=1
|
|---|
| 98 | # checks are still disabled, beside test 385 all work
|
|---|
| 99 | # test 385 gives error 22 in printf()
|
|---|
| 100 | #make check
|
|---|
| 101 | #make maintainer-check
|
|---|
| 102 |
|
|---|
| 103 | %install
|
|---|
| 104 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 105 | %makeinstall
|
|---|
| 106 |
|
|---|
| 107 | # Remove unpackaged files.
|
|---|
| 108 | rm -f $RPM_BUILD_ROOT/%{_bindir}/yacc
|
|---|
| 109 | rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
|---|
| 110 | rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/yacc*
|
|---|
| 111 | rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/calc++/*
|
|---|
| 112 | rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/mfcalc/*
|
|---|
| 113 | rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/rpcalc/*
|
|---|
| 114 |
|
|---|
| 115 | %find_lang %{name}
|
|---|
| 116 | %find_lang %{name}-runtime
|
|---|
| 117 |
|
|---|
| 118 | gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/bison.info*
|
|---|
| 119 |
|
|---|
| 120 | %post
|
|---|
| 121 | #if [ -f %{_infodir}/bison.info.gz ]; then # for --excludedocs
|
|---|
| 122 | # /sbin/install-info %{_infodir}/bison.info.gz %{_infodir}/dir --entry="* bison: (bison). The GNU parser generator." || :
|
|---|
| 123 | #fi
|
|---|
| 124 |
|
|---|
| 125 | %preun
|
|---|
| 126 | #if [ $1 = 0 ]; then
|
|---|
| 127 | # if [ -f %{_infodir}/bison.info.gz ]; then # for --excludedocs
|
|---|
| 128 | # /sbin/install-info --delete %{_infodir}/bison.info.gz %{_infodir}/dir --entry="* bison: (bison). The GNU parser generator." || :
|
|---|
| 129 | # fi
|
|---|
| 130 | #fi
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 | %clean
|
|---|
| 134 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 135 |
|
|---|
| 136 |
|
|---|
| 137 | # The distribution contains also source files. These are used by m4
|
|---|
| 138 | # when the target parser file is generated.
|
|---|
| 139 | %files -f %{name}.lang
|
|---|
| 140 | %defattr(-,root,root)
|
|---|
| 141 | %doc AUTHORS ChangeLog NEWS README THANKS TODO COPYING
|
|---|
| 142 | %{_mandir}/*/bison*
|
|---|
| 143 | %{_datadir}/bison
|
|---|
| 144 | %{_infodir}/bison.info*
|
|---|
| 145 | %{_bindir}/bison.exe
|
|---|
| 146 | %{_datadir}/aclocal/bison*.m4
|
|---|
| 147 |
|
|---|
| 148 | %files -f %{name}-runtime.lang runtime
|
|---|
| 149 | %doc COPYING
|
|---|
| 150 |
|
|---|
| 151 | %files devel
|
|---|
| 152 | %doc COPYING
|
|---|
| 153 | %defattr(-,root,root)
|
|---|
| 154 | %{_libdir}/liby.a
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 | %changelog
|
|---|
| 158 | * Mon Jun 27 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.0.4-1
|
|---|
| 159 | - update to version 3.0.4
|
|---|
| 160 | - add debug package
|
|---|
| 161 |
|
|---|
| 162 | * Tue Feb 28 2012 yd
|
|---|
| 163 | - fixed m4 executable location.
|
|---|
| 164 |
|
|---|
| 165 | * Fri Jan 06 2012 yd
|
|---|
| 166 | - initial unixroot build.
|
|---|