rpms/ocaml-extlib/devel extlib-install.patch, NONE, 1.1 extlib-ocamldoc-debian.patch, NONE, 1.1 ocaml-extlib.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Richard W.M. Jones (rjones) fedora-extras-commits at redhat.com
Wed Aug 1 17:42:40 UTC 2007


Author: rjones

Update of /cvs/pkgs/rpms/ocaml-extlib/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28782/devel

Modified Files:
	.cvsignore sources 
Added Files:
	extlib-install.patch extlib-ocamldoc-debian.patch 
	ocaml-extlib.spec 
Log Message:
Initial import.


extlib-install.patch:

--- NEW FILE extlib-install.patch ---
--- install.ml.old	2007-05-19 14:11:48.000000000 +0100
+++ install.ml	2007-05-19 14:17:27.000000000 +0100
@@ -64,10 +64,18 @@
 		print_endline ("Installing " ^ file);
 		let path = dest ^ file in
 		(try Sys.remove path with _ -> ());
-		try
-			Sys.rename file path;
-		with
-			_ -> failwith "Aborted"
+		let ichan = open_in file in
+		let ochan = open_out path in
+		let buf = String.create 1024 in
+		let rec loop () =
+			let len = input ichan buf 0 1024 in
+			if len > 0 then (
+				output ochan buf 0 len;
+				loop ()
+			)
+		in
+		loop ();
+		Sys.remove file
 	end
 
 let complete_path p =

extlib-ocamldoc-debian.patch:

--- NEW FILE extlib-ocamldoc-debian.patch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_install.dpatch by Stefano Zacchiroli <zack at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad trunk~/Makefile trunk/Makefile
--- trunk~/Makefile	2006-02-20 12:32:37.000000000 -0500
+++ trunk/Makefile	2006-02-20 12:32:37.000000000 -0500
@@ -17,7 +17,7 @@
 	ocamlc -c $(MODULES:=.mli)
 	mkdir -p doc/
 	ocamldoc -sort -html -d doc/ $(MODULES:=.mli)
-	cp odoc_style.css doc/style.css
+#          cp odoc_style.css doc/style.css
 
 install:
 	cp META.txt META
diff -urNad trunk~/install.ml trunk/install.ml
--- trunk~/install.ml	2006-02-20 12:32:37.000000000 -0500
+++ trunk/install.ml	2006-02-20 12:32:58.000000000 -0500
@@ -171,12 +171,12 @@
 		List.iter (fun m -> remove (m ^ obj_ext)) modules;
 		remove ("extLib" ^ obj_ext);
 	end;
-	if !autodoc then begin
-		run (sprintf "ocamldoc -sort -html -d %s %s" doc_dir (m_list ".mli"));
-		run ((match path_type with
-				| PathDos -> sprintf "%s odoc_style.css %s\\style.css";
-				| PathUnix -> sprintf "%s odoc_style.css %s/style.css") cp_cmd doc_dir);
-	end;
+        if !autodoc then begin
+                run (sprintf "ocamldoc -sort -html -d %s %s" doc_dir (m_list ".mli"));
+(*                 run ((match path_type with
+                                | PathDos -> sprintf "%s odoc_style.css %s\\style.css";
+                                | PathUnix -> sprintf "%s odoc_style.css %s/style.css") cp_cmd doc_dir); *)
+        end;
 	match install_dir with
 	  Findlib ->
 	    let files = Buffer.create 0 in


--- NEW FILE ocaml-extlib.spec ---
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}

Name:           ocaml-extlib
Version:        1.5
Release:        5%{?dist}
Summary:        OCaml ExtLib additions to the standard library

Group:          Development/Libraries
License:        LGPL
URL:            http://ocaml-lib.sourceforge.net/
Source0:        extlib-1.5.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch:    ppc64

Patch0:         extlib-ocamldoc-debian.patch
Patch1:         extlib-install.patch

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

%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


%description
ExtLib is a project aiming at providing a complete - yet small -
standard library for the OCaml programming language. The purpose of
this library is to add new functions to OCaml Standard Library
modules, to modify some functions in order to get better performances
or more safety (tail-recursive) but also to provide new modules which
should be useful for the average OCaml programmer.


%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 extlib-%{version}
%patch0 -p1
%patch1

# Files in the archive have spurious +x mode.
chmod 0644 *

# and DOS line endings.
for f in *.ml *.mli README.txt LICENSE; do \
  %{__sed} -i 's/\r//' $f;
done


%build
# You can't just build extlib!


%install
rm -rf $RPM_BUILD_ROOT

extlibdir=$RPM_BUILD_ROOT%{_libdir}/ocaml/extlib
mkdir -p $extlibdir

# This does the build and install.
%if %opt
ocaml install.ml -d $extlibdir -b -n -doc
%else
ocaml install.ml -d $extlibdir -b -doc
%endif

# Copy the interface files, and extLib.ml which is really an interface.
cp extLib.ml *.mli $RPM_BUILD_ROOT%{_libdir}/ocaml/extlib

cp META.txt $RPM_BUILD_ROOT%{_libdir}/ocaml/extlib/META

# Move the HTML documentation - we'll install it using a %doc rule.
mv $extlibdir/extlib-doc .


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README.txt LICENSE
%{_libdir}/ocaml/extlib
%if %opt
%exclude %{_libdir}/ocaml/extlib/*.a
%exclude %{_libdir}/ocaml/extlib/*.cmxa
%exclude %{_libdir}/ocaml/extlib/*.cmx
%endif
%exclude %{_libdir}/ocaml/extlib/*.mli
%exclude %{_libdir}/ocaml/extlib/*.ml


%files devel
%defattr(-,root,root,-)
%doc extlib-doc/*
%if %opt
%{_libdir}/ocaml/extlib/*.a
%{_libdir}/ocaml/extlib/*.cmxa
%{_libdir}/ocaml/extlib/*.cmx
%endif
%{_libdir}/ocaml/extlib/*.mli
%{_libdir}/ocaml/extlib/*.ml

%changelog
* Wed Aug  1 2007 Richard W.M. Jones <rjones at redhat.com> - 1.5-5
- ExcludeArch ppc64
- Added BR on ocaml-ocamldoc
- Use %doc to install documentation.

* Mon Jun 11 2007 Richard W.M. Jones <rjones at redhat.com> - 1.5-4
- Updated to latest packaging guidelines.

* Sat Jun  2 2007 Richard W.M. Jones <rjones at redhat.com> - 1.5-3
- Support for bytecode-only architectures.
- *.cmx files are needed.

* Fri May 25 2007 Richard W.M. Jones <rjones at redhat.com> - 1.5-2
- Use OCaml find-requires and find-provides.

* Fri May 18 2007 Richard W.M. Jones <rjones at redhat.com> - 1.5-1
- Initial RPM release.



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-extlib/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	1 Aug 2007 16:25:56 -0000	1.1
+++ .cvsignore	1 Aug 2007 17:42:10 -0000	1.2
@@ -0,0 +1 @@
+extlib-1.5.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-extlib/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	1 Aug 2007 16:25:56 -0000	1.1
+++ sources	1 Aug 2007 17:42:10 -0000	1.2
@@ -0,0 +1 @@
+17808ae18d6b6e40637f0df8561583e8  extlib-1.5.tar.gz




More information about the fedora-extras-commits mailing list