|
|
152e71e |
%ifnarch %{ocaml_native_compiler}
|
|
|
152e71e |
%global debug_package %{nil}
|
|
|
152e71e |
%endif
|
|
|
152e71e |
|
|
|
152e71e |
%global srcname astring
|
|
|
152e71e |
|
|
|
152e71e |
Name: ocaml-%{srcname}
|
|
|
43a6767 |
Version: 0.8.5
|
|
|
e0028ed |
Release: 4%{?dist}
|
|
|
152e71e |
Summary: Alternative String module for OCaml
|
|
|
152e71e |
|
|
|
152e71e |
License: ISC
|
|
|
152e71e |
URL: https://erratique.ch/software/astring
|
|
|
fd97089 |
Source0: https://github.com/dbuenzli/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
|
|
|
152e71e |
|
|
|
fd97089 |
BuildRequires: ocaml >= 4.05.0
|
|
|
152e71e |
BuildRequires: ocaml-findlib
|
|
|
152e71e |
BuildRequires: ocaml-ocamlbuild
|
|
|
152e71e |
BuildRequires: ocaml-ocamldoc
|
|
|
152e71e |
BuildRequires: ocaml-topkg-devel
|
|
|
152e71e |
|
|
|
152e71e |
%description
|
|
|
152e71e |
Astring exposes an alternative `String` module for OCaml. This module
|
|
|
152e71e |
tries to balance minimality and expressiveness for basic, index-free,
|
|
|
152e71e |
string processing and provides types and functions for substrings,
|
|
|
152e71e |
string sets and string maps.
|
|
|
152e71e |
|
|
|
152e71e |
Remaining compatible with the OCaml `String` module is a non-goal. The
|
|
|
152e71e |
`String` module exposed by Astring has exception safe functions,
|
|
|
152e71e |
removes deprecated and rarely used functions, alters some signatures
|
|
|
152e71e |
and names, adds a few missing functions and fully exploits OCaml's
|
|
|
152e71e |
newfound string immutability.
|
|
|
152e71e |
|
|
|
152e71e |
%package devel
|
|
|
152e71e |
Summary: Development files for %{name}
|
|
|
152e71e |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
152e71e |
|
|
|
152e71e |
%description devel
|
|
|
152e71e |
The %{name}-devel package contains libraries and signature files for
|
|
|
152e71e |
developing applications that use %{name}.
|
|
|
152e71e |
|
|
|
152e71e |
%prep
|
|
|
fd97089 |
%autosetup -n %{srcname}-%{version}
|
|
|
152e71e |
|
|
|
152e71e |
# Topkg does watermark replacements only if run inside a git checkout. Github
|
|
|
152e71e |
# tarballs do not come with a .git directory. Therefore, we do the watermark
|
|
|
152e71e |
# replacement manually.
|
|
|
152e71e |
for fil in $(find . -type f); do
|
|
|
152e71e |
sed -e 's,%%%%NAME%%%%,%{srcname},' \
|
|
|
152e71e |
-e 's,%%%%PKG_HOMEPAGE%%%%,%{url},' \
|
|
|
152e71e |
-e 's,%%%%VERSION%%%%,v%{version},' \
|
|
|
152e71e |
-e 's,%%%%VERSION_NUM%%%%,%{version},' \
|
|
|
152e71e |
-i.orig $fil
|
|
|
152e71e |
touch -r $fil.orig $fil
|
|
|
152e71e |
rm $fil.orig
|
|
|
152e71e |
done
|
|
|
152e71e |
|
|
|
152e71e |
%build
|
|
|
152e71e |
# Build the library and the tests
|
|
|
152e71e |
ocaml pkg/pkg.ml build --tests true
|
|
|
152e71e |
|
|
|
152e71e |
# Build the documentation
|
|
|
152e71e |
mkdir html
|
|
|
152e71e |
ocamldoc -html -d html -I +compiler-libs -I _build/src \
|
|
|
152e71e |
-css-style doc/style.css _build/src/astring.mli
|
|
|
152e71e |
|
|
|
152e71e |
%install
|
|
|
152e71e |
# Install the library
|
|
|
152e71e |
mkdir -p %{buildroot}%{_libdir}/ocaml/astring
|
|
|
152e71e |
cp -p _build/{opam,pkg/META} %{buildroot}%{_libdir}/ocaml/astring
|
|
|
152e71e |
%ifarch %{ocaml_native_compiler}
|
|
|
152e71e |
cp -a _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} \
|
|
|
152e71e |
%{buildroot}%{_libdir}/ocaml/astring
|
|
|
152e71e |
%else
|
|
|
152e71e |
cp -a _build/src/*.{cma,cmi,cmt,cmti,mli} %{buildroot}%{_libdir}/ocaml/astring
|
|
|
152e71e |
%endif
|
|
|
152e71e |
|
|
|
152e71e |
%check
|
|
|
152e71e |
ocaml pkg/pkg.ml test
|
|
|
152e71e |
|
|
|
152e71e |
%files
|
|
|
152e71e |
%doc CHANGES.md README.md
|
|
|
152e71e |
%license LICENSE.md
|
|
|
152e71e |
%dir %{_libdir}/ocaml/%{srcname}/
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/META
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi
|
|
|
152e71e |
%ifarch %{ocaml_native_compiler}
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
|
|
|
152e71e |
%endif
|
|
|
152e71e |
|
|
|
152e71e |
%files devel
|
|
|
152e71e |
%doc html/*
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/opam
|
|
|
152e71e |
%ifarch %{ocaml_native_compiler}
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.a
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa
|
|
|
152e71e |
%endif
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
|
|
|
152e71e |
%{_libdir}/ocaml/%{srcname}/%{srcname}*.mli
|
|
|
152e71e |
|
|
|
152e71e |
%changelog
|
|
|
e0028ed |
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-4
|
|
|
e0028ed |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
e0028ed |
|
|
|
3f47b28 |
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.5-3
|
|
|
3f47b28 |
- OCaml 4.11.1 rebuild
|
|
|
3f47b28 |
|
|
|
5a9f1df |
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.5-2
|
|
|
5a9f1df |
- OCaml 4.11.0 rebuild
|
|
|
5a9f1df |
|
|
|
43a6767 |
* Wed Aug 19 2020 Jerry James <loganjerry@gmail.com> - 0.8.5-1
|
|
|
43a6767 |
- Version 0.8.5
|
|
|
43a6767 |
|
|
|
90654e8 |
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-3
|
|
|
90654e8 |
- Second attempt - Rebuilt for
|
|
|
90654e8 |
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
90654e8 |
|
|
|
065a50b |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-2
|
|
|
065a50b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
065a50b |
|
|
|
fd97089 |
* Thu Jun 25 2020 Dan Čermák <dan.cermak@cgc-instruments.com> - 0.8.4-1
|
|
|
fd97089 |
- New upstream release 0.8.4 (rhbz#1849120)
|
|
|
fd97089 |
|
|
|
bb18c6a |
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.3-8
|
|
|
bb18c6a |
- OCaml 4.11.0+dev2-2020-04-22 rebuild
|
|
|
bb18c6a |
|
|
|
1398701 |
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.3-7
|
|
|
1398701 |
- OCaml 4.11.0 pre-release attempt 2
|
|
|
1398701 |
|
|
|
d1383e0 |
* Sat Apr 18 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.3-6
|
|
|
d1383e0 |
- OCaml 4.11.0 pre-release
|
|
|
d1383e0 |
|
|
|
5c1e01e |
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.3-5
|
|
|
5c1e01e |
- Update all OCaml dependencies for RPM 4.16.
|
|
|
5c1e01e |
|
|
|
26c34c9 |
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.3-4
|
|
|
26c34c9 |
- OCaml 4.10.0 final.
|
|
|
26c34c9 |
|
|
|
23ecf78 |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-3
|
|
|
23ecf78 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
23ecf78 |
|
|
|
4435627 |
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.3-2
|
|
|
4435627 |
- OCaml 4.10.0+beta1 rebuild.
|
|
|
4435627 |
|
|
|
152e71e |
* Wed Jan 8 2020 Jerry James <loganjerry@gmail.com> - 0.8.3-1
|
|
|
152e71e |
- Initial RPM
|