2015-11-08 10:04:44 +01:00
|
|
|
#
|
|
|
|
# spec file for package ocaml-cppo
|
|
|
|
#
|
2017-05-17 16:41:38 +02:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-11-08 10:04:44 +01:00
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2017-05-17 16:41:38 +02:00
|
|
|
|
2015-11-08 10:04:44 +01:00
|
|
|
Name: ocaml-cppo
|
2017-05-17 16:41:38 +02:00
|
|
|
Version: 1.5.0
|
|
|
|
Release: 0
|
2017-07-17 14:40:30 +02:00
|
|
|
%if %{defined ocaml_preserve_bytecode}
|
2016-05-26 09:34:22 +02:00
|
|
|
%{ocaml_preserve_bytecode}
|
2017-07-17 14:40:30 +02:00
|
|
|
%endif
|
2017-05-17 16:41:38 +02:00
|
|
|
Summary: The C preprocessor written in OCaml
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Url: http://mjambon.com/cppo.html
|
|
|
|
Source: %{name}-%{version}.tar.xz
|
2016-06-13 23:08:38 +02:00
|
|
|
BuildRequires: ocaml
|
|
|
|
BuildRequires: ocaml-oasis
|
|
|
|
BuildRequires: ocaml-ocamldoc
|
|
|
|
BuildRequires: ocaml-rpm-macros >= 4.03
|
|
|
|
BuildRequires: ocamlfind(easy-format)
|
2016-05-25 19:29:36 +02:00
|
|
|
BuildRequires: ocamlfind(ocamlbuild)
|
2016-06-20 22:11:09 +02:00
|
|
|
BuildRequires: ocamlfind(str)
|
2016-06-13 23:08:38 +02:00
|
|
|
BuildRequires: ocamlfind(unix)
|
2015-11-08 10:04:44 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%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
|
2016-06-16 12:30:17 +02:00
|
|
|
Requires: %{name} = %{version}
|
2016-05-25 11:32:10 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and signature files for
|
|
|
|
developing applications that use %{name}.
|
2016-06-20 22:01:49 +02:00
|
|
|
|
2015-11-08 10:04:44 +01:00
|
|
|
%prep
|
2016-06-20 22:01:49 +02:00
|
|
|
%setup -q
|
2015-11-08 10:04:44 +01:00
|
|
|
|
|
|
|
%build
|
2016-06-13 23:08:38 +02:00
|
|
|
echo 'let cppo_version = "%{version}"' > cppo_version.ml
|
2016-06-20 22:01:49 +02:00
|
|
|
# obs service changes every ^Version line ...
|
|
|
|
sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
|
2016-06-13 23:08:38 +02:00
|
|
|
OASISFormat: 0.4
|
|
|
|
Name: cppo
|
2017-05-17 16:41:38 +02:00
|
|
|
Version: 0
|
2016-06-13 23:08:38 +02:00
|
|
|
Synopsis: The C preprocessor written in OCaml
|
|
|
|
Authors: Martin Jambon
|
|
|
|
LicenseFile: LICENSE
|
2017-05-31 09:17:17 +02:00
|
|
|
License: %{license}
|
2016-06-13 23:08:38 +02:00
|
|
|
Plugins: META(`oasis version`)
|
|
|
|
BuildTools: ocamlbuild
|
|
|
|
|
|
|
|
Library ocamlbuild_cppo
|
2017-05-31 09:17:17 +02:00
|
|
|
Path: ocamlbuild_plugin
|
|
|
|
Modules: Ocamlbuild_cppo
|
|
|
|
Install: true
|
|
|
|
BuildDepends: ocamlbuild
|
2016-06-13 23:08:38 +02:00
|
|
|
|
|
|
|
Document ocamlbuild_cppo
|
2017-05-31 09:17:17 +02:00
|
|
|
Title: API reference for ocamlbuild_cppo
|
|
|
|
Type: ocamlbuild
|
|
|
|
BuildTools+: ocamldoc
|
|
|
|
InstallDir: \$htmldir
|
|
|
|
Install: true
|
|
|
|
XOCamlbuildPath: .
|
|
|
|
XOCamlbuildLibraries: ocamlbuild_cppo
|
2016-06-13 23:08:38 +02:00
|
|
|
|
|
|
|
Executable cppo
|
2017-05-31 09:17:17 +02:00
|
|
|
Path: .
|
|
|
|
MainIs: cppo_main.ml
|
|
|
|
CompiledObject: best
|
|
|
|
BuildDepends: unix, str
|
2016-06-13 23:19:22 +02:00
|
|
|
|
|
|
|
Test cppo
|
|
|
|
Type: Custom (0.0.1)
|
|
|
|
Command: ln -sfvbn \$cppo cppo ; make -C test all
|
|
|
|
Run: true
|
2016-06-13 23:08:38 +02:00
|
|
|
_EOF_
|
2016-06-16 12:03:57 +02:00
|
|
|
%oasis_setup
|
2016-06-13 23:19:22 +02:00
|
|
|
%ocaml_oasis_configure --enable-docs --enable-tests
|
2016-06-13 23:08:38 +02:00
|
|
|
%ocaml_oasis_build
|
|
|
|
%ocaml_oasis_doc
|
2015-11-08 10:04:44 +01:00
|
|
|
|
|
|
|
%install
|
2016-06-13 23:08:38 +02:00
|
|
|
%ocaml_oasis_findlib_install
|
2015-11-08 10:04:44 +01:00
|
|
|
|
2016-06-13 23:19:22 +02:00
|
|
|
%check
|
|
|
|
%ocaml_oasis_test
|
|
|
|
|
2015-11-08 10:04:44 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2016-06-13 23:08:38 +02:00
|
|
|
%doc LICENSE README.md
|
2016-05-25 11:32:10 +02:00
|
|
|
%{_bindir}/*
|
|
|
|
%dir %{_libdir}/ocaml
|
|
|
|
%dir %{_libdir}/ocaml/*
|
2017-07-17 16:56:55 +02:00
|
|
|
%if 0%{?ocaml_native_compiler}
|
2016-05-25 11:32:10 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmxs
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
2016-06-13 23:08:38 +02:00
|
|
|
%{oasis_docdir_html}
|
2016-05-25 11:32:10 +02:00
|
|
|
%dir %{_libdir}/ocaml
|
|
|
|
%dir %{_libdir}/ocaml/*
|
2017-07-17 16:56:55 +02:00
|
|
|
%if 0%{?ocaml_native_compiler}
|
2016-05-25 13:57:36 +02:00
|
|
|
%{_libdir}/ocaml/*/*.a
|
2016-06-13 23:08:38 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmx
|
2016-05-25 11:32:10 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmxa
|
|
|
|
%endif
|
2016-06-13 23:08:38 +02:00
|
|
|
%{_libdir}/ocaml/*/*.annot
|
2016-05-25 11:32:10 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cma
|
|
|
|
%{_libdir}/ocaml/*/*.cmi
|
2016-06-13 23:08:38 +02:00
|
|
|
%{_libdir}/ocaml/*/*.cmt
|
|
|
|
%{_libdir}/ocaml/*/*.cmti
|
|
|
|
%{_libdir}/ocaml/*/*.mli
|
2016-05-25 11:32:10 +02:00
|
|
|
%{_libdir}/ocaml/*/META
|
2015-11-08 10:04:44 +01:00
|
|
|
|
2017-05-17 16:41:38 +02:00
|
|
|
%changelog
|