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