2015-11-08 10:04:44 +01:00
|
|
|
#
|
|
|
|
# spec file for package ocaml-cppo
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
# Copyright (c) 2015 LISA GmbH, Bingen, 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-cppo
|
|
|
|
Version: 1.0.0
|
2016-06-10 13:04:20 +02:00
|
|
|
Release: 0
|
2016-05-26 09:34:22 +02:00
|
|
|
%{ocaml_preserve_bytecode}
|
2015-11-08 10:04:44 +01:00
|
|
|
License: BSD-2-Clause
|
|
|
|
Summary: The C preprocessor written in OCaml
|
|
|
|
Url: http://mjambon.com/cppo.html
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Source: http://mjambon.com/releases/cppo/cppo-%{version}.tar.gz
|
2015-11-10 12:02:47 +01:00
|
|
|
BuildRequires: ocaml
|
2016-05-30 08:52:39 +02:00
|
|
|
BuildRequires: ocaml-findlib
|
|
|
|
BuildRequires: ocamlfind(easy-format)
|
2016-05-25 19:29:36 +02:00
|
|
|
BuildRequires: ocamlfind(ocamlbuild)
|
2016-05-25 11:32:10 +02:00
|
|
|
BuildRequires: ocaml-rpm-macros >= 4.02.1
|
2015-11-08 10:04:44 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-11-10 11:32:33 +01:00
|
|
|
# ocaml autodep start for pkg: ocaml-cppo
|
|
|
|
# hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() provides/requires
|
|
|
|
%if 0%{?suse_version} < 1210
|
2016-05-25 09:00:50 +02:00
|
|
|
Requires: ocaml-ocamlbuild ocaml-runtime
|
2015-11-10 11:32:33 +01:00
|
|
|
%endif
|
|
|
|
# ocaml autodep end for pkg: ocaml-cppo
|
2015-11-08 10:04:44 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Cppo is an equivalent of the C preprocessor targeted at the OCaml language and
|
|
|
|
its variants.
|
|
|
|
|
|
|
|
The main purpose of cppo is to provide a lightweight tool for simple macro
|
|
|
|
substitution (#define) and file inclusion (#include) for the occasional case
|
|
|
|
when this is useful in OCaml. Processing specific sections of files by calling
|
|
|
|
external programs is also possible via #ext directives.
|
|
|
|
|
|
|
|
The implementation of cppo relies on the standard library of OCaml and on the
|
|
|
|
standard parsing tools Ocamllex and Ocamlyacc, which contribute to the
|
|
|
|
robustness of cppo across OCaml versions.
|
|
|
|
|
2016-05-25 11:32:10 +02:00
|
|
|
%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}.
|
2015-11-08 10:04:44 +01:00
|
|
|
%prep
|
|
|
|
%setup -qn cppo-%{version}
|
|
|
|
|
|
|
|
%build
|
2016-05-25 11:32:10 +02:00
|
|
|
make BEST=byte all ocamlbuild
|
|
|
|
%if %{ocaml_native_compiler}
|
|
|
|
make BEST=opt opt ocamlbuild
|
|
|
|
%endif
|
2015-11-08 10:04:44 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir)
|
|
|
|
mkdir -p %{buildroot}%{_bindir} $OCAMLFIND_DESTDIR
|
2016-05-25 13:20:47 +02:00
|
|
|
make BEST=byte install BINDIR="%{buildroot}%{_bindir}"
|
|
|
|
%if %{ocaml_native_compiler}
|
|
|
|
find "%{buildroot}" -name META -print -delete
|
|
|
|
make BEST=opt install BINDIR="%{buildroot}%{_bindir}"
|
|
|
|
%endif
|
2015-11-08 10:04:44 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc Changes LICENSE README.md
|
2016-05-25 11:32:10 +02:00
|
|
|
%{_bindir}/*
|
|
|
|
%dir %{_libdir}/ocaml
|
|
|
|
%dir %{_libdir}/ocaml/*
|
|
|
|
%if %{ocaml_native_compiler}
|
|
|
|
%{_libdir}/ocaml/*/*.cmxs
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%dir %{_libdir}/ocaml
|
|
|
|
%dir %{_libdir}/ocaml/*
|
|
|
|
%if %{ocaml_native_compiler}
|
2016-05-25 13:57:36 +02:00
|
|
|
%{_libdir}/ocaml/*/*.a
|
2016-05-25 11:32:10 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmxa
|
|
|
|
%endif
|
|
|
|
%{_libdir}/ocaml/*/*.cma
|
|
|
|
%{_libdir}/ocaml/*/*.cmi
|
|
|
|
%{_libdir}/ocaml/*/META
|
2015-11-08 10:04:44 +01:00
|
|
|
|