[packages/ocaml-menhir] - new, from template
baggins
baggins at pld-linux.org
Tue Jun 6 09:21:18 CEST 2017
commit 8d0def079dd7969d2a58bd0bfc2f3d23949dd04b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Jun 6 09:20:57 2017 +0200
- new, from template
ocaml-menhir.spec | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 101 insertions(+)
---
diff --git a/ocaml-menhir.spec b/ocaml-menhir.spec
new file mode 100644
index 0000000..0efd13b
--- /dev/null
+++ b/ocaml-menhir.spec
@@ -0,0 +1,101 @@
+#
+# 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
+
+%define module menhir
+Summary: %{module} binding for OCaml
+Summary(pl.UTF-8): Wiązania %{module} dla OCamla
+Name: ocaml-%{module}
+Version: 20170509
+Release: 0.1
+License: GPLv2
+Group: Libraries
+Source0: http://gallium.inria.fr/~fpottier/menhir/%{module}-%{version}.tar.gz
+# Source0-md5: b8ba18b5abda831cf41cd4fa65f4c51b
+URL: http://gallium.inria.fr/~fpottier/menhir/
+BuildRequires: ocaml >= 3.04-7
+%requires_eq ocaml-runtime
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define debug_package %{nil}
+%if %{without ocaml_opt}
+%define no_install_post_strip 1
+# no opt means no native binary, stripping bytecode breaks such programs
+%define _enable_debug_packages 0
+%endif
+
+%description
+This package contains files needed to run bytecode executables using
+TEMPLATE library.
+
+%description -l pl.UTF-8
+Pakiet ten zawiera binaria potrzebne do uruchamiania programów
+używających biblioteki TEMPLATE.
+
+%package devel
+Summary: TEMPLATE binding for OCaml - development part
+Summary(pl.UTF-8): Wiązania TEMPLATE dla OCamla - cześć programistyczna
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+%requires_eq ocaml
+
+%description devel
+This package contains files needed to develop OCaml programs using
+TEMPLATE library.
+
+%description devel -l pl.UTF-8
+Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
+biblioteki TEMPLATE.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%{__make} PREFIX=%{_prefix} USE_OCAMLFIND=true all
+
+%install
+rm -rf $RPM_BUILD_ROOT
+export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
+%{__make} install \
+ PREFIX=%{_prefix} \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# move to dir pld ocamlfind looks
+install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
+mv $OCAMLFIND_DESTDIR/%{module}/META \
+ $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
+cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
+directory="+%{module}"
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
+%dir %{_libdir}/ocaml/%{module}
+%{_libdir}/ocaml/%{module}/*.cma
+%if %{with ocaml_opt}
+%attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs
+%endif
+
+%files devel
+%defattr(644,root,root,755)
+%doc LICENSE
+%{_libdir}/ocaml/%{module}/*.cmi
+%{_libdir}/ocaml/%{module}/*.cmo
+%{_libdir}/ocaml/%{module}/*.mli
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/%{module}/*.[ao]
+%{_libdir}/ocaml/%{module}/*.cmx
+%{_libdir}/ocaml/%{module}/*.cmxa
+%endif
+%{_libdir}/ocaml/site-lib/%{module}
+%{_examplesdir}/%{name}-%{version}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-menhir.git/commitdiff/8d0def079dd7969d2a58bd0bfc2f3d23949dd04b
More information about the pld-cvs-commit
mailing list