Blob Blame History Raw
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}

Name:           ocaml-camomile
Version:        0.7.1
Release:        9%{?dist}
Summary:        Unicode library for OCaml

Group:          Development/Libraries
# Several files are MIT and UCD licensed, but the overall work is LGPLv2+
# and the LGPL/GPL supercedes compatible licenses.
License:        LGPLv2+
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch:    ppc64

BuildRequires:  ocaml, ocaml-findlib-devel, ocaml-ocamldoc, ocaml-camlp4-devel

%define _use_internal_dependency_generator 0
%define __find_requires /usr/lib/rpm/
%define __find_provides /usr/lib/rpm/

Camomile is a Unicode library for ocaml. 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

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.

%package        data
Summary:        Data files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    data
The %{name}-data package contains data files for developing
applications that use %{name}.

%setup -q -n camomile-%{version}

./configure --prefix=%{_prefix} --datadir=%{_datadir} --libdir=%{_libdir}
make dochtml
make man
strip tools/*.opt

export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $RPM_BUILD_ROOT%{_bindir}
make install prefix=$RPM_BUILD_ROOT%{_prefix} DATADIR=$RPM_BUILD_ROOT%{_datadir}
%if %opt
mv $RPM_BUILD_ROOT%{_bindir}/camomilecharmap.opt $RPM_BUILD_ROOT%{_bindir}/camomilecharmap
mv $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef.opt $RPM_BUILD_ROOT%{_bindir}/camomilelocaledef


%if %opt
%exclude %{_libdir}/ocaml/camomile/*.a
%exclude %{_libdir}/ocaml/camomile/*.cmxa
%exclude %{_libdir}/ocaml/camomile/*.cmx
%exclude %{_libdir}/ocaml/camomile/*.mli
%if %opt

%files devel
%doc README dochtml/*
%if %opt

%files data

* Wed Nov 26 2008 Richard W.M. Jones <> - 0.7.1-9
- Rebuild for OCaml 3.11.0+rc1.

* Wed Nov 19 2008 Richard W.M. Jones <> - 0.7.1-8
- Rebuild for OCaml 3.11.0

* Wed Apr 23 2008 Richard W.M. Jones <> - 0.7.1-7
- Rebuild for OCaml 3.10.2

* Fri Mar 21 2008 Richard W.M. Jones <> - 0.7.1-6
- ExcludeArch ppc64 (#438486).

* Mon Mar 17 2008 Richard W.M. Jones <> - 0.7.1-5
- Definitive license.
- Move ./configure into the build section.
- Remove a superfluous comment in the install section.
- Fix rpmlint error 'configure-without-libdir-spec'.
- Scratch build in Koji.

* Wed Mar  5 2008 Richard W.M. Jones <> - 0.7.1-4
- License is LGPLv2+ (no OCaml exception).

* Wed Mar  5 2008 Richard W.M. Jones <> - 0.7.1-3
- Remove ExcludeArch ppc64.

* Tue Feb 12 2008 Richard W.M. Jones <> - 0.7.1-2
- Added BR ocaml-camlp4-devel.
- Rename /usr/bin/*.opt as /usr/bin.

* Wed Aug 08 2007 Richard W.M. Jones <> - 0.7.1-1
- Initial RPM release.