92 lines
2.6 KiB
RPMSpec
92 lines
2.6 KiB
RPMSpec
Name: ocaml-lwt-log
|
|
Version: 1.1.0
|
|
Release: 4%{?dist}
|
|
Summary: Lwt logging library
|
|
|
|
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
|
|
|
|
License: LGPLv2+
|
|
URL: https://github.com/ocsigen/lwt_log
|
|
Source0: https://github.com/ocsigen/lwt_log/archive/%{version}/%{libname}-%{version}.tar.gz
|
|
|
|
# Fix FSF addresses in some header files.
|
|
Patch0: lwt-log-fsf-address.patch
|
|
|
|
BuildRequires: ocaml
|
|
BuildRequires: ocaml-findlib-devel
|
|
BuildRequires: ocaml-lwt-devel
|
|
|
|
BuildRequires: ocaml-dune
|
|
|
|
%description
|
|
Lwt-friendly logging library.
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description devel
|
|
The %{name}-devel package contains libraries and signature files for
|
|
developing applications that use %{name}.
|
|
|
|
%prep
|
|
%autosetup -n lwt_log-%{version} -p1
|
|
|
|
sed 's/jbuilder build --dev/jbuilder build/g' -i Makefile
|
|
dune upgrade
|
|
|
|
%build
|
|
%make_build
|
|
|
|
%install
|
|
export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
|
|
mkdir -p $OCAMLFIND_DESTDIR
|
|
jbuilder install --prefix %{buildroot}%{_prefix}/ --lib %{buildroot}%{_libdir}/ocaml/
|
|
|
|
# Remove .ml files.
|
|
rm -rf %{buildroot}%{_libdir}/ocaml/lwt_log/*.ml
|
|
rm -rf %{buildroot}%{_libdir}/ocaml/lwt_log/*/*.ml
|
|
|
|
# Hmm... the above needs refinement. Remove spurious doc files.
|
|
rm -rf %{buildroot}%{_prefix}/doc
|
|
|
|
# Makes *.cmxs executable such that they will be stripped.
|
|
# This will cause debuginfo to be generated!
|
|
find %{buildroot} -name '*.cmxs' -exec chmod 0755 {} \;
|
|
|
|
%files
|
|
%license COPYING
|
|
%doc README.md CHANGES
|
|
%{_libdir}/ocaml/lwt_log
|
|
%ifarch %{ocaml_native_compiler}
|
|
%exclude %{_libdir}/ocaml/lwt_log/*/*.a
|
|
%exclude %{_libdir}/ocaml/lwt_log/*/*.cmxa
|
|
%exclude %{_libdir}/ocaml/lwt_log/*/*.cmx
|
|
%endif
|
|
%exclude %{_libdir}/ocaml/lwt_log/*/*.mli
|
|
|
|
%files devel
|
|
%ifarch %{ocaml_native_compiler}
|
|
%{_libdir}/ocaml/lwt_log/*/*.a
|
|
%{_libdir}/ocaml/lwt_log/*/*.cmxa
|
|
%{_libdir}/ocaml/lwt_log/*/*.cmx
|
|
%endif
|
|
%{_libdir}/ocaml/lwt_log/*/*.mli
|
|
|
|
|
|
%changelog
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
* Thu Nov 22 2018 Ben Rosser <rosser.bjr@gmail.com> - 1.1.0-2
|
|
- Mark cmxs files as executable to generate debuginfo.
|
|
- Correct license (it's LGPLv2+, not BSD).
|
|
- Remove license from devel package.
|
|
- Fix FSF address in mli header files.
|
|
|
|
* Tue Oct 16 2018 Ben Rosser <rosser.bjr@gmail.com> - 1.1.0-1
|
|
- Initial packaging.
|