[libbluray-devel] Add type and version to .jar file name

hpi1 git at videolan.org
Tue Jan 14 13:39:26 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Jan 14 13:54:27 2014 +0200| [913ad743236df1a141ee84010ac4d3fdf8046255] | committer: hpi1

Add type and version to .jar file name

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=913ad743236df1a141ee84010ac4d3fdf8046255
---

 src/Makefile.am             |    8 +++++---
 src/libbluray/bdj/build.xml |    5 +++--
 src/libbluray/bdj/common.h  |    8 +++++++-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 5634952..dcbee4a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -128,9 +128,9 @@ pkginclude_HEADERS = \
 
 if USING_BDJAVA
 jardir=$(datadir)/java/
-jar_DATA=$(top_builddir)/src/.libs/libbluray.jar
+jar_DATA=$(top_builddir)/src/.libs/libbluray-$(BDJ_TYPE)-$(VERSION).jar
 
-$(top_builddir)/src/.libs/libbluray.jar: all-local
+$(top_builddir)/src/.libs/libbluray-$(BDJ_TYPE)-$(VERSION).jar: all-local
 
 libbluray_la_SOURCES += \
 	libbluray/bdj/bdj.h \
@@ -159,12 +159,14 @@ all-local:
 	    -Dbuild='$(abs_builddir)/libbluray/bdj/build' \
 	    -Ddist='$(abs_builddir)/.libs' \
 	    -Dsrc_awt=:java-$(BDJ_TYPE) \
-	    -Dbootclasspath="$(BDJ_BOOTCLASSPATH)"
+	    -Dbootclasspath="$(BDJ_BOOTCLASSPATH)" \
+	    -Dversion='$(BDJ_TYPE)-$(VERSION)'
 
 clean-local:
 	ant -f $(top_srcdir)/src/libbluray/bdj/build.xml \
 	    -Dbuild='$(abs_builddir)/libbluray/bdj/build' \
 	    -Ddist='$(abs_builddir)/.libs' \
+	    -Dversion='$(BDJ_TYPE)-$(VERSION)' \
 	    clean
 endif
 
diff --git a/src/libbluray/bdj/build.xml b/src/libbluray/bdj/build.xml
index 7bf06b3..f315873 100644
--- a/src/libbluray/bdj/build.xml
+++ b/src/libbluray/bdj/build.xml
@@ -8,6 +8,7 @@
     <property name="dist"  location="../../.libs"/>
     <property name="src_awt" value=""/>
     <property name="bootclasspath" value=""/>
+    <property name="version" value=""/>
 
     <target name="init">
         <tstamp/>
@@ -23,12 +24,12 @@
     </target>
     <target name="dist" depends="compile"
             description="generate the distribution" >
-        <jar jarfile="${dist}/libbluray.jar" basedir="${build}" />
+        <jar jarfile="${dist}/libbluray-${version}.jar" basedir="${build}" />
     </target>
 
     <target name="clean"
             description="clean up" >
         <delete dir="${build}"/>
-        <delete dir="${dist}/libbluray.jar"/>
+        <delete dir="${dist}/libbluray-${version}.jar"/>
     </target>
 </project>
diff --git a/src/libbluray/bdj/common.h b/src/libbluray/bdj/common.h
index 5b1e48a..745ea2c 100644
--- a/src/libbluray/bdj/common.h
+++ b/src/libbluray/bdj/common.h
@@ -20,7 +20,13 @@
 #ifndef BDJ_COMMON_H_
 #define BDJ_COMMON_H_
 
-#define BDJ_JARFILE   "libbluray.jar"
+#include "config.h"
+
+#ifdef HAVE_BDJ_J2ME
+#define BDJ_JARFILE   "libbluray-j2me-" VERSION ".jar"
+#else
+#define BDJ_JARFILE   "libbluray-j2se-" VERSION ".jar"
+#endif
 #define BDJ_CLASSPATH BDJ_JARFILE
 #define BDJ_BDJO_PATH "/BDMV/BDJO"
 #define BDJ_JAR_PATH "/BDMV/JAR"



More information about the libbluray-devel mailing list