%ocaml_oasis_configure
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-cppo?expand=0&rev=16
This commit is contained in:
parent
4750c7c52b
commit
63ff9a121b
@ -25,11 +25,13 @@ Summary: The C preprocessor written in OCaml
|
|||||||
Url: http://mjambon.com/cppo.html
|
Url: http://mjambon.com/cppo.html
|
||||||
Group: Development/Libraries/Other
|
Group: Development/Libraries/Other
|
||||||
Source: http://mjambon.com/releases/cppo/cppo-%{version}.tar.gz
|
Source: http://mjambon.com/releases/cppo/cppo-%{version}.tar.gz
|
||||||
BuildRequires: ocaml
|
BuildRequires: ocaml
|
||||||
BuildRequires: ocaml-findlib
|
BuildRequires: ocaml-oasis
|
||||||
BuildRequires: ocamlfind(easy-format)
|
BuildRequires: ocaml-ocamldoc
|
||||||
|
BuildRequires: ocaml-rpm-macros >= 4.03
|
||||||
|
BuildRequires: ocamlfind(easy-format)
|
||||||
BuildRequires: ocamlfind(ocamlbuild)
|
BuildRequires: ocamlfind(ocamlbuild)
|
||||||
BuildRequires: ocaml-rpm-macros >= 4.02.1
|
BuildRequires: ocamlfind(unix)
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
# ocaml autodep start for pkg: ocaml-cppo
|
# ocaml autodep start for pkg: ocaml-cppo
|
||||||
# hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() provides/requires
|
# hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() provides/requires
|
||||||
@ -63,23 +65,50 @@ developing applications that use %{name}.
|
|||||||
%setup -qn cppo-%{version}
|
%setup -qn cppo-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make BEST=byte all ocamlbuild
|
echo 'let cppo_version = "%{version}"' > cppo_version.ml
|
||||||
%if %{ocaml_native_compiler}
|
tee _oasis <<_EOF_
|
||||||
make BEST=opt opt ocamlbuild
|
OASISFormat: 0.4
|
||||||
%endif
|
Name: cppo
|
||||||
|
Version: %{version}
|
||||||
|
Synopsis: The C preprocessor written in OCaml
|
||||||
|
Authors: Martin Jambon
|
||||||
|
LicenseFile: LICENSE
|
||||||
|
License: BSD-2-Clause
|
||||||
|
Plugins: META(`oasis version`)
|
||||||
|
BuildTools: ocamlbuild
|
||||||
|
|
||||||
|
Library ocamlbuild_cppo
|
||||||
|
Path: ocamlbuild_plugin
|
||||||
|
Modules: Ocamlbuild_cppo
|
||||||
|
Install: true
|
||||||
|
BuildDepends: ocamlbuild
|
||||||
|
|
||||||
|
Document ocamlbuild_cppo
|
||||||
|
Title: API reference for ocamlbuild_cppo
|
||||||
|
Type: ocamlbuild
|
||||||
|
BuildTools+: ocamldoc
|
||||||
|
InstallDir: \$htmldir
|
||||||
|
Install: true
|
||||||
|
XOCamlbuildPath: .
|
||||||
|
XOCamlbuildLibraries: ocamlbuild_cppo
|
||||||
|
|
||||||
|
Executable cppo
|
||||||
|
Path: .
|
||||||
|
MainIs: cppo_main.ml
|
||||||
|
CompiledObject: best
|
||||||
|
BuildDepends: unix
|
||||||
|
_EOF_
|
||||||
|
oasis setup
|
||||||
|
%ocaml_oasis_configure --enable-docs
|
||||||
|
%ocaml_oasis_build
|
||||||
|
%ocaml_oasis_doc
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir)
|
%ocaml_oasis_findlib_install
|
||||||
mkdir -p %{buildroot}%{_bindir} $OCAMLFIND_DESTDIR
|
|
||||||
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
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc Changes LICENSE README.md
|
%doc LICENSE README.md
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%dir %{_libdir}/ocaml
|
%dir %{_libdir}/ocaml
|
||||||
%dir %{_libdir}/ocaml/*
|
%dir %{_libdir}/ocaml/*
|
||||||
@ -89,13 +118,19 @@ make BEST=opt install BINDIR="%{buildroot}%{_bindir}"
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
%{oasis_docdir_html}
|
||||||
%dir %{_libdir}/ocaml
|
%dir %{_libdir}/ocaml
|
||||||
%dir %{_libdir}/ocaml/*
|
%dir %{_libdir}/ocaml/*
|
||||||
%if %{ocaml_native_compiler}
|
%if %{ocaml_native_compiler}
|
||||||
%{_libdir}/ocaml/*/*.a
|
%{_libdir}/ocaml/*/*.a
|
||||||
|
%{_libdir}/ocaml/*/*.cmx
|
||||||
%{_libdir}/ocaml/*/*.cmxa
|
%{_libdir}/ocaml/*/*.cmxa
|
||||||
%endif
|
%endif
|
||||||
|
%{_libdir}/ocaml/*/*.annot
|
||||||
%{_libdir}/ocaml/*/*.cma
|
%{_libdir}/ocaml/*/*.cma
|
||||||
%{_libdir}/ocaml/*/*.cmi
|
%{_libdir}/ocaml/*/*.cmi
|
||||||
|
%{_libdir}/ocaml/*/*.cmt
|
||||||
|
%{_libdir}/ocaml/*/*.cmti
|
||||||
|
%{_libdir}/ocaml/*/*.mli
|
||||||
%{_libdir}/ocaml/*/META
|
%{_libdir}/ocaml/*/META
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user