update to 1.0.2 [release 1.0.2-1mamba;Fri Feb 19 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 07:50:58 +01:00
parent 69fa3fd4de
commit a2f0a46e19

View File

@ -1,27 +1,37 @@
%define ocamlpck camomile
Name: ocaml-camomile
Version: 0.8.3
Release: 2mamba
Version: 1.0.2
Release: 1mamba
Summary: a Unicode library for objective caml language
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://camomile.sourceforge.net/
Source: http://prdownloads.sourceforge.net/camomile/camomile-%{version}.tar.bz2
URL: https://camomile.sourceforge.net/
Source: https://github.com/yoriyuki/Camomile.git/%{version}/Camomile-%{version}.tar.bz2
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: ocaml
## AUTOBUILDREQ-END
BuildRequires: dune
BuildRequires: ocaml
BuildRequires: ocaml-findlib
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: %{name}-data = %{?epoch:%epoch:}%{version}-%{release}
%description
Camomile is a Unicode library for objective caml (a. k. a. OCaml or O'Caml) language.
Camomile provides Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about 200 encodings, collation and locale-sensitive case mappings, and more.
The library is currently designed for Unicode Standard 3.2.
%package data
Group: System/Libraries
Summary: Data files for %{name}
%description data
This package contains the data files provided with %{name}.
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
@ -30,19 +40,34 @@ 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 -n camomile-%{version}
%setup -q -n Camomile-%{version}
%build
%configure --disable-ldconf
make
find . -name "*.mli" -exec sed -i 's,Pervasives.in_channel,Stdlib.in_channel,g' {} +
find . -name "*.mli" -exec sed -i 's,Pervasives.out_channel,Stdlib.out_channel,g' {} +
find . -name "*.ml" -exec sed -i 's,Pervasives.in_channel,Stdlib.in_channel,g' {} +
find . -name "*.ml" -exec sed -i 's,Pervasives.out_channel,Stdlib.out_channel,g' {} +
find . -name "*.ml" -exec sed -i 's,Pervasives.compare,Stdlib.compare,g' {} +
dune build @install
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir)
install -d $OCAMLFIND_DESTDIR/%{ocamlpck}
mkdir -p %{buildroot}%{_libdir}/ocaml
dune install \
--destdir="%{buildroot}" \
--libdir="%{_libdir}/ocaml"
make install DATADIR=%{buildroot}%{_datadir}
rm -rf %{buildroot}/usr/doc
# Remove annotation files and sources.
rm -Rf %{buildroot}%{_libdir}/ocaml/camomile/*.cmt*
rm -Rf %{buildroot}%{_libdir}/ocaml/camomile/*.ml
# Install the *.mli files by hand.
cp _build/install/default/lib/camomile/library/*.mli %{buildroot}%{_libdir}/ocaml/camomile/
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -50,19 +75,12 @@ make install DATADIR=%{buildroot}%{_datadir}
%files
%defattr(-,root,root)
%dir %{_libdir}/ocaml/%{ocamlpck}
%{_libdir}/ocaml/%{ocamlpck}/META
%{_libdir}/ocaml/%{ocamlpck}/*.cma
%{_libdir}/ocaml/%{ocamlpck}/*.cmi
%dir %{_datadir}/camomile
%dir %{_datadir}/camomile/charmaps
%{_datadir}/camomile/charmaps/*.mar
%dir %{_datadir}/camomile/database
%{_datadir}/camomile/database/*.mar
%dir %{_datadir}/camomile/locales
%{_datadir}/camomile/locales/*.mar
%dir %{_datadir}/camomile/mappings
%{_datadir}/camomile/mappings/*.mar
%doc COPYING
%{_libdir}/ocaml/%{ocamlpck}/*
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.a
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmx
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.cmxa
%exclude %{_libdir}/ocaml/%{ocamlpck}/*.mli
%doc LICENSE.md
%files devel
%defattr(-,root,root)
@ -71,7 +89,15 @@ make install DATADIR=%{buildroot}%{_datadir}
%{_libdir}/ocaml/%{ocamlpck}/*.cmxa
%{_libdir}/ocaml/%{ocamlpck}/*.mli
%files data
%defattr(-,root,root)
%dir %{_datadir}/camomile
%{_datadir}/camomile/*
%changelog
* Fri Feb 19 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.2-1mamba
- update to 1.0.2
* Sun Jun 23 2013 Davide Madrisan <davide.madrisan@gmail.com> 0.8.3-2mamba
- rebuilt against ocaml 4.00
- add a devel package