[Pkg-ocaml-maint-commits] [SCM] ocaml-csv packaging branch, master, updated. debian/1.1.6-3-13-ge5a8012
Stephane Glondu
steph at glondu.net
Tue Mar 3 23:14:06 UTC 2009
The following commit has been merged in the master branch:
commit 419f4bf68181a04003b990d0defb084472138961
Author: Stephane Glondu <steph at glondu.net>
Date: Tue Mar 3 22:07:08 2009 +0100
Use debhelper 7 and dh-ocaml
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..c194c36
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,5 @@
+csvtool.byte
+csvtool.opt
+debian/csvtool.1
+test
+.depend
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..7f8f011 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+7
diff --git a/debian/control b/debian/control
index 2b9331f..ab24c03 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,8 @@ Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
Uploaders: Stephane Glondu <steph at glondu.net>
DM-Upload-Allowed: yes
Build-Depends:
- debhelper (>= 5),
+ debhelper (>= 7),
+ dh-ocaml,
quilt,
ocaml-nox,
ocaml-findlib,
@@ -22,7 +23,8 @@ Section: libdevel
Architecture: any
Depends:
ocaml-nox-${F:OCamlABI},
- libextlib-ocaml-dev
+ libextlib-ocaml-dev,
+ ${misc:Depends}
Recommends: ocaml-findlib
Suggests: csvtool
Description: A library to read and write CSV files in OCaml
@@ -36,7 +38,7 @@ Description: A library to read and write CSV files in OCaml
Package: csvtool
Section: utils
Architecture: any
-Depends: ${shlibs:Depends}, ${F:OCamlRun}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${F:OCamlRun}
Description: A handy command line tool for handling CSV files
OCaml CSV is a library to read and write CSV (comma-separated values)
files. It also supports all extensions used by Excel - eg. quotes,
diff --git a/debian/csvtool.manpages b/debian/csvtool.manpages
new file mode 100644
index 0000000..2138313
--- /dev/null
+++ b/debian/csvtool.manpages
@@ -0,0 +1 @@
+debian/csvtool.1
diff --git a/debian/libcsv-ocaml-dev.dirs.in b/debian/libcsv-ocaml-dev.dirs.in
index 614f9eb..93da81a 100644
--- a/debian/libcsv-ocaml-dev.dirs.in
+++ b/debian/libcsv-ocaml-dev.dirs.in
@@ -1,3 +1,3 @@
-usr/lib/ocaml/@OCamlABI@/csv
+ at OCamlStdlibDir@/csv
usr/share/doc/libcsv-ocaml-dev/html
usr/share/doc/libcsv-ocaml-dev/examples
diff --git a/debian/libcsv-ocaml-dev.install.in b/debian/libcsv-ocaml-dev.install.in
index f550475..149c63b 100644
--- a/debian/libcsv-ocaml-dev.install.in
+++ b/debian/libcsv-ocaml-dev.install.in
@@ -1,3 +1,3 @@
-usr/lib/ocaml/@OCamlABI@/csv/*
-usr/share/doc/libcsv-ocaml-dev/html/*
-usr/share/doc/libcsv-ocaml-dev/examples/*
+ at OCamlStdlibDir@/csv/*
+html/* usr/share/doc/libcsv-ocaml-dev/html
+example* usr/share/doc/libcsv-ocaml-dev/examples
diff --git a/debian/rules b/debian/rules
index 8bd9c44..f741643 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,18 +9,14 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+include /usr/share/ocaml/ocamlinit.mk
include /usr/share/quilt/quilt.make
-include /usr/share/topgit/tg2quilt.mk
-OCAMLABI := $(shell ocamlc -version)
-BYTECODE := $(shell [ -x /usr/bin/ocamlopt ] || echo yes)
-OCAMLRUN := $(if $(BYTECODE),ocaml-base-nox-$(OCAMLABI))
-OPTTARGET := $(if $(BYTECODE),,opt)
+export OCAMLFIND_DESTDIR := $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)
-OFILES := $(patsubst %.in,%,$(wildcard debian/*.in))
-
-ocamlinit:
- for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
+OCAML_RUN := $(if $(OCAML_OPT_ARCH),ocaml-base-nox-$(OCAML_ABI))
+OPTTARGET := $(if $(OCAML_OPT_ARCH),opt)
DB2MAN := /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
XP := xsltproc -''-nonet
@@ -28,57 +24,35 @@ XP := xsltproc -''-nonet
debian/csvtool.1: debian/csvtool.dbk
$(XP) -o $@ $(DB2MAN) $<
-configure: configure-stamp
-configure-stamp: patch
- dh_testdir
- touch configure-stamp
-
-
-build: ocamlinit debian/csvtool.1 build-stamp
-build-stamp: configure-stamp
- dh_testdir
+build: debian/csvtool.1 build-stamp
+build-stamp: ocamlinit patch
+ dh build --before dh_auto_build
+ $(MAKE) depend
$(MAKE) OCAMLCINCS="-package extlib" OCAMLCLIBS="-linkpkg" OCAMLOPTLIBS="-linkpkg" byte $(OPTTARGET) doc
+ $(MAKE) OCAMLCINCS="-package extlib" OCAMLCLIBS="-linkpkg" OCAMLOPTLIBS="-linkpkg" test
+ dh build --after dh_auto_test
touch $@
-clean: unpatch
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
- $(MAKE) clean
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
- $(MAKE) DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr install
- mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/libcsv-ocaml-dev/html
- mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/libcsv-ocaml-dev/examples
- cp $(CURDIR)/html/* $(CURDIR)/debian/tmp/usr/share/doc/libcsv-ocaml-dev/html
- cp $(CURDIR)/example* $(CURDIR)/debian/tmp/usr/share/doc/libcsv-ocaml-dev/examples
-
-binary-indep: build install
-
-binary-arch: build links install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install --sourcedir=debian/tmp
- dh_installman -pcsvtool debian/csvtool.1
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)" -VF:OCamlRun="$(OCAMLRUN)"
- dh_md5sums
- dh_builddeb
+clean: unpatch ocamlinit-clean
+ dh $@
+ rm -Rf html
+
+install: install-stamp
+install-stamp: build-stamp
+ dh install --before dh_auto_install
+ mkdir -p $(OCAMLFIND_DESTDIR)
+ mkdir -p $(CURDIR)/debian/tmp/usr/bin
+ $(MAKE) install
+ cp csvtool.$(OCAML_BEST) $(CURDIR)/debian/tmp/usr/bin/csvtool
+ dh install --after dh_auto_install
+
+binary-indep:
+ # No binary-indep packages
+
+binary-arch: install-stamp
+ echo 'F:OCamlABI=$(OCAML_ABI)' >> debian/libcsv-ocaml-dev.substvars
+ echo 'F:OCamlRun=$(OCAML_RUN)' >> debian/csvtool.substvars
+ dh $@
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure ocamlinit patch unpatch links
--
ocaml-csv packaging
More information about the Pkg-ocaml-maint-commits
mailing list