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