Bump to 20230521
[platform/upstream/byacc.git] / packaging / byacc.spec
1 Name:           byacc
2 Version:        20230521
3 Release:        1
4 Summary:        LALR(1) parser generator
5 Group:          Development/Languages/C and C++
6 License:        SUSE-Public-Domain
7 Url:            http://invisible-island.net/byacc/byacc.html
8 Source:         %{name}-%{version}.tar.gz
9 Source1001:     byacc.manifest
10
11 %description
12 Berkeley Yacc is a LALR(1) parser generator. It has been made as compatible as
13 possible with AT&T Yacc and it accepts any input specification that conforms to
14 the AT&T Yacc documentation. In contrast to bison, it is written to avoid
15 dependencies upon a particular compiler.
16
17 %prep
18 %setup
19 cp %{SOURCE1001} .
20
21 %build
22 export CFLAGS+=" -fPIC"
23 export LDFLAGS+=" -pie"
24 # without --with-warnings several functions will not be marked with gcc's
25 # noreturn attribute and produce warnings when $RPM_OPT_FLAGS contains -Wall
26 %configure --with-warnings
27 make %{?_smp_mflags}
28
29 %install
30 %make_install
31 mv %{buildroot}%{_bindir}/yacc %{buildroot}%{_bindir}/byacc
32
33 %remove_docs
34
35 %files
36 %manifest %{name}.manifest
37 %defattr(-,root,root,-)
38 %{_bindir}/byacc
39
40 %changelog