diff --git a/README.md b/README.md index 3f12fba..8659ea3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # ocaml-magic +An OCaml binding to libmagic. + diff --git a/ocaml-magic.spec b/ocaml-magic.spec new file mode 100644 index 0000000..87a4a2c --- /dev/null +++ b/ocaml-magic.spec @@ -0,0 +1,73 @@ +%define ocamlpck magic + +Name: ocaml-magic +Version: 0.7.3 +Release: 1mamba +Summary: An OCaml binding to libmagic +Group: System/Libraries/OCaml +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/Chris00/ocaml-magic +Source: https://sourceforge.net/projects/ocaml-magic/files/ocaml-magic/0.7/ocaml-magic-%{version}.tar.gz +License: LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libmagic-devel +BuildRequires: ocaml +## AUTOBUILDREQ-END +BuildRequires: dune +BuildRequires: ocaml +BuildRequires: ocaml-findlib + +%description +%{summary}. + +%package devel +Group: Development/Libraries/OCaml +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +This package contains libraries and signature files for developing applications that use %{name}. + +%debug_package + +%prep +%setup -q + +%build +./configure +make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +export OCAMLFIND_DESTDIR="%{buildroot}$(ocamlfind printconf destdir)" +mkdir -p "${OCAMLFIND_DESTDIR}/stublibs" +make install + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%dir %{_libdir}/ocaml/%{ocamlpck} +%{_libdir}/ocaml/%{ocamlpck}/* +%exclude %{_libdir}/ocaml/%{ocamlpck}/*.a +%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmx +%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmxa +%exclude %{_libdir}/ocaml/%{ocamlpck}/*.mli +%{_libdir}/ocaml/stublibs/*.so* +%doc LICENSE* + +%files devel +%defattr(-,root,root) +%{_libdir}/ocaml/%{ocamlpck}/*.a +%{_libdir}/ocaml/%{ocamlpck}/*.cmx +%{_libdir}/ocaml/%{ocamlpck}/*.cmxa +%{_libdir}/ocaml/%{ocamlpck}/*.mli +%doc README + +%changelog +* Fri Feb 11 2022 Silvan Calarco 0.7.3-1mamba +- package created using the webbuild interface