Blame ocaml-uuidm.spec

fb3c564
%ifnarch %{ocaml_native_compiler}
fb3c564
%global debug_package %{nil}
fb3c564
%endif
fb3c564
fb3c564
%global srcname uuidm
fb3c564
fb3c564
Name:           ocaml-%{srcname}
fb3c564
Version:        0.9.7
b730160
Release:        12%{?dist}
fb3c564
Summary:        Universally unique identifiers (UUIDs) for OCaml
fb3c564
fb3c564
License:        ISC
fb3c564
URL:            https://erratique.ch/software/uuidm
fb3c564
Source0:        https://github.com/dbuenzli/uuidm/archive/v%{version}/%{srcname}-%{version}.tar.gz
fb3c564
fb3c564
BuildRequires:  ocaml >= 4.03.0
fb3c564
BuildRequires:  ocaml-cmdliner-devel
fb3c564
BuildRequires:  ocaml-findlib
fb3c564
BuildRequires:  ocaml-ocamlbuild
fb3c564
BuildRequires:  ocaml-ocamldoc
fb3c564
BuildRequires:  ocaml-topkg-devel
fb3c564
fb3c564
%description
fb3c564
Uuidm is an OCaml module implementing 128 bit universally unique
fb3c564
identifiers, versions 3, 5 (named based with MD5, SHA-1 hashing) and 4
fb3c564
(random based); see RFC 4122: http://tools.ietf.org/html/rfc4122.
fb3c564
fb3c564
%package        devel
fb3c564
Summary:        Development files for %{name}
fb3c564
Requires:       %{name}%{?_isa} = %{version}-%{release}
fb3c564
fb3c564
%description    devel
fb3c564
The %{name}-devel package contains libraries and signature files for
fb3c564
developing applications that use %{name}.
fb3c564
fb3c564
%prep
fb3c564
%autosetup -n %{srcname}-%{version}
fb3c564
fb3c564
# The META file mistakenly uses the wrong version tag
fb3c564
sed -i 's/VERSION/VERSION_NUM/' pkg/META
fb3c564
fb3c564
# Topkg does watermark replacements only if run inside a git checkout.  Github
fb3c564
# tarballs do not come with a .git directory.  Therefore, we do the watermark
fb3c564
# replacement manually.
fb3c564
for fil in $(find . -type f); do
fb3c564
  sed -e 's,%%%%NAME%%%%,%{srcname},' \
fb3c564
      -e 's,%%%%PKG_HOMEPAGE%%%%,%{url},' \
fb3c564
      -e 's,%%%%VERSION%%%%,v%{version},' \
fb3c564
      -e 's,%%%%VERSION_NUM%%%%,%{version},' \
fb3c564
      -i.orig $fil
fb3c564
  touch -r $fil.orig $fil
fb3c564
  rm $fil.orig
fb3c564
done
fb3c564
fb3c564
%build
fb3c564
# Build the library and the tests
fb3c564
ocaml pkg/pkg.ml build --tests true --with-cmdliner true
fb3c564
fb3c564
# Build the documentation
fb3c564
mkdir html
fb3c564
ocamldoc -html -d html -I _build/src _build/src/uuidm.mli
fb3c564
fb3c564
%install
fb3c564
# Install the library
fb3c564
mkdir -p %{buildroot}%{_libdir}/ocaml/uuidm
fb3c564
cp -p _build/{opam,pkg/META} %{buildroot}%{_libdir}/ocaml/uuidm
fb3c564
%ifarch %{ocaml_native_compiler}
fb3c564
cp -a _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} \
fb3c564
  %{buildroot}%{_libdir}/ocaml/uuidm
fb3c564
%else
fb3c564
cp -a _build/src/*.{cma,cmi,cmt,cmti,mli} %{buildroot}%{_libdir}/ocaml/uuidm
fb3c564
%endif
fb3c564
fb3c564
%check
fb3c564
ocaml pkg/pkg.ml test
fb3c564
fb3c564
%files
fb3c564
%doc CHANGES.md README.md
fb3c564
%license LICENSE.md
fb3c564
%dir %{_libdir}/ocaml/%{srcname}/
fb3c564
%{_libdir}/ocaml/%{srcname}/META
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi
fb3c564
%ifarch %{ocaml_native_compiler}
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
fb3c564
%endif
fb3c564
fb3c564
%files devel
fb3c564
%doc html/*
fb3c564
%{_libdir}/ocaml/%{srcname}/opam
fb3c564
%ifarch %{ocaml_native_compiler}
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.a
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa
fb3c564
%endif
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
fb3c564
%{_libdir}/ocaml/%{srcname}/%{srcname}*.mli
fb3c564
fb3c564
%changelog
b730160
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-12
b730160
- OCaml 4.11.1 rebuild
b730160
bed415a
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-11
bed415a
- OCaml 4.11.0 rebuild
bed415a
8a8962c
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-10
8a8962c
- Second attempt - Rebuilt for
8a8962c
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
8a8962c
17cfddb
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-9
17cfddb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
17cfddb
422fafe
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-8
422fafe
- OCaml 4.11.0+dev2-2020-04-22 rebuild
422fafe
79cca67
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-7
79cca67
- OCaml 4.11.0 pre-release attempt 2
79cca67
e1da919
* Sat Apr 18 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-6
e1da919
- OCaml 4.11.0 pre-release
e1da919
d17bb9f
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-5
d17bb9f
- Update all OCaml dependencies for RPM 4.16.
d17bb9f
debbe92
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-4
debbe92
- OCaml 4.10.0 final.
debbe92
0907d3a
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-3
0907d3a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0907d3a
360cc04
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-2
360cc04
- OCaml 4.10.0+beta1 rebuild.
360cc04
fb3c564
* Thu Jan  9 2020 Jerry James <loganjerry@gmail.com> - 0.9.7-1
fb3c564
- Initial RPM