rpms/ocaml-csv/devel csv-extlib.patch, NONE, 1.1 csv-install.patch, NONE, 1.1 ocaml-csv.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
Fri Aug 24 16:35:48 UTC 2007
Author: rjones
Update of /cvs/pkgs/rpms/ocaml-csv/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1133/devel
Modified Files:
.cvsignore sources
Added Files:
csv-extlib.patch csv-install.patch ocaml-csv.spec
Log Message:
Initial import.
csv-extlib.patch:
--- NEW FILE csv-extlib.patch ---
--- csv.ml.orig 2007-05-29 13:07:33.000000000 +0100
+++ csv.ml 2007-05-29 13:07:44.000000000 +0100
@@ -45,7 +45,7 @@
(* Uncomment the next line to enable Extlib's List function. These
* avoid stack overflows on really huge CSV files.
*)
-(*open ExtList*)
+open ExtList
type t = string list list
--- Makefile.orig 2007-05-29 13:11:36.000000000 +0100
+++ Makefile 2007-05-29 13:11:53.000000000 +0100
@@ -6,15 +6,15 @@
# of file csv.ml.
OCAMLCINCS :=
-#OCAMLCINCS := -package extlib
+OCAMLCINCS := -package extlib
OCAMLCFLAGS := -g
OCAMLCLIBS :=
-#OCAMLCLIBS := -linkpkg
+OCAMLCLIBS := -linkpkg
OCAMLOPTINCS := $(OCAMLCINCS)
OCAMLOPTFLAGS :=
OCAMLOPTLIBS :=
-#OCAMLOPTLIBS := -linkpkg
+OCAMLOPTLIBS := -linkpkg
OBJS := csv.cmo
XOBJS := $(OBJS:.cmo=.cmx)
csv-install.patch:
--- NEW FILE csv-install.patch ---
--- Makefile.orig 2007-05-29 13:16:31.000000000 +0100
+++ Makefile 2007-05-29 13:27:56.000000000 +0100
@@ -67,6 +67,20 @@
include .depend
endif
+# Install.
+
+install: META
+ ocamlfind install csv META *.mli $(wildcard *.a) csv.cmi $(wildcard csv.cmx) *.cma $(wildcard *.cmxa)
+ install csvtool ${DESTDIR}${BINDIR}
+
+META:
+ rm -f $@
+ echo 'version="${VERSION}"' >> $@
+ echo 'description="CSV library"' >> $@
+ echo 'archive(byte)="csv.cma"' >> $@
+ echo 'archive(native)="csv.cmxa"' >> $@
+ echo 'requires="extlib"' >> $@
+
# Build a distribution.
dist:
--- NEW FILE ocaml-csv.spec ---
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
Name: ocaml-csv
Version: 1.1.6
Release: 3%{?dist}
Summary: OCaml library for reading and writing CSV files
Group: Development/Libraries
License: LGPLv2+
URL: http://merjis.com/developers/csv
Source0: http://merjis.com/_file/ocaml-csv-1.1.6.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: ppc64
Patch0: csv-extlib.patch
Patch1: csv-install.patch
BuildRequires: ocaml, ocaml-findlib-devel, ocaml-extlib-devel
%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
This OCaml library can read and write CSV files, including all
extensions used by Excel - eg. quotes, newlines, 8 bit characters in
fields, quote-0 etc.
The library comes with a handy command line tool called csvtool for
handling CSV files from shell scripts.
%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
%patch0 -p0
%patch1 -p0
%build
#make all
make csv.cma
%if %opt
make csvtool csv.cmxa
strip csvtool
%else
ocamlfind ocamlc -package extlib -linkpkg csv.cma csvtool.ml -o csvtool
%endif
%install
rm -rf $RPM_BUILD_ROOT
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
mkdir -p $DESTDIR%{_bindir}
make install BINDIR=%{_bindir}
# Create some documentation.
if [ ! -f README ]; then
cat <<EOM > README
OCaml library for reading and writing CSV files.
For more information, see http://merjis.com/developers/csv .
This library is released under the GNU LGPL + OCaml linking exception.
EOM
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README
%{_libdir}/ocaml/csv
%if %opt
%exclude %{_libdir}/ocaml/csv/*.a
%exclude %{_libdir}/ocaml/csv/*.cmxa
%exclude %{_libdir}/ocaml/csv/*.cmx
%endif
%exclude %{_libdir}/ocaml/csv/*.mli
%{_bindir}/csvtool
%files devel
%defattr(-,root,root,-)
%doc README
%if %opt
%{_libdir}/ocaml/csv/*.a
%{_libdir}/ocaml/csv/*.cmxa
%{_libdir}/ocaml/csv/*.cmx
%endif
%{_libdir}/ocaml/csv/*.mli
%changelog
* Fri Aug 24 2007 Richard W.M. Jones <rjones at redhat.com> - 1.1.6-3
- License clarified to LGPLv2+ (and fixed/clarified upstream).
- Added ExcludeArch ppc64
* Mon Jun 11 2007 Richard W.M. Jones <rjones at redhat.com> - 1.1.6-2
- Updated to latest packaging guidelines.
* Tue May 29 2007 Richard W.M. Jones <rjones at redhat.com> - 1.1.6-1
- Initial RPM release.
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-csv/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 24 Aug 2007 15:29:30 -0000 1.1
+++ .cvsignore 24 Aug 2007 16:35:15 -0000 1.2
@@ -0,0 +1 @@
+ocaml-csv-1.1.6.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-csv/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 24 Aug 2007 15:29:30 -0000 1.1
+++ sources 24 Aug 2007 16:35:15 -0000 1.2
@@ -0,0 +1 @@
+a91851438f9540b1a445087a4d409507 ocaml-csv-1.1.6.tar.gz
More information about the fedora-extras-commits
mailing list