[modello] 19/32: Refactor the build process.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Jul 9 10:49:22 UTC 2015


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

ebourg-guest pushed a commit to branch modello-1.1
in repository modello.

commit 337799cd562fdd1422ddf995e38a68cda6156e96
Author: Torsten Werner <twerner at debian.org>
Date:   Sat Nov 29 12:41:43 2008 +0000

    Refactor the build process.
---
 debian/build.xml | 45 +++++++++++++++++++++++++++++----------------
 debian/changelog |  3 ++-
 debian/rules     | 18 ++++++++++--------
 3 files changed, 41 insertions(+), 25 deletions(-)

diff --git a/debian/build.xml b/debian/build.xml
index e300c41..fb89c68 100644
--- a/debian/build.xml
+++ b/debian/build.xml
@@ -6,27 +6,40 @@
     <property name="maven.test.skip" value="true"/>
     <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
  
+    <macrodef name="cleanmodule">
+	<attribute name="dir"/>
+	    <sequential>
+		<ant target="clean"
+		    antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="@{dir}"/>
+	    </sequential>
+    </macrodef>
+
+    <macrodef name="packagemodule">
+	<attribute name="dir"/>
+	<attribute name="artifactId"/>
+	    <sequential>
+		<ant target="package"
+		    antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="@{dir}">
+		    <property name="artifactId" value="@{artifactId}"/>
+		</ant>
+	    </sequential>
+    </macrodef>
+
     <target name="clean">
         <delete dir="build"/>
-        <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-test"/>
-        <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-core"/>
-        <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xml"/>
-        <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xpp3"/>
+	<cleanmodule dir="modello-test"/>
+	<cleanmodule dir="modello-core"/>
+	<cleanmodule dir="modello-plugins/modello-plugin-xml"/>
+	<cleanmodule dir="modello-plugins/modello-plugin-xpp3"/>
     </target>
 
     <target name="package">
-        <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-test">
-            <property name="artifactId" value="modello-test"/>
-        </ant>
-        <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-core">
-            <property name="artifactId" value="modello-core"/>
-        </ant>
-        <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xml">
-            <property name="artifactId" value="modello-plugin-xml"/>
-        </ant>
-        <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xpp3">
-            <property name="artifactId" value="modello-plugin-xpp3"/>
-        </ant>
+	<packagemodule dir="modello-test" artifactId="modello-test"/>
+	<packagemodule dir="modello-core" artifactId="modello-core"/>
+	<packagemodule dir="modello-plugins/modello-plugin-xml"
+	  artifactId="modello-plugin-xml"/>
+	<packagemodule dir="modello-plugins/modello-plugin-xpp3"
+	  artifactId="modello-plugin-xpp3"/>
     </target>
 
     <target name="javadoc">
diff --git a/debian/changelog b/debian/changelog
index e7178dc..8abcdde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@ modello (1.0-alpha-21-1) experimental; urgency=low
   * Add Vcs-* and Homepage header.
   * Bump up Standards-Version: 3.8.0.
   * Build modello-test and more javadoc.
+  * Refactor the build process.
 
- -- Torsten Werner <twerner at debian.org>  Sat, 29 Nov 2008 13:06:03 +0100
+ -- Torsten Werner <twerner at debian.org>  Sat, 29 Nov 2008 13:40:56 +0100
 
 modello (1.0-alpha-8-1) unstable; urgency=low
 
diff --git a/debian/rules b/debian/rules
index a9764c7..24d7f6d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,19 +13,21 @@ DEB_ANT_BUILD_TARGET := package javadoc
 DEB_ANT_BUILDFILE    := ./debian/build.xml
 DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
 API_DOCS             := build/api
+BASE_MODULES         := core test
+PLUGINS              := xml xpp3
 
 get-orig-source:
 	uscan --force-download
 
 binary-post-install/lib$(PACKAGE)-java::
-	dh_install -plib$(PACKAGE)-java modello-core/build/$(PACKAGE)-core-$(VERSION).jar usr/share/java
-	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-core-$(VERSION).jar usr/share/java/$(PACKAGE)-core.jar
-	dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-xml/build/$(PACKAGE)-plugin-xml-$(VERSION).jar usr/share/java
-	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-xml-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-xml.jar
-	dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-xpp3/build/$(PACKAGE)-plugin-xpp3-$(VERSION).jar usr/share/java
-	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-xpp3-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-xpp3.jar
-	dh_install -plib$(PACKAGE)-java modello-test/build/$(PACKAGE)-test-$(VERSION).jar usr/share/java
-	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-test-$(VERSION).jar usr/share/java/$(PACKAGE)-test.jar
+	for MODULE in $(BASE_MODULES); do \
+	  dh_install -plib$(PACKAGE)-java modello-$$MODULE/build/$(PACKAGE)-$$MODULE-$(VERSION).jar usr/share/java; \
+	  dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-$$MODULE-$(VERSION).jar usr/share/java/$(PACKAGE)-$$MODULE.jar; \
+	done
+	for MODULE in $(PLUGINS); do \
+	  dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-$$MODULE/build/$(PACKAGE)-plugin-$$MODULE-$(VERSION).jar usr/share/java; \
+	  dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-$$MODULE-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-$$MODULE.jar; \
+	done
 
 binary-post-install/lib$(PACKAGE)-java-doc::
 	dh_install -plib$(PACKAGE)-java-doc build/api usr/share/doc/lib$(PACKAGE)-java

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



More information about the pkg-java-commits mailing list