102 lines
2.6 KiB
RPMSpec
102 lines
2.6 KiB
RPMSpec
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
|
%if ! %opt
|
|
%global debug_package %{nil}
|
|
%endif
|
|
|
|
Name: ocaml-base64
|
|
Version: 2.1.2
|
|
Release: 1%{?dist}
|
|
Summary: Base64 library for OCaml
|
|
|
|
License: ISC
|
|
URL: https://github.com/mirage/ocaml-base64
|
|
Source0: https://github.com/mirage/ocaml-base64/archive/v%{version}.tar.gz
|
|
|
|
BuildRequires: ocaml
|
|
BuildRequires: ocaml-ocamlbuild
|
|
BuildRequires: ocaml-ocamldoc
|
|
BuildRequires: ocaml-findlib
|
|
|
|
|
|
%description
|
|
Base64 is a group of similar binary-to-text encoding schemes that
|
|
represent binary data in an ASCII string format by translating it into
|
|
a radix-64 representation. It is specified in RFC 4648.
|
|
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}.
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
%description devel
|
|
Development files for %{name}.
|
|
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
|
|
%build
|
|
# Bizarro build system, so build and install it by hand.
|
|
ocamlbuild -use-ocamlfind -classic-display -tag debug src/b64.cma
|
|
ocamlbuild -use-ocamlfind -classic-display -tag debug src/b64.cmxa
|
|
ocamlbuild -use-ocamlfind -classic-display -tag debug src/b64.cmxs
|
|
|
|
|
|
%install
|
|
export DESTDIR=$RPM_BUILD_ROOT
|
|
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
|
mkdir -p $OCAMLFIND_DESTDIR
|
|
sed 's/^version.*/version = "%{version}"/' < pkg/META > META
|
|
ocamlfind install base64 _build/src/* META
|
|
|
|
# Delete a few files we don't really want.
|
|
pushd $OCAMLFIND_DESTDIR/base64
|
|
rm b64.annot b64.cmt b64.cmti
|
|
popd
|
|
|
|
|
|
%files
|
|
%doc README.md
|
|
%{_libdir}/ocaml/base64
|
|
%if %opt
|
|
%exclude %{_libdir}/ocaml/base64/*.a
|
|
%exclude %{_libdir}/ocaml/base64/*.cmx
|
|
%exclude %{_libdir}/ocaml/base64/*.cmxa
|
|
%exclude %{_libdir}/ocaml/base64/*.cmxs
|
|
%endif
|
|
%exclude %{_libdir}/ocaml/base64/*.mli
|
|
|
|
|
|
%files devel
|
|
%doc CHANGES.md
|
|
%if %opt
|
|
%{_libdir}/ocaml/base64/*.a
|
|
%{_libdir}/ocaml/base64/*.cmx
|
|
%{_libdir}/ocaml/base64/*.cmxa
|
|
%{_libdir}/ocaml/base64/*.cmxs
|
|
%endif
|
|
%{_libdir}/ocaml/base64/*.mli
|
|
|
|
|
|
%changelog
|
|
* Mon Nov 07 2016 Richard W.M. Jones <rjones@redhat.com> - 2.1.2-1
|
|
- New upstream version 2.1.2.
|
|
|
|
* Wed Oct 19 2016 Dan Horák <dan[at]danny.cz> - 2.0.0-5
|
|
- disable debuginfo subpackage on interpreted builds
|
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Tue Jul 28 2015 Richard W.M. Jones <rjones@redhat.com> - 2.0.0-3
|
|
- OCaml 4.02.3 rebuild.
|
|
|
|
* Sat Jul 25 2015 Richard W.M. Jones <rjones@redhat.com> - 2.0.0-2
|
|
- Make -devel package depend on fully versioned base package.
|
|
- Remove duplicate META file.
|
|
|
|
* Fri Jul 24 2015 Richard W.M. Jones <rjones@redhat.com> - 2.0.0-1
|
|
- New package required by js-of-ocaml.
|