[Pkg-ocaml-maint-commits] [SCM] pycaml packaging branch, master, updated. debian/0.82-9-14-g7ca479c
Stephane Glondu
steph at glondu.net
Sun Jun 7 11:33:31 UTC 2009
The following commit has been merged in the master branch:
commit 2f36f6f042229c4efaaf8ddf5a533ff87e2cc0c0
Author: Stephane Glondu <steph at glondu.net>
Date: Sun Jun 7 12:33:34 2009 +0200
Modernize packaging
diff --git a/debian/Makefile b/debian/Makefile
index c2f2d0e..4ffea99 100644
--- a/debian/Makefile
+++ b/debian/Makefile
@@ -13,14 +13,17 @@ LIBDIRS = $(PY_PREFIX)/lib/python$(PY_VERSION)/config
INCDIRS = $(PY_PREFIX)/include/python$(PY_VERSION)
OCAMLLDFLAGS = -linkall
-allopt: native-code-library byte-code-library pycaml.customtop
+allopt: native-code-library byte-code-library pycamltop
-all: byte-code-library pycaml.customtop
+all: byte-code-library pycamltop
-pycaml.customtop: pycaml.cma pycamltop.cmo
- ocamlmktop -o pycaml.customtop pycaml.cma pycamltop.cmo
+pycamltop: pycaml.cma pycamltop.cmo
+ ocamlmktop -o $@ pycaml.cma pycamltop.cmo
pycamltop.ml:
echo 'Topdirs.dir_directory "+pycaml"' > $@
+clean::
+ rm -Rf pycamltop.ml pycamltop *.cm* *.o *.a ._d
+
-include $(OCAMLMAKEFILE)
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..f3c7a7c
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+Makefile
diff --git a/debian/control b/debian/control
index 7161cf9..18f410f 100644
--- a/debian/control
+++ b/debian/control
@@ -8,12 +8,12 @@ Uploaders:
Stephane Glondu <steph at glondu.net>
DM-Upload-Allowed: yes
Build-Depends:
- debhelper (>= 7),
- quilt,
- python-support (>= 0.3),
+ debhelper (>= 7.0.50),
+ quilt (>= 0.46-7),
+ python-support,
+ python-dev,
dh-ocaml,
ocaml-nox (>= 3.11),
- python-dev (>= 2.3),
ocamlmakefile
Standards-Version: 3.8.1
Homepage: http://pycaml.sourceforge.net/
@@ -22,7 +22,11 @@ Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/pycaml.git
Package: pycaml
Architecture: any
-Depends: ocaml-base-nox-${F:OCamlABI}, ocaml-interp, ${shlibs:Depends}
+Depends:
+ ocaml-base-nox-${F:OCamlABI},
+ ocaml-interp,
+ ${shlibs:Depends},
+ ${misc:Depends}
Recommends: ocaml-nox-${F:OCamlABI}
Description: OCaml bindings to embed Python interpreter and objects
Pycaml is intended to allow users to build native OCaml libraries and
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index e772481..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin
diff --git a/debian/docs b/debian/pycaml.docs
similarity index 100%
rename from debian/docs
rename to debian/pycaml.docs
diff --git a/debian/examples b/debian/pycaml.examples
similarity index 100%
rename from debian/examples
rename to debian/pycaml.examples
diff --git a/debian/pycaml.install.in b/debian/pycaml.install.in
new file mode 100644
index 0000000..6d4e225
--- /dev/null
+++ b/debian/pycaml.install.in
@@ -0,0 +1,4 @@
+ at OCamlStdlibDir@/pycaml/*.so @OCamlDllDir@
+ at OCamlStdlibDir@/pycaml/*.cm* @OCamlStdlibDir@/pycaml
+ at OCamlStdlibDir@/pycaml/*.a @OCamlStdlibDir@/pycaml
+pycamltop /usr/bin
diff --git a/debian/rules b/debian/rules
index 1d35115..9520df2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,112 +1,38 @@
#!/usr/bin/make -f
# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-include /usr/share/ocaml/ocamlvars.mk
include /usr/share/ocaml/ocamlinit.mk
include /usr/share/quilt/quilt.make
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DESTDIR := $(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)
+CFLAGS += -Wall
-DESTDIR = $(CURDIR)/debian/pycaml/$(OCAML_STDLIB_DIR)
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- INSTALL_PROGRAM += -s
-endif
-
-config.status: configure
- dh_testdir
-
- #CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
-
-build: ocamlinit build-stamp
-build-stamp: config.status $(QUILT_STAMPFN)
- dh_testdir
+%:
+ dh --with quilt $@
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure: ocamlinit
cp debian/Makefile .
+
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
ifneq ($(OCAML_OPT_ARCH),)
$(MAKE) allopt
else
$(MAKE) all
endif
- #$(MAKE) opt
-
- touch build-stamp
-
-clean: clean1 unpatch ocamlinit-clean
-clean1:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- [ ! -f Makefile ] || $(MAKE) clean
-#ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-# cp -f /usr/share/misc/config.sub config.sub
-#endif
-#ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-# cp -f /usr/share/misc/config.guess config.guess
-#endif
- dh_clean
- -rm -f *.cm* *.mli *.a *.o config.log *.opt *.so pycaml.customtop Makefile config.status
- -rm -rf ./._d
- -rm -f config.cache
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean: ocamlinit-clean
+ $(MAKE) -f debian/Makefile clean
-install: build
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
+ $(MAKE) rawinstall OCAML_LIB_INSTALL=$(DESTDIR)/pycaml
- mkdir -p $(DESTDIR)
- mkdir -p $(DESTDIR)/stublibs
- #cp pycaml.{a,cma,cmi,cmx,cmxa} pycaml_ml.o pycaml_ml.opt.o \
- # debian/pycaml/usr/lib/ocaml/3.07
- #cp pycamltop debian/pycaml/usr/bin
- make rawinstall OCAML_LIB_INSTALL=$(DESTDIR)/pycaml
- mv $(DESTDIR)/pycaml/dllpycaml_stubs.so $(DESTDIR)/stublibs
- cp pycaml.customtop debian/pycaml/usr/bin/pycamltop
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install
- dh_installman
- dh_link
- # MUST NOT strip the -custom executables!
- dh_strip -Xpycamltop
- #strip debian/pycaml/usr/bin/*.opt
- dh_compress
- dh_fixperms
- dh_pysupport
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
+.PHONY: override_dh_gencontrol
+override_dh_gencontrol:
dh_gencontrol -- -VF:OCamlABI="$(OCAML_ABI)"
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install ocamlinit patch unpatch clean1
--
pycaml packaging
More information about the Pkg-ocaml-maint-commits
mailing list