]> git.pld-linux.org Git - packages/camlp5.git/blobdiff - camlp5.spec
- up to 8.00
[packages/camlp5.git] / camlp5.spec
index 7692f1660ecbc57d1aa71a1eb7981ed8d6ee4bad..228b70d6b6081e1ddd0f4cb870b486e8eb4d056a 100644 (file)
@@ -1,19 +1,27 @@
+#
+# 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
+
 Summary:       Objective Caml Preprocessor
 Summary(pl.UTF-8):     Preprocesor OCamla
 Name:          camlp5
-Version:       6.12
-Release:       2
+Version:       8.00
+Release:       1
 License:       distributable
 Group:         Development/Languages
-Source0:       http://pauillac.inria.fr/~ddr/camlp5/distrib/src/%{name}-%{version}.tgz
-# Source0-md5: d49d30b62396b7285f3d609ac90c3fe5
-#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
-Patch0:                ocaml-4.02.2.patch
-URL:           http://caml.inria.fr/
+Source0:       https://github.com/camlp5/camlp5/archive/rel%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 477cdfa2be786ebc37c75e280d3ee504
+Patch0:                no-warn-error.patch
+Patch1:                DESTDIR.patch
+URL:           https://camlp5.github.io/
 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)
@@ -48,8 +56,8 @@ 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
@@ -58,24 +66,34 @@ Objective Caml Preprocessor - HTML documentation.
 %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
-%setup -q
+%setup -q -n %{name}-rel%{version}
 %patch0 -p1
+%patch1 -p1
 
-cp %{SOURCE1} doc/camlp4.pdf
-
-#cp ocaml_src/lib/versdep/4.02.{1,2}.ml
-#cp -a ocaml_stuff/4.02.{1,2}
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
+      etc/mkcamlp5.pl
 
-%build 
+%build
 ./configure \
+       -prefix %{_prefix} \
        -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
@@ -86,9 +104,9 @@ rm -rf $RPM_BUILD_ROOT
        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
 
@@ -97,7 +115,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES DEVEL ICHANGES MODE README UPGRADING doc/camlp4.pdf
+%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
@@ -109,3 +127,7 @@ rm -rf $RPM_BUILD_ROOT
 %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.069903 seconds and 4 git commands to generate.