]> git.pld-linux.org Git - packages/camlp5.git/blobdiff - camlp5.spec
- updated to 8.00.02
[packages/camlp5.git] / camlp5.spec
index 6f9852a40cfe90b2a33b9afd21b6374ae1dfe10c..13f4000209974866665c5f07c0600e1df38e64fc 100644 (file)
@@ -1,53 +1,67 @@
+#
+# Conditional build:
+%bcond_without ocaml_opt       # skip building native optimized binaries (bytecode is always built)
+
+# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
+%undefine      with_ocaml_opt
+%endif
+
+%if %{without ocaml_opt}
+%define                _enable_debug_packages  0
+%endif
+
 Summary:       Objective Caml Preprocessor
 Summary(pl.UTF-8):     Preprocesor OCamla
 Name:          camlp5
 Summary:       Objective Caml Preprocessor
 Summary(pl.UTF-8):     Preprocesor OCamla
 Name:          camlp5
-Version:       6.02.2
+Version:       8.00.02
 Release:       1
 License:       distributable
 Group:         Development/Languages
 Release:       1
 License:       distributable
 Group:         Development/Languages
-Source0:       http://pauillac.inria.fr/~ddr/camlp5/distrib/src/%{name}-%{version}.tgz
-# Source0-md5: b495bf26355451186c6725ee01add0da
-#Source1:      http://pauillac.inria.fr/~ddr/camlp5/doc/pdf/%{name}-%{version}.pdf
-Source1:       http://pauillac.inria.fr/~ddr/camlp5/doc/pdf/%{name}-6.00.pdf
-# Source1-md5: b241eabfeb48f22b0fbd3e497198a76a
-URL:           http://caml.inria.fr/
+#Source0Download: https://github.com/camlp5/camlp5/releases
+Source0:       https://github.com/camlp5/camlp5/archive/rel%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 096076be4b26034643508511e834ccc2
+Patch0:                no-warn-error.patch
+URL:           https://camlp5.github.io/
 BuildRequires: db-devel >= 4.1
 BuildRequires: ocaml
 BuildRequires: db-devel >= 4.1
 BuildRequires: ocaml
+BuildRequires: ocaml-ocamlbuild
+%requires_eq   ocaml-runtime
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
+Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
 tools for syntax (grammars) and the ability to modify the concrete
 syntax of the language (quotations, syntax extensions).
 
 tools for syntax (grammars) and the ability to modify the concrete
 syntax of the language (quotations, syntax extensions).
 
-Camlp4 can parse normal Ocaml concrete syntax or any other
+Camlp5 can parse normal Ocaml concrete syntax or any other
 user-definable syntax. As an example, an alternative syntax is
 provided, named revised, because it tries to fix some small problems
 of the normal syntax.
 
 user-definable syntax. As an example, an alternative syntax is
 provided, named revised, because it tries to fix some small problems
 of the normal syntax.
 
-Camlp4 can pretty print the normal Ocaml concrete syntax or the
+Camlp5 can pretty print the normal Ocaml concrete syntax or the
 revised one. It is therefore always possible to have a version of your
 sources compilable by the Objective Caml compiler without
 preprocessing.
 
 %description -l pl.UTF-8
 revised one. It is therefore always possible to have a version of your
 sources compilable by the Objective Caml compiler without
 preprocessing.
 
 %description -l pl.UTF-8
-Camlp4 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania
+Camlp5 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania
 składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni
 języka (cytowania, rozszerzenia).
 
 składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni
 języka (cytowania, rozszerzenia).
 
-Camlp4 może sparsować oryginalną składnię Ocamla lub dowolną inną
+Camlp5 może sparsować oryginalną składnię Ocamla lub dowolną inną
 definiowalną przez użytkownika. Jako przykład podana jest alternatywna
 składnia (revised syntax), która próbuje poprawić drobne problemy
 występujące w składni oryginalnej.
 
 definiowalną przez użytkownika. Jako przykład podana jest alternatywna
 składnia (revised syntax), która próbuje poprawić drobne problemy
 występujące w składni oryginalnej.
 
-Camlp4 umie ładnie formatować źródła zarówno w oryginalnej jak i
+Camlp5 umie ładnie formatować źródła zarówno w oryginalnej jak i
 poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej
 składni na drugą.
 
 %package doc-html
 poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej
 składni na drugą.
 
 %package doc-html
-Summary:       Objective Caml Preprocessor - HTML documentation 
-Summary(pl.UTF-8):     Preprocesor OCamla - dokumentacja HTML 
+Summary:       Objective Caml Preprocessor - HTML documentation
+Summary(pl.UTF-8):     Preprocesor OCamla - dokumentacja HTML
 Group:         Development/Languages
 
 %description doc-html
 Group:         Development/Languages
 
 %description doc-html
@@ -56,19 +70,33 @@ Objective Caml Preprocessor - HTML documentation.
 %description doc-html -l pl.UTF-8
 Preprocesor OCamla - dokumentacja HTML.
 
 %description doc-html -l pl.UTF-8
 Preprocesor OCamla - dokumentacja HTML.
 
+%package doc-pdf
+Summary:       Objective Caml Preprocessor - PDF documentation
+Summary(pl.UTF-8):     Preprocesor OCamla - dokumentacja w formacie PDF
+Group:         Development/Languages
+
+%description doc-pdf
+Objective Caml Preprocessor - PDF documentation.
+
+%description doc-pdf -l pl.UTF-8
+Preprocesor OCamla - dokumentacja w formacie PDF.
+
 %prep
 %prep
-%setup -q
-cp %{SOURCE1} doc/camlp4.pdf
+%setup -q -n %{name}-rel%{version}
+%patch0 -p1
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
+      etc/mkcamlp5.pl
 
 
-%build 
+%build
 ./configure \
 ./configure \
+       -prefix %{_prefix} \
        -bindir %{_bindir} \
        -libdir %{_libdir}/ocaml \
        -bindir %{_bindir} \
        -libdir %{_libdir}/ocaml \
-       -mandir %{_mandir}/man1 \
-       -transitional
+       -mandir %{_mandir}/man1
 
 
-%{__make} -j1 world.opt
-%{__make} -j1 -C doc/htmlp
+%{__make} -j1 world%{?with_ocaml_opt:.opt}
+%{__make} -j1 -C doc/htmlp pdf
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -79,9 +107,9 @@ rm -rf $RPM_BUILD_ROOT
        MANDIR=$RPM_BUILD_ROOT%{_mandir}
 
 # broken build system
        MANDIR=$RPM_BUILD_ROOT%{_mandir}
 
 # broken build system
-for f in camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.1 ocpp5.1 \
-                camlp5o.1 camlp5r.1 camlp5sch.1 mkcamlp5.opt.1 ; do
-       rm -f $RPM_BUILD_ROOT%{_mandir}/man1/$f
+for f in mkcamlp5.1 ocpp5.1 camlp5o.1 camlp5r.1 camlp5sch.1 \
+       %{?with_ocaml_opt:camlp5o.opt.1 camlp5r.opt.1 mkcamlp5.opt.1} ; do
+       %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/$f
        echo '.so camlp5.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f
 done
 
        echo '.so camlp5.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f
 done
 
@@ -90,11 +118,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES DEVEL ICHANGES MODE README UPGRADING doc/camlp4.pdf
-%attr(755,root,root) %{_bindir}/*
+%doc CHANGES DEVEL ICHANGES MODE README.md UPGRADING
+%attr(755,root,root) %{_bindir}/camlp5*
+%attr(755,root,root) %{_bindir}/mkcamlp5*
+%attr(755,root,root) %{_bindir}/ocpp5
 %{_libdir}/ocaml/%{name}
 %{_libdir}/ocaml/%{name}
-%{_mandir}/man1/*
+%{_mandir}/man1/camlp5*.1*
+%{_mandir}/man1/mkcamlp5*.1*
+%{_mandir}/man1/ocpp5.1*
 
 %files doc-html
 %defattr(644,root,root,755)
 %doc doc/html/*
 
 %files doc-html
 %defattr(644,root,root,755)
 %doc doc/html/*
+
+%files doc-pdf
+%defattr(644,root,root,755)
+%doc doc/htmlp/camlp5.pdf
This page took 0.067524 seconds and 4 git commands to generate.