]> git.pld-linux.org Git - packages/camlp5.git/blame - camlp5.spec
- up to 8.00
[packages/camlp5.git] / camlp5.spec
CommitLineData
bfe7d50f
JB
1#
2# Conditional build:
3%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
4
5# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
995febc4 6%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
bfe7d50f
JB
7%undefine with_ocaml_opt
8%endif
9
170a6c18
JR
10Summary: Objective Caml Preprocessor
11Summary(pl.UTF-8): Preprocesor OCamla
12Name: camlp5
7a1551a7
JR
13Version: 8.00
14Release: 1
170a6c18
JR
15License: distributable
16Group: Development/Languages
7a1551a7
JR
17Source0: https://github.com/camlp5/camlp5/archive/rel%{version}/%{name}-%{version}.tar.gz
18# Source0-md5: 477cdfa2be786ebc37c75e280d3ee504
19Patch0: no-warn-error.patch
20Patch1: DESTDIR.patch
21URL: https://camlp5.github.io/
170a6c18 22BuildRequires: db-devel >= 4.1
f95747ae 23BuildRequires: ocaml
77729407 24BuildRequires: ocaml-ocamlbuild
62e5c235 25%requires_eq ocaml-runtime
170a6c18
JR
26Requires: %{name} = %{epoch}:%{version}-%{release}
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
1aebc93e 30Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
170a6c18
JR
31tools for syntax (grammars) and the ability to modify the concrete
32syntax of the language (quotations, syntax extensions).
33
1aebc93e 34Camlp5 can parse normal Ocaml concrete syntax or any other
170a6c18
JR
35user-definable syntax. As an example, an alternative syntax is
36provided, named revised, because it tries to fix some small problems
37of the normal syntax.
38
1aebc93e 39Camlp5 can pretty print the normal Ocaml concrete syntax or the
170a6c18
JR
40revised one. It is therefore always possible to have a version of your
41sources compilable by the Objective Caml compiler without
42preprocessing.
43
44%description -l pl.UTF-8
1aebc93e 45Camlp5 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania
170a6c18
JR
46składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni
47języka (cytowania, rozszerzenia).
48
1aebc93e 49Camlp5 może sparsować oryginalną składnię Ocamla lub dowolną inną
170a6c18
JR
50definiowalną przez użytkownika. Jako przykład podana jest alternatywna
51składnia (revised syntax), która próbuje poprawić drobne problemy
52występujące w składni oryginalnej.
53
1aebc93e 54Camlp5 umie ładnie formatować źródła zarówno w oryginalnej jak i
170a6c18
JR
55poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej
56składni na drugą.
57
58%package doc-html
995febc4
JB
59Summary: Objective Caml Preprocessor - HTML documentation
60Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML
170a6c18
JR
61Group: Development/Languages
62
63%description doc-html
64Objective Caml Preprocessor - HTML documentation.
65
66%description doc-html -l pl.UTF-8
67Preprocesor OCamla - dokumentacja HTML.
68
995febc4
JB
69%package doc-pdf
70Summary: Objective Caml Preprocessor - PDF documentation
71Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja w formacie PDF
72Group: Development/Languages
73
74%description doc-pdf
75Objective Caml Preprocessor - PDF documentation.
76
77%description doc-pdf -l pl.UTF-8
78Preprocesor OCamla - dokumentacja w formacie PDF.
79
170a6c18 80%prep
7a1551a7
JR
81%setup -q -n %{name}-rel%{version}
82%patch0 -p1
83%patch1 -p1
1aebc93e 84
7a1551a7
JR
85%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
86 etc/mkcamlp5.pl
170a6c18 87
995febc4 88%build
170a6c18 89./configure \
7a1551a7 90 -prefix %{_prefix} \
170a6c18 91 -bindir %{_bindir} \
6b574e5a 92 -libdir %{_libdir}/ocaml \
7a1551a7 93 -mandir %{_mandir}/man1
170a6c18 94
bfe7d50f 95%{__make} -j1 world%{?with_ocaml_opt:.opt}
7a1551a7 96%{__make} -j1 -C doc/htmlp pdf
170a6c18
JR
97
98%install
99rm -rf $RPM_BUILD_ROOT
170a6c18
JR
100
101%{__make} install \
102 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
6b574e5a 103 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
170a6c18
JR
104 MANDIR=$RPM_BUILD_ROOT%{_mandir}
105
170a6c18 106# broken build system
bfe7d50f
JB
107for f in mkcamlp5.1 ocpp5.1 camlp5o.1 camlp5r.1 camlp5sch.1 \
108 %{?with_ocaml_opt:camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.opt.1} ; do
109 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/$f
6b574e5a 110 echo '.so camlp5.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f
170a6c18
JR
111done
112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
116%files
117%defattr(644,root,root,755)
7a1551a7 118%doc CHANGES DEVEL ICHANGES MODE README.md UPGRADING
1aebc93e
JB
119%attr(755,root,root) %{_bindir}/camlp5*
120%attr(755,root,root) %{_bindir}/mkcamlp5*
121%attr(755,root,root) %{_bindir}/ocpp5
6b574e5a 122%{_libdir}/ocaml/%{name}
1aebc93e
JB
123%{_mandir}/man1/camlp5*.1*
124%{_mandir}/man1/mkcamlp5*.1*
125%{_mandir}/man1/ocpp5.1*
170a6c18
JR
126
127%files doc-html
128%defattr(644,root,root,755)
6b574e5a 129%doc doc/html/*
995febc4
JB
130
131%files doc-pdf
132%defattr(644,root,root,755)
7a1551a7 133%doc doc/htmlp/camlp5.pdf
This page took 0.048688 seconds and 4 git commands to generate.