[packages/peg] - new
qboosh
qboosh at pld-linux.org
Tue Feb 20 21:29:17 CET 2018
commit ee90e29dc2130509c8d20ad1e2a8d3ca6ffd8523
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 20 21:31:32 2018 +0100
- new
peg-make.patch | 37 +++++++++++++++++++++++++++++++++++++
peg.spec | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 88 insertions(+)
---
diff --git a/peg.spec b/peg.spec
new file mode 100644
index 0000000..d2735b0
--- /dev/null
+++ b/peg.spec
@@ -0,0 +1,51 @@
+Summary: Parser generators
+Summary(pl.UTF-8): Generatory parserów
+Name: peg
+Version: 0.1.18
+Release: 1
+License: MIT
+Group: Development/Tools
+Source0: http://piumarta.com/software/peg/%{name}-%{version}.tar.gz
+# Source0-md5: 992fc7887afc2a8c92cdb1acb5b935e1
+Patch0: %{name}-make.patch
+URL: http://piumarta.com/software/peg/
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+peg and leg are tools for generating recursive-descent parsers:
+programs that perform pattern matching on text. They process a Parsing
+Expression Grammar (PEG) to produce a program that recognises legal
+sentences of that grammar.
+
+%description -l pl.UTF-8
+peg i leg to narzędzia do generowania rekurencyjnych parserów -
+programów wykonujących dopasowywanie wzorców na tekście. Przetwarzają
+gramatykę analizy wyrażeń w formacie PEG (Parsing Expression Grammar),
+aby utworzyć program rozpoznający poprawne zdania w tej gramatyce.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__make} \
+ CC="%{__cc}" \
+ OFLAGS="%{rpmcflags}%{!?debug: -DNDEBUG}" \
+ LDFLAGS="%{rpmldflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ ROOT=$RPM_BUILD_ROOT \
+ PREFIX=%{_prefix}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog LICENSE.txt
+%attr(755,root,root) %{_bindir}/leg
+%attr(755,root,root) %{_bindir}/peg
+%{_mandir}/man1/peg.1*
diff --git a/peg-make.patch b/peg-make.patch
new file mode 100644
index 0000000..73eb775
--- /dev/null
+++ b/peg-make.patch
@@ -0,0 +1,37 @@
+--- peg-0.1.18/Makefile.orig 2016-07-22 02:55:15.000000000 +0200
++++ peg-0.1.18/Makefile 2018-02-20 21:24:08.528149541 +0100
+@@ -1,4 +1,4 @@
+-CFLAGS = -g -Wall $(OFLAGS) $(XFLAGS) -Isrc
++CFLAGS = -Wall $(OFLAGS) $(XFLAGS) -Isrc
+ OFLAGS = -O3 -DNDEBUG
+ #OFLAGS = -pg
+
+@@ -7,17 +7,15 @@
+ all : peg leg
+
+ peg : peg.o $(OBJS)
+- $(CC) $(CFLAGS) -o $@-new peg.o $(OBJS)
+- mv $@-new $@
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ peg.o $(OBJS)
+
+ leg : leg.o $(OBJS)
+- $(CC) $(CFLAGS) -o $@-new leg.o $(OBJS)
+- mv $@-new $@
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ leg.o $(OBJS)
+
+ ROOT =
+ PREFIX = /usr/local
+ BINDIR = $(ROOT)$(PREFIX)/bin
+-MANDIR = $(ROOT)$(PREFIX)/man/man1
++MANDIR = $(ROOT)$(PREFIX)/share/man/man1
+
+ install : $(BINDIR) $(BINDIR)/peg $(BINDIR)/leg $(MANDIR) $(MANDIR)/peg.1
+
+@@ -26,7 +24,6 @@
+
+ $(BINDIR)/% : %
+ cp -p $< $@
+- strip $@
+
+ $(MANDIR) :
+ mkdir -p $(MANDIR)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/peg.git/commitdiff/ee90e29dc2130509c8d20ad1e2a8d3ca6ffd8523
More information about the pld-cvs-commit
mailing list