e3823b1
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
e3823b1
%define debug_package %{nil}
e3823b1
e3823b1
Name:           ocaml-findlib
47d162d
Version:        1.2.1
47d162d
Release:        1%{?dist}
e3823b1
Summary:        Objective CAML package manager and build helper
e3823b1
e3823b1
Group:          Development/Libraries
e3823b1
License:        BSD
e3823b1
URL:            http://www.ocaml-programming.de/packages/
47d162d
Source0:        http://www.ocaml-programming.de/packages/findlib-%{version}.tar.gz
e3823b1
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
fabcb9e
ExcludeArch:    ppc64
e3823b1
47d162d
BuildRequires:  ocaml >= 3.10.1
e3823b1
BuildRequires:  ocaml-camlp4-devel
e3823b1
BuildRequires:  ocaml-labltk-devel
88e6bb7
BuildRequires:  ocaml-ocamldoc
e3823b1
BuildRequires:  m4, ncurses-devel
d1158cc
BuildRequires:  gawk
e3823b1
e3823b1
%define _use_internal_dependency_generator 0
2601042
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Asttypes -i Parsetree
e3823b1
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
e3823b1
e3823b1
%description
e3823b1
Objective CAML package manager and build helper.
e3823b1
e3823b1
e3823b1
%package        devel
e3823b1
Summary:        Development files for %{name}
e3823b1
Group:          Development/Libraries
e3823b1
Requires:       %{name} = %{version}-%{release}
e3823b1
e3823b1
e3823b1
%description    devel
e3823b1
The %{name}-devel package contains libraries and header files for
e3823b1
developing applications that use %{name}.
e3823b1
e3823b1
e3823b1
%prep
e3823b1
%setup -q -n findlib-%{version}
e3823b1
e3823b1
e3823b1
%build
e3823b1
ocamlc -version
e3823b1
ocamlc -where
e3823b1
(cd tools/extract_args && make)
e3823b1
tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmktop ocamlopt ocamldep ocamldoc ||:
e3823b1
cat src/findlib/ocaml_args.ml
e3823b1
./configure -config %{_sysconfdir}/ocamlfind.conf \
e3823b1
  -bindir %{_bindir} \
e3823b1
  -sitelib `ocamlc -where` \
e3823b1
  -mandir %{_mandir} \
e3823b1
  -with-toolbox
e3823b1
make all
e3823b1
%if %opt
e3823b1
make opt
e3823b1
%endif
e3823b1
e3823b1
e3823b1
%install
e3823b1
rm -rf $RPM_BUILD_ROOT
e3823b1
# Grrr destdir grrrr
e3823b1
mkdir -p $RPM_BUILD_ROOT%{_bindir}
e3823b1
make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir}
e3823b1
mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
e3823b1
e3823b1
e3823b1
%clean
e3823b1
rm -rf $RPM_BUILD_ROOT
e3823b1
e3823b1
e3823b1
%files
e3823b1
%defattr(-,root,root,-)
e3823b1
%doc LICENSE doc/README
e3823b1
%config(noreplace) %{_sysconfdir}/ocamlfind.conf
e3823b1
%{_bindir}/*
e3823b1
%{_mandir}/man1/*
e3823b1
%{_mandir}/man5/*
e3823b1
%{_libdir}/ocaml/*/META
e3823b1
%{_libdir}/ocaml/topfind
e3823b1
%{_libdir}/ocaml/findlib
e3823b1
%if %opt
e3823b1
%exclude %{_libdir}/ocaml/findlib/*.a
e3823b1
%exclude %{_libdir}/ocaml/findlib/*.cmxa
e3823b1
%endif
e3823b1
%exclude %{_libdir}/ocaml/findlib/*.mli
e3823b1
%exclude %{_libdir}/ocaml/findlib/Makefile.config
e3823b1
%exclude %{_libdir}/ocaml/findlib/make_wizard
e3823b1
%exclude %{_libdir}/ocaml/findlib/make_wizard.pattern
e3823b1
%{_libdir}/ocaml/num-top
e3823b1
e3823b1
e3823b1
%files devel
e3823b1
%defattr(-,root,root,-)
e3823b1
%doc LICENSE doc/README doc/guide-html
e3823b1
%if %opt
e3823b1
%{_libdir}/ocaml/findlib/*.a
e3823b1
%{_libdir}/ocaml/findlib/*.cmxa
e3823b1
%endif
e3823b1
%{_libdir}/ocaml/findlib/*.mli
e3823b1
%{_libdir}/ocaml/findlib/Makefile.config
e3823b1
%{_libdir}/ocaml/findlib/make_wizard
e3823b1
%{_libdir}/ocaml/findlib/make_wizard.pattern
e3823b1
e3823b1
e3823b1
%changelog
47d162d
* Tue Feb 12 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.1-1
47d162d
- New upstream version 1.2.1.
47d162d
2601042
* Thu Sep  6 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-14
2601042
- Ignore Parsetree module, it's a part of the toplevel.
2601042
b4bbf8d
* Mon Sep  3 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-13
b4bbf8d
- Bump version to force rebuild against ocaml -6 release.
b4bbf8d
4fd7917
* Thu Aug 30 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-12
4fd7917
- Added BR: gawk.
4fd7917
c02c817
* Thu Aug 30 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-11
c02c817
- Force rebuild because of changed BRs in base OCaml.
c02c817
88e6bb7
* Thu Aug  2 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-10
88e6bb7
- BR added ocaml-ocamldoc so that ocamlfind ocamldoc works.
88e6bb7
- Fix path of camlp4 parsers in Makefile.
88e6bb7
fabcb9e
* Thu Jul 12 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-9
fabcb9e
- Added ExcludeArch: ppc64
fabcb9e
e3823b1
* Thu Jul 12 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-8
e3823b1
- Expanded tabs to spaces.
e3823b1
- Readded conditional opt section for files.
e3823b1
e3823b1
* Wed Jul 04 2007 Xavier Lamien <lxtnow[at]gmail.com> - 1.1.2pl1-7
e3823b1
- Fixed BR.
e3823b1
e3823b1
* Wed Jun 27 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-6
e3823b1
- Fix configure line.
e3823b1
- Install doc/guide-html.
e3823b1
- Added dependency on ncurses-devel.
e3823b1
e3823b1
* Mon Jun 11 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-5
e3823b1
- Build against 3.10.
e3823b1
- Update to latest package guidelines.
e3823b1
e3823b1
* Sat Jun  2 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-4
e3823b1
- Handle bytecode-only architectures.
e3823b1
e3823b1
* Sat May 26 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-3
e3823b1
- Missing builddep m4.
e3823b1
e3823b1
* Fri May 25 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-2
e3823b1
- Use OCaml find-requires and find-provides.
e3823b1
e3823b1
* Fri May 18 2007 Richard W.M. Jones <rjones@redhat.com> - 1.1.2pl1-1
e3823b1
- Initial RPM release.
e3823b1