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

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

spec: bison, initial build.

File size: 3.7 KB
Line 
1Summary: A GNU general-purpose parser generator
2Name: bison
3Version: 2.5
4Release: 1%{?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"
73%configure \
74 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
75make %{?_smp_mflags}
76
77#%check
78#make check
79#make maintainer-check
80
81%install
82rm -rf $RPM_BUILD_ROOT
83%makeinstall
84
85# Remove unpackaged files.
86rm -f $RPM_BUILD_ROOT/%{_bindir}/yacc
87rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
88rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/yacc*
89rm -f $RPM_BUILD_ROOT/%{_libdir}/charset.alias
90
91#%find_lang %{name}
92#%find_lang %{name}-runtime
93
94gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/bison.info*
95
96# The distribution contains also source files. These are used by m4
97# when the target parser file is generated.
98%files
99%defattr(-,root,root)
100%doc AUTHORS ChangeLog NEWS OChangeLog README THANKS TODO
101%{_mandir}/*/bison*
102%{_datadir}/bison
103%{_infodir}/bison.info*
104%{_bindir}/bison.exe
105%{_datadir}/aclocal/bison*.m4
106%{_datadir}/locale/*
107
108%files devel
109%defattr(-,root,root)
110%{_libdir}/liby.a
111
112#%files runtime
113#%defattr(-,root,root)
114#%{_datadir}/locale/bison-runtime.*
115
116%clean
117rm -rf $RPM_BUILD_ROOT
118
119%changelog
120* Fri Jan 06 2012 yd
121- initial unixroot build.
Note: See TracBrowser for help on using the repository browser.