From 1cfe3a34ba0f4ae14e7fdbebb9d16686e432e5af Mon Sep 17 00:00:00 2001 From: Alan Dunn Date: Thu, 11 Feb 2010 03:22:59 +0000 Subject: [PATCH] - 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 --- import.log | 1 + ocaml-ocamlgraph.spec | 36 +++++++++++++------ ...lgraph-1.3-install-dgraph-and-viewer.patch | 13 +++++++ 3 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 ocamlgraph-1.3-install-dgraph-and-viewer.patch diff --git a/import.log b/import.log index 9558ea8..44cd34c 100644 --- a/import.log +++ b/import.log @@ -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 diff --git a/ocaml-ocamlgraph.spec b/ocaml-ocamlgraph.spec index e6ae132..29f33c7 100644 --- a/ocaml-ocamlgraph.spec +++ b/ocaml-ocamlgraph.spec @@ -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 - 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 - 1.3-2 - Rebuild for OCaml 3.11.2. diff --git a/ocamlgraph-1.3-install-dgraph-and-viewer.patch b/ocamlgraph-1.3-install-dgraph-and-viewer.patch new file mode 100644 index 0000000..d290489 --- /dev/null +++ b/ocamlgraph-1.3-install-dgraph-and-viewer.patch @@ -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 \