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

Last change on this file since 1010 was 813, checked in by Silvan Scherrer, 9 years ago

spec: bison update to version 3.0.4

File size: 5.2 KB
Line 
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
5Summary: A GNU general-purpose parser generator
6Name: bison
7Version: 3.0.4
8Release: 1%{?dist}
9License: GPLv3+
10Group: Development/Tools
11Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
12URL: http://www.gnu.org/software/bison/
13Vendor: bww bitwise works GmbH
14
15# testsuite dependency
16BuildRequires: autoconf
17BuildRequires: flex
18
19BuildRoot: %{_tmppath}/%{name}-root
20BuildRequires: m4 >= 1.4
21#BuildRequires: java-1.6.0-openjdk-devel
22#Requires(post): /sbin/install-info
23#Requires(preun): /sbin/install-info
24
25Requires: m4 >= 1.4
26
27
28%description
29Bison is a general purpose parser generator that converts a grammar
30description for an LALR(1) context-free grammar into a C program to
31parse that grammar. Bison can be used to develop a wide range of
32language parsers, from ones used in simple desk calculators to complex
33programming languages. Bison is upwardly compatible with Yacc, so any
34correctly written Yacc grammar should work with Bison without any
35changes. If you know Yacc, you shouldn't have any trouble using
36Bison. You do need to be very proficient in C programming to be able
37to use Bison. Bison is only needed on systems that are used for
38development.
39
40If your system will be used for C development, you should install
41Bison.
42
43%package devel
44Summary: -ly library for development using Bison-generated parsers
45Group: Development/Libraries
46Provides: bison-static = %{version}-%{release}
47
48%description devel
49The bison-devel package contains the -ly library sometimes used by
50programs using Bison-generated parsers. If you are developing programs
51using Bison, you might want to link with this library. This library
52is not required by all Bison-generated parsers, but may be employed by
53simple 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
66Summary: Runtime support files used by Bison-generated parsers
67Group: Development/Libraries
68
69%description runtime
70The bison-runtime package contains files used at runtime by parsers
71that Bison generates. Packages whose binaries contain parsers
72generated by Bison should depend on bison-runtime to ensure that
73these files are available. See the Internationalization in the
74Bison 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
83svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
84rm -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
89autoreconf -fi
90
91%build
92export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
93%configure --docdir=%{_docdir}/%{name}-%{version}
94make %{?_smp_mflags}
95
96%check
97export 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
104rm -rf $RPM_BUILD_ROOT
105%makeinstall
106
107# Remove unpackaged files.
108rm -f $RPM_BUILD_ROOT/%{_bindir}/yacc
109rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
110rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/yacc*
111rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/calc++/*
112rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/mfcalc/*
113rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples/rpcalc/*
114
115%find_lang %{name}
116%find_lang %{name}-runtime
117
118gzip -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
134rm -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.
Note: See TracBrowser for help on using the repository browser.