%undefine _package_note_flags %ifnarch %{ocaml_native_compiler} %global debug_package %{nil} %endif %global srcname tiny_httpd Name: ocaml-%(echo %{srcname} | tr _ -) Version: 0.12 Release: 5%{?dist} Summary: OCaml: minimal HTTP server using good old threads License: MIT URL: https://github.com/c-cube/%{srcname} Source: %{url}/archive/refs/tags/v%{version}.tar.gz BuildRequires: ocaml >= 4.04.0 BuildRequires: ocaml-dune-devel >= 2.0 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-odoc BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-ptime-devel BuildRequires: ocaml-qcheck-devel BuildRequires: ocaml-qtest-devel >= 2.9 BuildRequires: ocaml-result-devel BuildRequires: ocaml-seq-devel BuildRequires: ocaml-zip-devel, zlib-devel BuildRequires: curl %description Minimal HTTP server using good old threads, with stream abstractions, simple routing, URL encoding/decoding, static asset serving, and optional compression with camlzip. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %autosetup -n %{srcname}-%{version} %build dune build %{?_smp_mflags} --verbose --profile release dune build @doc %install dune install --destdir=%{buildroot} # We do not want the dune markers find _build/default/_doc/_html -name .dune-keep -delete # We do not want the ml files find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete # We install the documentation with the doc macro rm -fr %{buildroot}%{_prefix}/doc %check dune runtest --profile release %files %doc CHANGES.md README.md %{_bindir}/http_of_dir %{_bindir}/tiny-httpd-vfs-pack %dir %{_libdir}/ocaml/tiny_httpd/ %{_libdir}/ocaml/tiny_httpd/META %{_libdir}/ocaml/tiny_httpd/*.cma %{_libdir}/ocaml/tiny_httpd/*.cmi %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/tiny_httpd/*.cmxs %endif %dir %{_libdir}/ocaml/tiny_httpd_camlzip/ %{_libdir}/ocaml/tiny_httpd_camlzip/META %{_libdir}/ocaml/tiny_httpd_camlzip/*.cma %{_libdir}/ocaml/tiny_httpd_camlzip/*.cmi %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/tiny_httpd_camlzip/*.cmxs %endif %files devel %doc _build/default/_doc/* %{_libdir}/ocaml/tiny_httpd/dune-package %{_libdir}/ocaml/tiny_httpd/opam %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/tiny_httpd/*.a %{_libdir}/ocaml/tiny_httpd/*.cmx %{_libdir}/ocaml/tiny_httpd/*.cmxa %endif %{_libdir}/ocaml/tiny_httpd/*.cmt %{_libdir}/ocaml/tiny_httpd/*.cmti %{_libdir}/ocaml/tiny_httpd/*.mli %{_libdir}/ocaml/tiny_httpd_camlzip/dune-package %{_libdir}/ocaml/tiny_httpd_camlzip/opam %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/tiny_httpd_camlzip/*.a %{_libdir}/ocaml/tiny_httpd_camlzip/*.cmx %{_libdir}/ocaml/tiny_httpd_camlzip/*.cmxa %endif %{_libdir}/ocaml/tiny_httpd_camlzip/*.cmt %{_libdir}/ocaml/tiny_httpd_camlzip/*.cmti %{_libdir}/ocaml/tiny_httpd_camlzip/*.mli %changelog * Wed Jul 27 2022 Jashank Jeremy - 0.12-5 - Bump for Fedora 37 mass rebuild. * Fri Jun 24 2022 Jashank Jeremy - 0.12-4 - Bump to rebuild with OCaml 4.14.0. * Fri May 06 2022 Jashank Jeremy - 0.12-3 - Fix incorrect package name from previous update. * Thu May 05 2022 Jashank Jeremy - 0.12-2 - Clean up specfile. * Thu May 05 2022 Jashank Jeremy - 0.12-1 - Initial RPM release.