[pkg-java] r7651 - in trunk/maven-debian-helper: cdbs debian

twerner at alioth.debian.org twerner at alioth.debian.org
Fri Dec 12 09:43:17 UTC 2008


Author: twerner
Date: 2008-12-12 09:43:17 +0000 (Fri, 12 Dec 2008)
New Revision: 7651

Modified:
   trunk/maven-debian-helper/cdbs/maven-vars.mk
   trunk/maven-debian-helper/cdbs/maven.mk
   trunk/maven-debian-helper/debian/rules
Log:
implement auto.properties


Modified: trunk/maven-debian-helper/cdbs/maven-vars.mk
===================================================================
--- trunk/maven-debian-helper/cdbs/maven-vars.mk	2008-12-12 08:23:28 UTC (rev 7650)
+++ trunk/maven-debian-helper/cdbs/maven-vars.mk	2008-12-12 09:43:17 UTC (rev 7651)
@@ -64,14 +64,11 @@
 # the property file.
 DEB_MAVEN_PROPERTYFILE = $(shell test -f $(CURDIR)/debian/maven.properties && echo $(CURDIR)/debian/maven.properties)
 
-DEB_MAVEN_EXTRAPROPS = $(shell test -n "$(DEB_MAVEN_PROPERTYFILE)" && echo -Dproperties.file.manual=$(DEB_MAVEN_PROPERTYFILE))
-#DEB_MAVEN_EXTRAPROPS = -Dproperties.file.auto=$(CURDIR)/debian/auto.properties
-
 # You can specify additional JVM arguments in MAVEN_OPTS and Maven
 # command-line arguments in MAVEN_ARGS. You can additionally define
 # MAVEN_ARGS_<package> for each individual package.
 DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -classpath $(DEB_CLASSPATH) \
-		 $(MAVEN_OPTS) -Dclassworlds.conf=/etc/maven2/m2-debian.conf \
+		 $(MAVEN_EXTRA_OPTS) -Dclassworlds.conf=/etc/maven2/m2-debian.conf \
 		 -Dmaven.home=$(MAVEN_HOME) $(DEB_MAVEN_EXTRAPROPS) \
 		 org.codehaus.classworlds.Launcher $(DEB_MAVEN_ARGS) \
 		 -s/etc/maven2/settings-debian.xml \

Modified: trunk/maven-debian-helper/cdbs/maven.mk
===================================================================
--- trunk/maven-debian-helper/cdbs/maven.mk	2008-12-12 08:23:28 UTC (rev 7650)
+++ trunk/maven-debian-helper/cdbs/maven.mk	2008-12-12 09:43:17 UTC (rev 7651)
@@ -1,5 +1,4 @@
 # This file is based on ant.mk
-# revision: 2
 
 # Copyright © 2003 Stefan Gybas <sgybas at debian.org>
 # Copyright © 2008 Torsten Werner <twerner at debian.org>
@@ -30,8 +29,12 @@
 include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
 include $(_cdbs_class_path)/maven-vars.mk$(_cdbs_makefile_suffix)
 
-DEB_REPO := /usr/share/maven-repo
+DEB_MAVEN_REPO := /usr/share/maven-repo
 
+MAVEN_EXTRA_OPTS = \
+  $(shell test -n "$(DEB_MAVEN_PROPERTYFILE)" && echo -Dproperties.file.manual=$(DEB_MAVEN_PROPERTYFILE)) \
+  -Dproperties.file.auto=$(CURDIR)/debian/auto.properties
+
 DEB_PHONY_RULES += maven-sanity-check
 
 maven-sanity-check:
@@ -44,15 +47,20 @@
 		exit 1; \
 	fi
 
+debian/auto.properties:
+	find $(DEB_MAVEN_REPO) -name '*.pom' | \
+	  sed -e's,^$(DEB_MAVEN_REPO)/,,' \
+	      -e's,/\([0-9][^/]*\).*,.version = \1,' \
+	      -e's,/,.,g'                            > $@
 
 common-build-arch common-build-indep:: debian/stamp-maven-build maven-sanity-check
-debian/stamp-maven-build:
+debian/stamp-maven-build: debian/auto.properties
 	$(DEB_MAVEN_INVOKE) $(DEB_MAVEN_BUILD_TARGET)
 	touch $@
 
-cleanbuilddir:: maven-sanity-check apply-patches
+cleanbuilddir:: maven-sanity-check apply-patches debian/auto.properties
 	-$(DEB_MAVEN_INVOKE) $(DEB_MAVEN_CLEAN_TARGET)
-	$(RM) debian/stamp-maven-build
+	$(RM) debian/auto.properties debian/stamp-maven-build
 
 common-install-arch common-install-indep:: common-install-impl
 common-install-impl::

Modified: trunk/maven-debian-helper/debian/rules
===================================================================
--- trunk/maven-debian-helper/debian/rules	2008-12-12 08:23:28 UTC (rev 7650)
+++ trunk/maven-debian-helper/debian/rules	2008-12-12 09:43:17 UTC (rev 7651)
@@ -7,7 +7,7 @@
 VERSION   := $(DEB_UPSTREAM_VERSION)
 JAVA_HOME := /usr/lib/jvm/java-6-openjdk
 
-DEST := $(DEB_REPO)/org/debian/maven/$(PACKAGE)/$(VERSION)
+DEST := $(DEB_MAVEN_REPO)/org/debian/maven/$(PACKAGE)/$(VERSION)
 
 binary-post-install/$(PACKAGE)::
 	dh_install target/*.jar $(DEST)/




More information about the pkg-java-commits mailing list