30 Distribution: OpenPKG Community |
30 Distribution: OpenPKG Community |
31 Class: BASE |
31 Class: BASE |
32 Group: Language |
32 Group: Language |
33 License: BSD |
33 License: BSD |
34 Version: 20071023 |
34 Version: 20071023 |
35 Release: 20080101 |
35 Release: 20120800 |
36 |
36 |
37 # list of sources |
37 # list of sources |
38 Source0: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/awk/awk-%{version}.tar.gz |
38 Source0: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/awk/awk-%{version}.tar.gz |
39 Patch0: awk.patch |
39 Patch0: awk.patch |
40 |
40 |
41 # build information |
41 # build information |
42 Prefix: %{l_prefix} |
42 BuildPreReq: OpenPKG, openpkg >= 20100101, make, bison |
43 BuildRoot: %{l_buildroot} |
43 PreReq: OpenPKG, openpkg >= 20100101 |
44 BuildPreReq: OpenPKG, openpkg >= 20040130, make, bison |
|
45 PreReq: OpenPKG, openpkg >= 20040130 |
|
46 AutoReq: no |
44 AutoReq: no |
47 AutoReqProv: no |
|
48 Conflicts: gawk |
|
49 |
45 |
50 %description |
46 %description |
51 Awk is the one true implementation of the AWK programming language |
47 Awk is the one true implementation of the AWK programming language |
52 from Brian W. Kernighan. |
48 from Brian W. Kernighan. |
53 |
49 |
59 } |
55 } |
60 |
56 |
61 %prep |
57 %prep |
62 %setup -q -c |
58 %setup -q -c |
63 %patch -p0 |
59 %patch -p0 |
|
60 %{l_shtool} subst \ |
|
61 -e 's;Cell[\ \t][\ \t]*\*getline;Cell \*awk_getline;' \ |
|
62 proto.h \ |
|
63 run.c |
|
64 %{l_shtool} subst \ |
|
65 -e 's;getline;awk_getline;g' \ |
|
66 maketab.c |
64 |
67 |
65 %build |
68 %build |
66 %{l_make} %{l_mflags} \ |
69 %{l_make} %{l_mflags -O} \ |
67 YACC="bison -y" CC="%{l_cc}" CFLAGS="%{l_cflags -O}" |
70 YACC="bison -y" CC="%{l_cc}" CFLAGS="%{l_cflags -O}" |
68 |
71 |
69 %install |
72 %install |
70 rm -rf $RPM_BUILD_ROOT |
|
71 %{l_shtool} mkdir -f -p -m 755 \ |
73 %{l_shtool} mkdir -f -p -m 755 \ |
72 $RPM_BUILD_ROOT%{l_prefix}/bin \ |
74 $RPM_BUILD_ROOT%{l_prefix}/bin \ |
73 $RPM_BUILD_ROOT%{l_prefix}/man/man1 |
75 $RPM_BUILD_ROOT%{l_prefix}/man/man1 |
74 %{l_shtool} install -c -s -m 755 \ |
76 %{l_shtool} install -c -s -m 755 \ |
75 a.out $RPM_BUILD_ROOT%{l_prefix}/bin/awk |
77 a.out $RPM_BUILD_ROOT%{l_prefix}/bin/awk |