ocaml-menhir/ocaml-menhir.spec

107 lines
2.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package ocaml-menhir
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ocaml-menhir
Version: 20160504
Release: 0
License: LGPL-2.0
Summary: LR(1) parser generator for the OCaml programming language
Url: http://gallium.inria.fr/~fpottier/menhir/
Group: Development/Libraries/Other
Source: http://gallium.inria.fr/~fpottier/menhir/menhir-20160504.tar.gz
BuildRequires: ocaml
BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-findlib
BuildRequires: ocaml-rpm-macros >= 4.02.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
LR(1) parser generator
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%setup -q -n menhir-%{version}
%build
o=
make \
%if %{ocaml_native_compiler}
TARGET=native \
%else
TARGET=byte \
%endif
PREFIX=${o}%{_prefix} \
%{?_smp_mflags} \
-j 1
%install
o=%{buildroot}
OCAMLFIND_DESTDIR=%{buildroot}`ocamlc -where`
mkdir -vp ${OCAMLFIND_DESTDIR}
make \
install \
%if %{ocaml_native_compiler}
TARGET=native \
%else
TARGET=byte \
%endif
PREFIX=${o}%{_prefix} \
OCAMLFIND_DESTDIR=${OCAMLFIND_DESTDIR} \
%{?_smp_mflags} \
-j 1
rm -rfv %{buildroot}/usr/share/
%files
%defattr(-,root,root)
%doc CHANGES LICENSE manual.pdf
%{_bindir}/*
%dir %{_libdir}/ocaml/*
%{_libdir}/ocaml/*/META
%if %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.o
%endif
#{_libdir}/ocaml/*/*.cma
%{_libdir}/ocaml/*/*.cmi
%{_libdir}/ocaml/*/*.cmo
#{_libdir}/ocaml/*/*.so*
%files devel
%defattr(-,root,root,-)
%doc LICENSE
%{_mandir}/*
%dir %{_libdir}/ocaml/*
#{_libdir}/ocaml/*/*.a
%if %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.cmx
#{_libdir}/ocaml/*/*.cmxa
#{_libdir}/ocaml/*/*.cmxs
%endif
%{_libdir}/ocaml/*/*.mli
%{_libdir}/ocaml/*/*.ml