[Pkg-ocaml-maint-commits] [SCM] freetennis packaging branch, master, updated. debian/0.4.8-5-8-gb4770a4

Mehdi Dogguy dogguy at pps.jussieu.fr
Tue Jun 23 12:25:48 UTC 2009


The following commit has been merged in the master branch:
commit c71b41720433dd882d47778c376fed60e8457bb0
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date:   Tue Jun 23 13:50:26 2009 +0200

    Modernize packaging

diff --git a/debian/Makefile b/debian/Makefile
index 26c1c97..4e3d2f6 100644
--- a/debian/Makefile
+++ b/debian/Makefile
@@ -4,7 +4,7 @@ CMXA = bigarray.cmxa sdl.cmxa lablgtk.cmxa lablgl.cmxa graphics.cmxa sdlmixer.cm
 CMA  = $(CMXA:.cmxa=.cma)
 
 OFLAGS = -I +camlimages -I +lablGL -I +lablgtk2 -I +sdl -w Aelzy
-BFLAGS = $(OFLAGS) -custom
+BFLAGS = $(OFLAGS)
 
 OCAMLC=ocamlc
 OCAMLOPT=ocamlopt
diff --git a/debian/control b/debian/control
index 42fad12..87efef5 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,19 @@ Section: games
 Priority: optional
 Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
 Uploaders: Mehdi Dogguy <dogguy at pps.jussieu.fr>
-Build-Depends: debhelper (>= 6), ocaml (>= 3.10.0), dpatch, libcamlimages-ocaml-dev, libsdl-ocaml-dev, libsdl-gfx1.2-dev, libsdl-mixer1.2-dev, libsdl-image1.2-dev, libsdl-ttf2.0-dev, liblablgl-ocaml-dev, liblablgtk2-ocaml-dev
-Standards-Version: 3.7.3
+Build-Depends:
+ debhelper (>= 7.0.52),
+ ocaml (>= 3.11.0),
+ quilt (>= 0.46-7),
+ libsdl-ocaml-dev,
+ libsdl-gfx1.2-dev,
+ libsdl-mixer1.2-dev,
+ libsdl-image1.2-dev,
+ libsdl-ttf2.0-dev,
+ liblablgl-ocaml-dev,
+ liblablgtk2-ocaml-dev
+Standards-Version: 3.8.2
+DM-Upload-Allowed: yes
 Vcs-Svn: svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/freetennis
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/freetennis.git
 Homepage: http://freetennis.sourceforge.net/
@@ -20,7 +31,7 @@ Description: Free Tennis - simulation game
 
 Package: freetennis
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, freetennis-common (= ${source:Version})
+Depends: ${FreetennisRuntime}, ${shlibs:Depends}, ${misc:Depends}, freetennis-common (= ${source:Version})
 Description: Free Tennis - simulation game
  Free Tennis is a free software tennis simulation game.  The game can be played
  against an A.I. or human-vs-human via LAN or internet.
diff --git a/debian/freetennis.manpages b/debian/freetennis.manpages
new file mode 100644
index 0000000..4d251c7
--- /dev/null
+++ b/debian/freetennis.manpages
@@ -0,0 +1 @@
+debian/freetennis.8
diff --git a/debian/patches/0001-Fix-sfx-path.patch b/debian/patches/0001-Fix-sfx-path.patch
new file mode 100644
index 0000000..175f32f
--- /dev/null
+++ b/debian/patches/0001-Fix-sfx-path.patch
@@ -0,0 +1,26 @@
+From: Mehdi Dogguy <dogguy at pps.jussieu.fr>
+Date: Tue, 23 Jun 2009 13:27:17 +0200
+Subject: [PATCH] Fix sfx path
+
+---
+ freetennis.ml |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/freetennis.ml b/freetennis.ml
+index cc3042e..75089fa 100644
+--- a/freetennis.ml
++++ b/freetennis.ml
+@@ -27,10 +27,10 @@
+    places. If you choose to customize them, use absolute paths without
+    the trailing slash. *)
+ 
+-let sfxDir = "sfx" (* where the wav files are located.
++let sfxDir = "/usr/share/sounds/freetennis-common/sfx" (* where the wav files are located.
+ 		      example of customization: /usr/share/freetennis/sounds *)
+ 
+-let gfxDir = "graphics" (* where the pngs and subdirs are located. 
++let gfxDir = "/usr/share/images/freetennis-common/graphics" (* where the pngs and subdirs are located.
+ 			   example of customization: /usr/share/freetennis/gfx *)
+     
+ 
+-- 
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index 2480ff0..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1 +0,0 @@
-01_sfx_path
diff --git a/debian/patches/01_sfx_path.dpatch b/debian/patches/01_sfx_path.dpatch
deleted file mode 100755
index 5dbedd5..0000000
--- a/debian/patches/01_sfx_path.dpatch
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_sfx_path.dpatch by  <dogguy at pps.jussieu.fr>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad trunk~/freetennis.ml trunk/freetennis.ml
---- trunk~/freetennis.ml	2005-11-21 22:20:33.000000000 +0100
-+++ trunk/freetennis.ml	2008-04-26 11:51:10.000000000 +0200
-@@ -27,11 +27,11 @@
-    places. If you choose to customize them, use absolute paths without
-    the trailing slash. *)
- 
--let sfxDir = "sfx" (* where the wav files are located.
--		      example of customization: /usr/share/freetennis/sounds *)
-+let sfxDir = "/usr/share/sounds/freetennis-common/sfx" 
-+(* where the wav files are located. example of customization: /usr/share/freetennis/sounds *)
- 
--let gfxDir = "graphics" (* where the pngs and subdirs are located. 
--			   example of customization: /usr/share/freetennis/gfx *)
-+let gfxDir = "/usr/share/images/freetennis-common/graphics" 
-+(* where the pngs and subdirs are located. example of customization: /usr/share/freetennis/gfx *)
-     
- 
- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9bf3fd3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-sfx-path.patch
diff --git a/debian/rules b/debian/rules
index 8dd5cd2..a76b242 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,73 +1,26 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
 
-include /usr/share/dpatch/dpatch.make
+include /usr/share/ocaml/ocamlvars.mk
+include /usr/share/ocaml/ocamlinit.mk
 
-OCAMLABI = $(shell ocamlc -version)
-BYTECODE = $(shell [ -x /usr/bin/ocamlopt ] || echo yes)
-OCAMLBEST = $(if $(BYTECODE),byte,opt)
-OCAMLRUN = $(if $(BYTECODE),ocaml-base-$(OCAMLABI))
+override_dh_auto_build:
+	$(MAKE) -f debian/Makefile freetennis.$(OCAML_BEST)
 
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	touch configure-stamp
+override_dh_auto_clean:
+	$(MAKE) -f debian/Makefile clean
 
-build: build-stamp
-
-build-stamp: patch configure-stamp 
-	dh_testdir
-	$(MAKE) -f debian/Makefile freetennis.$(OCAMLBEST)
-	touch $@
-
-clean: unpatch
-	dh_testdir
-	dh_testroot
-	rm -rf  *.cm[oixa] *.cmxa *.o *.a *~ freetennis.opt freetennis.byte
-	rm -f build-stamp configure-stamp
-	dh_clean 
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k 
-	dh_installdirs
+override_dh_auto_install:
 	install $(CURDIR)/freetennis $(CURDIR)/debian/freetennis/usr/games/freetennis
 	cp -r $(CURDIR)/sfx $(CURDIR)/debian/freetennis-common/usr/share/sounds/freetennis-common
 	cp -r $(CURDIR)/graphics $(CURDIR)/debian/freetennis-common/usr/share/images/freetennis-common
 	cp $(CURDIR)/debian/freetennis.desktop $(CURDIR)/debian/freetennis/usr/share/applications
 	cp $(CURDIR)/debian/freetennis.xpm $(CURDIR)/debian/freetennis/usr/share/pixmaps/
+ifeq ($(OCAML_OPT_ARCH),)
+	echo 'F:FreetennisRuntime=liblablgl-ocaml,liblablgtk2-ocaml,libsdl-ocaml,$(OCAML_RUNTIME)' >> debian/laby.substvars
+endif
 
-binary-indep: build install
-
-binary-arch: build install
-	dh_testdir 
-	dh_testroot 
-	dh_installchangelogs 
-	dh_installdocs 
-	dh_installexamples 
-	dh_desktop
-	dh_installman -p freetennis debian/freetennis.8
-	dh_link 
-	if [ -x /usr/bin/ocamlopt ]; then \
-		dh_strip;                 \
-	fi
-	dh_compress 
-	dh_fixperms 
-	dh_makeshlibs
-	dh_installdeb 
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums 
-	dh_builddeb 
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+%:
+	dh --with quilt $@

-- 
freetennis packaging



More information about the Pkg-ocaml-maint-commits mailing list