- Include files (including .cmo files) and install more files that are

needed by other applications (eg: Frama-C) that depend on
    ocaml-ocamlgraph
- define -> global
- Update for new dependency generator in F13
This commit is contained in:
Alan Dunn 2010-02-11 03:22:59 +00:00
parent 2939b0a1a2
commit 1cfe3a34ba
3 changed files with 40 additions and 10 deletions

View File

@ -1,2 +1,3 @@
ocaml-ocamlgraph-0_99c-2_fc9:HEAD:ocaml-ocamlgraph-0.99c-2.fc9.src.rpm:1219524338
ocaml-ocamlgraph-1_1-1_fc10:HEAD:ocaml-ocamlgraph-1.1-1.fc10.src.rpm:1249699549
ocaml-ocamlgraph-1_3-3_fc12:HEAD:ocaml-ocamlgraph-1.3-3.fc12.src.rpm:1265858472

View File

@ -11,15 +11,18 @@
# place to try to change the standard practice, so for now I will
# follow standard practice.
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
%define _use_internal_dependency_generator 0
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%global debug_package %{nil}
# Use new dependency generator in Fedora >= 13
%if 0%{?fedora} <= 12
%global _use_internal_dependency_generator 0
%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%endif
Name: ocaml-ocamlgraph
Version: 1.3
Release: 2%{?dist}
Release: 3%{?dist}
Summary: OCaml library for arc and node graphs
Group: Development/Libraries
@ -32,6 +35,10 @@ Source1: ocamlgraph-test.result
Patch0: ocamlgraph-1.1-no-view-graph-doc.patch
Patch1: ocamlgraph-1.3-no-viewGraph_test.patch
# Makefile does not install some files that other applications expect
# - difference comes in install-findlib
Patch2: ocamlgraph-1.3-install-dgraph-and-viewer.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: sparc64 s390 s390x
BuildRequires: ocaml >= 3.08, ocaml-findlib-devel, ocaml-ocamldoc
@ -67,6 +74,7 @@ developing applications that use %{name}.
%patch0 -p1
%patch1 -p1
%patch2 -p1
cp %{SOURCE1} .
@ -75,9 +83,9 @@ cp %{SOURCE1} .
./configure --prefix=%{_prefix} --mandir=%{_mandir} --libdir=%{_libdir}
%if %opt
%define opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt
%global opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt
%else
%define opt_option OCAMLBEST=byte OCAMLC=ocamlc
%global opt_option OCAMLBEST=byte OCAMLC=ocamlc
%endif
make depend
make %{opt_option}
@ -91,10 +99,9 @@ diff test ocamlgraph-test.result
%install
rm -rf %{buildroot}
%define ocaml_destdir %{_libdir}/ocaml
%global ocaml_destdir %{_libdir}/ocaml
mkdir -p %{buildroot}%{ocaml_destdir}
make OCAMLFIND_DESTDIR=%{buildroot}%{ocaml_destdir} install-findlib
rm -f %{buildroot}%{ocaml_destdir}/ocamlgraph/*.cmo
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}/
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/examples/
@ -116,6 +123,7 @@ rm -rf %{buildroot}
%exclude %{ocaml_destdir}/*/*.a
%exclude %{ocaml_destdir}/*/*.cmxa
%exclude %{ocaml_destdir}/*/*.cmx
%exclude %{ocaml_destdir}/*/*.o
%endif
%exclude %{ocaml_destdir}/*/*.mli
%{_defaultdocdir}/%{name}-%{version}/LICENSE
@ -127,6 +135,7 @@ rm -rf %{buildroot}
%{ocaml_destdir}/*/*.a
%{ocaml_destdir}/*/*.cmxa
%{ocaml_destdir}/*/*.cmx
%{ocaml_destdir}/*/*.o
%endif
%{ocaml_destdir}/*/*.mli
# Include all code and examples in the doc directory
@ -134,6 +143,13 @@ rm -rf %{buildroot}
%changelog
* Wed Feb 10 2010 Alan Dunn <amdunn@gmail.com> - 1.3-3
- Include files (including .cmo files) and install more files that are
needed by other applications (eg: Frama-C) that depend on
ocaml-ocamlgraph
- define -> global
- Update for new dependency generator in F13
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1.3-2
- Rebuild for OCaml 3.11.2.

View File

@ -0,0 +1,13 @@
--- ocamlgraph-1.3-old/Makefile.in 2009-10-02 07:48:39.000000000 -0400
+++ ocamlgraph-1.3/Makefile.in 2010-01-17 10:20:12.076904950 -0500
@@ -335,7 +335,9 @@
$(OCAMLFIND) install ocamlgraph META \
$(SRCDIR)/*.mli $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli \
graph$(LIBEXT) graph.cmx graph.cmo graph.cmi $(CMA) $(CMXA) \
- $(VIEWER_CMX) $(VIEWER_CMO) $(DGRAPH_CMX) $(DGRAPH_CMO)
+ $(VIEWER_CMX) $(VIEWER_CMO) $(DGRAPH_CMX) $(DGRAPH_CMO) \
+ $(VIEWER_CMILIB) $(VIEWER_CMXLIB) $(VIEWER_CMXLIB:.cmx=.o) $(VIEWER_CMOLIB) \
+ $(DGRAPH_CMILIB) $(DGRAPH_CMXLIB) $(DGRAPH_CMXLIB:.cmx=.o) $(DGRAPH_CMOLIB)
else
$(OCAMLFIND) install ocamlgraph META \
$(SRCDIR)/*.mli $(VIEWER_DIR)/*.mli $(DGRAPH_DIR)/*.mli \