Compare commits

...

5 Commits
rawhide ... f9

Author SHA1 Message Date
Fedora Release Engineering
e5b3ced485 dist-git conversion 2010-07-29 04:46:04 +00:00
Bill Nottingham
73b72f140c Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:21:06 +00:00
Alan Dunn
4c5959b365 Backport to F-9 from F-11 of ocaml-ocamlgraph-1.0. 2009-03-06 21:36:29 +00:00
Alan Dunn
6515b65e56 Initial commit for F-9 branch. 2008-08-23 20:54:11 +00:00
Toshio くらとみ
ec5e080f1a Initialize branch F-9 for ocaml-ocamlgraph 2008-08-23 03:40:58 +00:00
7 changed files with 191 additions and 21 deletions

View File

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
ocamlgraph-1.0.tar.gz

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: ocaml-ocamlgraph
# $Id$
NAME := ocaml-ocamlgraph
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

153
ocaml-ocamlgraph.spec Normal file
View File

@ -0,0 +1,153 @@
# Note: rpmlint complains that this package is not marked as
# noarch. This is not really an error as this is current standard
# practice for OCaml libraries even though they do not contain
# architecture dependent files themselves (the devel packages do
# instead).
#
# See https://www.redhat.com/archives/fedora-packaging/2008-August/msg00017.html
# for a discussion and
# https://www.redhat.com/archives/fedora-packaging/2008-August/msg00020.html
# for a potential fix. However, this is probably not the time and
# 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
Name: ocaml-ocamlgraph
Version: 1.0
Release: 4%{?dist}
Summary: OCaml library for arc and node graphs
Group: Development/Libraries
License: LGPLv2 with exceptions
URL: http://ocamlgraph.lri.fr/
Source0: http://ocamlgraph.lri.fr/download/ocamlgraph-%{version}.tar.gz
Source1: ocamlgraph-test.result
Patch0: ocamlgraph-1.0-no-view-graph-doc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ocaml >= 3.08, ocaml-findlib-devel, ocaml-ocamldoc
BuildRequires: ocaml-lablgtk-devel
BuildRequires: gtk2-devel, libgnomecanvas-devel
%description
Ocamlgraph provides several different implementations of graph data
structures. It also provides implementations for a number of classical
graph algorithms like Kruskal's algorithm for MSTs, topological
ordering of DAGs, Dijkstra's shortest paths algorithm, and
Ford-Fulkerson's maximal-flow algorithm to name a few. The algorithms
and data structures are written functorially for maximal
reusability. Also has input and output capability for Graph Modeling
Language file format and Dot and Neato graphviz (graph visualization)
tools.
%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}.
%prep
%setup -q -n ocamlgraph-%{version}
%patch0 -p1
cp %{SOURCE1} .
%build
./configure --prefix=%{_prefix} --mandir=%{_mandir} --libdir=%{_libdir}
%if %opt
%define opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt
%else
%define opt_option OCAMLBEST=byte OCAMLC=ocamlc
%endif
make %{opt_option}
make doc
%check
make --no-print-directory check >& test
diff test ocamlgraph-test.result
%install
rm -rf %{buildroot}
%define 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/
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/API/
cp -p LICENSE %{buildroot}%{_defaultdocdir}/%{name}-%{version}/
cp -p README %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/
cp -p examples/*.ml %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/examples/
cp -p doc/* %{buildroot}%{_defaultdocdir}/%{name}-%{version}-devel/API/
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{ocaml_destdir}/ocamlgraph/
%if %opt
%exclude %{ocaml_destdir}/*/*.a
%exclude %{ocaml_destdir}/*/*.cmxa
%exclude %{ocaml_destdir}/*/*.cmx
%endif
%exclude %{ocaml_destdir}/*/*.mli
%{_defaultdocdir}/%{name}-%{version}/LICENSE
%files devel
%defattr(-,root,root,-)
%if %opt
%{ocaml_destdir}/*/*.a
%{ocaml_destdir}/*/*.cmxa
%{ocaml_destdir}/*/*.cmx
%endif
%{ocaml_destdir}/*/*.mli
# Include all code and examples in the doc directory
%{_defaultdocdir}/%{name}-%{version}-devel/
%changelog
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri Dec 5 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0-3
- Rebuild for OCaml 3.11.0.
- Requires lablgtk2.
- Pull in gtk / libgnomecanvas too.
* Thu Nov 20 2008 Richard W.M. Jones <rjones@redhat.com> - 1.0-1
- New upstream release 1.0.
- Patch0 removed - now upstream.
- Added a patch to fix documentation problem.
- Run tests with 'make --no-print-directory'.
* Wed Aug 13 2008 Alan Dunn <amdunn@gmail.com> 0.99c-2
- Incorporates changes suggested during review:
- License information was incorrect
- rpmlint error now properly justified
* Thu Aug 07 2008 Alan Dunn <amdunn@gmail.com> 0.99c-1
- Initial Fedora RPM release.

View File

@ -0,0 +1,11 @@
--- ocamlgraph-1.0/Makefile.in.orig 2008-11-20 16:38:27.000000000 +0000
+++ ocamlgraph-1.0/Makefile.in 2008-11-20 16:38:42.000000000 +0000
@@ -293,7 +293,7 @@
mkdir -p doc
rm -f doc/*
$(OCAMLDOC) -d doc -html $(INCLUDES) $(DOC_SRC)
- $(MAKE) -C $(VIEWER_DIR) doc
+# $(MAKE) -C $(VIEWER_DIR) doc
# literate programming
$(NAME).tex: $(DOC_SRC)

25
ocamlgraph-test.result Normal file
View File

@ -0,0 +1,25 @@
ocaml graph.cma tests/check.ml
iter:
pre 3
pre 5
pre 4
pre 2
post 2
post 4
post 5
pre 6
post 6
post 3
prefix:
pre 3
pre 6
pre 5
pre 4
pre 2
step:
visit 6
visit 5
visit 4
visit 2
visit 3
visit 1

View File

@ -0,0 +1 @@
65dfcab73bc15776f7547860a78d682a ocamlgraph-1.0.tar.gz