source: spec/trunk/SPECS/bison.spec@ 360

Last change on this file since 360 was 299, checked in by Yuri Dario, 14 years ago

spec: bison, flex, fixed m4 executable location.

File size: 3.8 KB
Line 
1Summary: A GNU general-purpose parser generator
2Name: bison
3Version: 2.5
4Release: 2%{?dist}
5License: GPLv2+
6Group: Development/Tools
7Source: ftp://ftp.gnu.org/pub/gnu/bison/bison-%{version}.tar.bz2
8Patch0: bison-os2.patch
9#Patch1: bison-2.4-reap_subpipe.patch
10URL: http://www.gnu.org/software/bison/
11BuildRoot: %{_tmppath}/%{name}-root
12BuildRequires: m4 >= 1.4
13#BuildRequires: java-1.6.0-openjdk-devel
14
15Requires: m4 >= 1.4
16
17%description
18Bison is a general purpose parser generator that converts a grammar
19description for an LALR(1) context-free grammar into a C program to
20parse that grammar. Bison can be used to develop a wide range of
21language parsers, from ones used in simple desk calculators to complex
22programming languages. Bison is upwardly compatible with Yacc, so any
23correctly written Yacc grammar should work with Bison without any
24changes. If you know Yacc, you shouldn't have any trouble using
25Bison. You do need to be very proficient in C programming to be able
26to use Bison. Bison is only needed on systems that are used for
27development.
28
29If your system will be used for C development, you should install
30Bison.
31
32%package devel
33Summary: -ly library for development using Bison-generated parsers
34Group: Development/Libraries
35
36%description devel
37The bison-devel package contains the -ly library sometimes used by
38programs using Bison-generated parsers. If you are developing programs
39using Bison, you might want to link with this library. This library
40is not required by all Bison-generated parsers, but may be employed by
41simple programs to supply minimal support for the generated parsers.
42
43# -ly is kept static. It only contains two symbols: main and yyerror,
44# and both of these are extremely simple (couple lines of C total).
45# It doesn't really pay off to introduce a shared library for that.
46#
47# Therefore -devel subpackage could have been created as -static, but
48# the split was done in Jan 2005, which predates current guidelines.
49# Besides there is logic to that: the library is devel in the sense
50# that the generated parser could be distributed together with other
51# sources, and only bison-devel would be necessary to wrap the build.
52
53%package runtime
54Summary: Runtime support files used by Bison-generated parsers
55Group: Development/Libraries
56
57%description runtime
58The bison-runtime package contains files used at runtime by parsers
59that Bison generates. Packages whose binaries contain parsers
60generated by Bison should depend on bison-runtime to ensure that
61these files are available. See the Internationalization in the
62Bison manual section for more information.
63
64%prep
65%setup -q
66%patch0 -p1
67#%patch1 -p1
68
69%build
70export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
71export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
72export LIBS="-lurpo -lmmap"
73export M4="/@unixroot/usr/bin/m4.exe"
74%configure \
75 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
76make %{?_smp_mflags}
77
78#%check
79#make check
80#make maintainer-check
81
82%install
83rm -rf $RPM_BUILD_ROOT
84%makeinstall
85
86# Remove unpackaged files.
87rm -f $RPM_BUILD_ROOT/%{_bindir}/yacc
88rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
89rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/yacc*
90rm -f $RPM_BUILD_ROOT/%{_libdir}/charset.alias
91
92#%find_lang %{name}
93#%find_lang %{name}-runtime
94
95gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/bison.info*
96
97# The distribution contains also source files. These are used by m4
98# when the target parser file is generated.
99%files
100%defattr(-,root,root)
101%doc AUTHORS ChangeLog NEWS OChangeLog README THANKS TODO
102%{_mandir}/*/bison*
103%{_datadir}/bison
104%{_infodir}/bison.info*
105%{_bindir}/bison.exe
106%{_datadir}/aclocal/bison*.m4
107%{_datadir}/locale/*
108
109%files devel
110%defattr(-,root,root)
111%{_libdir}/liby.a
112
113#%files runtime
114#%defattr(-,root,root)
115#%{_datadir}/locale/bison-runtime.*
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120%changelog
121* Tue Feb 28 2012 yd
122- fixed m4 executable location.
123
124* Fri Jan 06 2012 yd
125- initial unixroot build.
Note: See TracBrowser for help on using the repository browser.