[freecol] 39/125: [freecol] Several further packaging improvements. Does not build now, but nearly ; -)...

Markus Koschany apo-guest at moszumanska.debian.org
Sun Dec 20 19:39:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository freecol.

commit f6026f7a540aeb217c6564de58d7166cdc47b71d
Author: Vincent Fourmond <fourmond at debian.org>
Date:   Tue Feb 24 16:43:59 2009 +0000

    [freecol] Several further packaging improvements. Does not build now, but nearly ;-)...
---
 debian/changelog                            |  10 +-
 debian/control                              |   2 +-
 debian/patches/00list                       |   4 -
 debian/patches/10-fix-jar-path.dpatch       |  17 ++--
 debian/patches/15-fix-jar-manifest.dpatch   |  18 ----
 debian/patches/20-freecol-executable.dpatch |  33 -------
 debian/patches/25-change-save-dir.dpatch    |  27 ------
 debian/patches/30-language-option.dpatch    |  39 --------
 debian/rules                                | 145 ++++++++++++++++------------
 9 files changed, 104 insertions(+), 191 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index edc27f9..1a1a408 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,8 +10,14 @@ freecol (0.8.1.dfsg-1) UNRELEASED; urgency=low
   * Added a debian/README.source to mention the use of a patch system, 
     which makes it now comply to standards 3.8.0
   * Adding ${misc:Depends} for potential debhelper-induced dependencies
-
- -- Vincent Fourmond <fourmond at debian.org>  Tue, 24 Feb 2009 00:52:17 +0100
+  * Refreshed debian/patches/10-fix-jar-path.dpatch
+  * Dropped debian/patches/25-change-save-dir.dpatch, superseded by
+    upstream modifications
+  * Remove unapplied patches
+  * Switch to using cdbs for building
+  * New build-depends: ant-optional (for the Native2Ascii stuff)
+
+ -- Vincent Fourmond <fourmond at debian.org>  Tue, 24 Feb 2009 17:42:51 +0100
 
 freecol (0.7.4.dfsg+1-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 329d637..6b6194f 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
 Uploaders: Vincent Fourmond <fourmond at debian.org>
 Build-Depends: debhelper (>= 5), dpatch, 
- ant,  openjdk-6-jdk
+ ant, ant-optional, openjdk-6-jdk, cdbs
 Build-Depends-Indep: libhiglayout-java, libwoodstox-java,
   tex4ht, texlive-base-bin, ant-optional, texlive-latex-recommended
 Standards-Version: 3.8.0
diff --git a/debian/patches/00list b/debian/patches/00list
index 425e3c5..fbf8133 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,6 +1,2 @@
 10-fix-jar-path
-# 15-fix-jar-manifest
-# 20-freecol-executable
-25-change-save-dir
-# 30-language-option
 40-manpage
\ No newline at end of file
diff --git a/debian/patches/10-fix-jar-path.dpatch b/debian/patches/10-fix-jar-path.dpatch
index 9d2a2bc..8572c47 100755
--- a/debian/patches/10-fix-jar-path.dpatch
+++ b/debian/patches/10-fix-jar-path.dpatch
@@ -6,19 +6,22 @@
 ## DP: packages 
 
 @DPATCH@
-diff -urNad freecol-0.7.3~/build.xml freecol-0.7.3/build.xml
---- freecol-0.7.3~/build.xml	2008-02-29 20:50:14.000000000 +0100
-+++ freecol-0.7.3/build.xml	2008-02-29 21:04:02.000000000 +0100
-@@ -65,7 +65,7 @@
+diff -urNad freecol-0.8.1.dfsg~/build.xml freecol-0.8.1.dfsg/build.xml
+--- freecol-0.8.1.dfsg~/build.xml	2009-02-24 00:33:22.000000000 +0100
++++ freecol-0.8.1.dfsg/build.xml	2009-02-24 17:15:53.000000000 +0100
+@@ -83,9 +83,10 @@
+     <!-- Compiles the java source files. -->
+     <target name="compile" depends="init">
          <mkdir dir="${freecol.build.dir}"/>
++	<!-- Classpath is provided by debian/rules, so commenting this -->
++	<!--             classpathref="freecol.build.classpath" -->
          <javac srcdir="${freecol.src.dir}"
              destdir="${freecol.build.dir}"
--            classpath="${basedir}/jars/higlayout.jar:${basedir}/jars/jsr173_1.0_api.jar:${basedir}/jars/wstx-lgpl-4.0pr1.jar"
-+            classpath="/usr/share/java/higlayout.jar:/usr/share/java/wstx-lgpl.jar"
+-            classpathref="freecol.build.classpath"
              debug="on"
              optimize="on"
              deprecation="off"
-@@ -125,7 +125,7 @@
+@@ -144,7 +145,7 @@
  
      <!-- Compiles the source files and creates a JAR-file. -->
      <target name="package" depends="init,build,manifest" description="Compiles the source files and creates a JAR-file.">
diff --git a/debian/patches/15-fix-jar-manifest.dpatch b/debian/patches/15-fix-jar-manifest.dpatch
deleted file mode 100755
index 2d31801..0000000
--- a/debian/patches/15-fix-jar-manifest.dpatch
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 15-fix-jar-manifest.dpatch by  <fourmond at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad freecol-0.7.3~/src/MANIFEST.MF freecol-0.7.3/src/MANIFEST.MF
---- freecol-0.7.3~/src/MANIFEST.MF	2008-02-29 20:50:14.000000000 +0100
-+++ freecol-0.7.3/src/MANIFEST.MF	2008-02-29 21:20:10.000000000 +0100
-@@ -3,6 +3,5 @@
- Created-By: FreeCol Team
- Main-Class: net.sf.freecol.FreeCol
- Revision: ${svn.Revision}
--Class-Path: jars/higlayout.jar jars/jsr173_1.0_api.jar jars/wstx-lgpl-
-- 4.0pr1.jar
-+Class-Path: /usr/share/java/higlayout.jar /usr/share/java/wstx-lgpl.jar
- 
diff --git a/debian/patches/20-freecol-executable.dpatch b/debian/patches/20-freecol-executable.dpatch
deleted file mode 100755
index f487860..0000000
--- a/debian/patches/20-freecol-executable.dpatch
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20-freecol-executable.dpatch by  <fourmond at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad freecol-0.7.2~/src/freecol freecol-0.7.2/src/freecol
---- freecol-0.7.2~/src/freecol	1970-01-01 01:00:00.000000000 +0100
-+++ freecol-0.7.2/src/freecol	2007-11-26 20:47:51.000000000 +0100
-@@ -0,0 +1,22 @@
-+#!/bin/sh
-+
-+# Script 'greatly inspired' from the one of jabref
-+
-+# Unless there already is a JAVA_HOME, we use java6
-+
-+if [ -z "$JAVA_HOME" ]
-+then
-+# t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
-+JAVA_HOME=/usr/lib/jvm/java-6-sun 
-+JAVA=${JAVA_HOME}/jre/bin/java
-+fi
-+
-+# We test if LC_MESSAGES is different from LC_CTYPE, if that is the case,
-+# 
-+if [ "$LC_CTYPE" != "$LC_MESSAGES" -a "$LC_MESSAGES" ]; then
-+    lang_argument="--default-locale=$LC_MESSAGES"
-+fi
-+
-+export JAVA=${JAVA:=java}
-+exec $JAVA -Xmx128M -jar /usr/share/java/freecol.jar --freecol-data \
-+    /usr/share/games/freecol $lang_argument "$@"
diff --git a/debian/patches/25-change-save-dir.dpatch b/debian/patches/25-change-save-dir.dpatch
deleted file mode 100755
index a13f62b..0000000
--- a/debian/patches/25-change-save-dir.dpatch
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 25-change-save-dir.dpatch by  <fourmond at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change the directory for saved games
-
- at DPATCH@
-diff -urNad freecol-0.7.3~/src/net/sf/freecol/FreeCol.java freecol-0.7.3/src/net/sf/freecol/FreeCol.java
---- freecol-0.7.3~/src/net/sf/freecol/FreeCol.java	2008-02-29 20:50:14.000000000 +0100
-+++ freecol-0.7.3/src/net/sf/freecol/FreeCol.java	2008-02-29 21:08:39.000000000 +0100
-@@ -418,14 +418,14 @@
-      * Creates a freecol dir for the current user.
-      * 
-      * The directory is created within the current user's
--     * home directory. This directory will be called "freecol"
-+     * home directory. This directory will be called ".freecol"
-      * and underneath that directory a "save" directory will
-      * be created.
-      */
-     private static void createAndSetDirectories() {
-         // TODO: The location of the save directory should be determined by the installer.;
-         
--        File mainUserDirectory = new File(System.getProperty("user.home"), "freecol");
-+        File mainUserDirectory = new File(System.getProperty("user.home"), ".freecol");
-         if (mainUserDirectory.exists() && mainUserDirectory.isFile()) {
-             logger.warning("Could not create .freecol under "
-                     + System.getProperty("user.home") + " because there "
diff --git a/debian/patches/30-language-option.dpatch b/debian/patches/30-language-option.dpatch
deleted file mode 100755
index d864835..0000000
--- a/debian/patches/30-language-option.dpatch
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30-language-option.dpatch by  <fourmond at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad freecol-0.7.2~/src/net/sf/freecol/FreeCol.java freecol-0.7.2/src/net/sf/freecol/FreeCol.java
---- freecol-0.7.2~/src/net/sf/freecol/FreeCol.java	2007-11-26 20:24:01.000000000 +0100
-+++ freecol-0.7.2/src/net/sf/freecol/FreeCol.java	2007-11-26 20:24:01.000000000 +0100
-@@ -521,6 +521,19 @@
-                 }
-                 
-                 windowed = true;
-+            } else if (args[i].length() > 16 && args[i].substring(0, 16).equals("--default-locale")) {
-+                if (args[i].charAt(16) == '=') {
-+                    // slightly ugly: strip encoding from LC_MESSAGES
-+                    String languageID = args[i].substring(17);
-+                    int index = languageID.indexOf('.');
-+                    if (index > 0) {
-+                        languageID = languageID.substring(0, index);
-+                    }
-+                    Locale.setDefault(LanguageOption.getLocale(languageID));
-+                } else {
-+                    printUsage();
-+                    System.exit(0);
-+                }
-             } else if (args[i].equals("--no-sound")) {
-                 sound = false;
-             } else if (args[i].equals("--no-memory-check")) {
-@@ -655,6 +668,8 @@
-         System.out.println("  runs FreeCol in windowed mode instead of full screen mode");
-         System.out.println("--load-savegame SAVEGAME_FILE");
-         System.out.println("  loads the given savegame.");
-+        System.out.println("--default-locale=LANGUAGE[_COUNTRY[_VARIANT]]");
-+        System.out.println("  sets the default locale.");
-         System.out.println("--splash[=SPLASH_IMAGE_FILE]");
-         System.out.println("  displays a splash screen while loading the game");
-         System.out.println("--no-sound");
diff --git a/debian/rules b/debian/rules
index 256efe3..00c0e24 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,65 +1,90 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# This file is public domain software, originally written by Joey Hess. 
+
+# debian/rules file for building freecol
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-include /usr/share/dpatch/dpatch.make
-
-SOURCE_VERSION = $(shell dpkg-parsechangelog | egrep '^Version' | egrep -o '[0-9][^-]+' | head -n 1)
-JAVA_HOME = $(or $(shell [ -x /usr/lib/jvm/java-6-sun/lib ] && echo "/usr/lib/jvm/java-6-sun"), $(shell [ -x /usr/lib/jvm/java-6-openjdk/lib ] && echo "/usr/lib/jvm/java-6-openjdk"), /usr/lib/jvm/java-7-icedtea)
-ANT = JAVA_HOME=$(JAVA_HOME) TEX4HTENV=/etc/tex4ht/tex4ht.env ant
-
-build: build-stamp
-build-stamp: patch doc-saved
-	dh_testdir
-	$(ANT) package
-# Then according to current Java policy, we move the freecol.jar file
-# to a versioned one.
-	[ -e freecol-$(SOURCE_VERSION).jar ] || mv freecol.jar freecol-$(SOURCE_VERSION).jar
-	[ -e freecol.jar ] || ln -s freecol-$(SOURCE_VERSION).jar freecol.jar
-# Then, we make the manual:
-	$(ANT) online-manual
-	rm -f doc/FreeCol.aux 
-	$(ANT) print-manual
-
-	touch build-stamp
-
-clean: clean-patched unpatch
-clean-patched:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp freecol*.jar
-	$(ANT) clean
-# We now move the doc-saved/ directory back to doc/, if it exists.
-	-[ -d doc-saved ] && ( rm -Rf doc ; mv doc-saved doc )
-	dh_clean
-
-doc-saved:
-	[ -d doc-saved ] || cp -a doc doc-saved
-
-# Build architecture-independent files here.
-binary-indep: build
-# We have nothing to do by default.
-	dh_testdir
-	dh_testroot
-	dh_install
-	dh_installchangelogs
-	dh_installdocs
-	dh_installman
-	dh_installmenu
-	dh_link
-	dh_compress
-	dh_fixperms
-	dh_perl -d -V
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-# Build architecture-dependent files here.
-binary-arch: 
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+VERSION = $(shell dpkg-parsechangelog | egrep '^Version' | \
+	sed -r 's/Version:\s*//' | sed -r 's/^[0-9]+://' | \
+	sed -r 's/(\.dfsg)?-[0-9.]+//')
+
+# export JITC_PROCESSOR_TYPE=6
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+
+JAVA_HOME_DIRS       := /usr/lib/jvm/java-6-openjdk
+ANT_HOME             := /usr/share/ant
+DEB_JARS             := ant-launcher ant-nodeps \
+	higlayout wstx-lgpl
+DEB_ANT_COMPILER     := modern
+DEB_ANT_BUILD_TARGET := package online-manual print-manual
+DEB_BUILDDIR         := .
+DEB_ANT_BUILDFILE    := build.xml
+DEB_ANT_CLEAN_TARGET := clean
+
+target_jar_dir= debian/freecol/usr/share/java/
+
+print-version:
+	echo $(VERSION)
+
+install/freecol::
+	install -m 644 freecol.jar $(target_jar_dir)/freecol-$(VERSION).jar
+	ln -s freecol-$(VERSION).jar $(target_jar_dir)/freecol.jar
+	install -m 755 -t debian/freecol/usr/bin debian/wrappers/freecol
+
+
+# build: build-stamp
+# build-stamp: patch doc-saved
+# 	dh_testdir
+# 	$(ANT) package
+# # Then according to current Java policy, we move the freecol.jar file
+# # to a versioned one.
+# 	[ -e freecol-$(SOURCE_VERSION).jar ] || mv freecol.jar freecol-$(SOURCE_VERSION).jar
+# 	[ -e freecol.jar ] || ln -s freecol-$(SOURCE_VERSION).jar freecol.jar
+# # Then, we make the manual:
+# 	$(ANT) online-manual
+# 	rm -f doc/FreeCol.aux 
+# 	$(ANT) print-manual
+
+# 	touch build-stamp
+
+# clean: clean-patched unpatch
+# clean-patched:
+# 	dh_testdir
+# 	dh_testroot
+# 	rm -f build-stamp freecol*.jar
+# 	$(ANT) clean
+# # We now move the doc-saved/ directory back to doc/, if it exists.
+# 	-[ -d doc-saved ] && ( rm -Rf doc ; mv doc-saved doc )
+# 	dh_clean
+
+# doc-saved:
+# 	[ -d doc-saved ] || cp -a doc doc-saved
+
+# # Build architecture-independent files here.
+# binary-indep: build
+# # We have nothing to do by default.
+# 	dh_testdir
+# 	dh_testroot
+# 	dh_install
+# 	dh_installchangelogs
+# 	dh_installdocs
+# 	dh_installman
+# 	dh_installmenu
+# 	dh_link
+# 	dh_compress
+# 	dh_fixperms
+# 	dh_perl -d -V
+# 	dh_installdeb
+# 	dh_gencontrol
+# 	dh_md5sums
+# 	dh_builddeb
+
+# # Build architecture-dependent files here.
+# binary-arch: 
+
+# binary: binary-indep binary-arch
+# .PHONY: build clean binary-indep binary-arch binary install

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/freecol.git



More information about the Pkg-games-commits mailing list