SOURCES: rpm.macros - update jpackage macros from jpackage-utils-1...

glen glen at pld-linux.org
Sun Dec 2 23:59:59 CET 2007


Author: glen                         Date: Sun Dec  2 22:59:59 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update jpackage macros from jpackage-utils-1.7.3.tar.bz2

---- Files affected:
SOURCES:
   rpm.macros (1.408 -> 1.409) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.408 SOURCES/rpm.macros:1.409
--- SOURCES/rpm.macros:1.408	Wed Nov 21 17:25:23 2007
+++ SOURCES/rpm.macros	Sun Dec  2 23:59:54 2007
@@ -941,7 +941,6 @@
 # Directory where arch-specific (JNI) version-independent jars are installed.
 %_jnidir		%{_libdir}/java
 
-
 %java_home		%([ -f %{_javadir}-utils/java-functions ] || { echo ERROR; exit 0; }; unset JAVA_HOME; . %{_javadir}-utils/java-functions; set_jvm; echo ${JAVA_HOME:-ERROR})
 
 %ant			JAVA_HOME=%{java_home} ant
@@ -989,6 +988,53 @@
 run "$@"\
 EOF
 
+# jpackage 1.7
+# Directory for maven depmaps
+#
+%_mavendepmapdir /etc/maven
+%_mavendepmapfragdir /etc/maven/fragments
+
+#
+# add_to_depmap adds an entry to the depmap. The arguments are:
+#
+# %1 the original groupid
+# %2 the original artifact id
+# %3 the version
+# %4 the new groupid
+# %5 the new artifactid
+#
+
+%add_to_maven_depmap() \
+install -dm 755 $RPM_BUILD_ROOT/%{_mavendepmapfragdir}\
+cat >>$RPM_BUILD_ROOT/%{_mavendepmapfragdir}/%{name}<< EOF\
+<dependency>\
+    <maven>\
+        <groupId>%1</groupId>\
+        <artifactId>%2</artifactId>\
+        <version>%3</version>\
+    </maven>\
+    <jpp>\
+        <groupId>%4</groupId>\
+        <artifactId>%5</artifactId>\
+        <version>%3</version>\
+    </jpp>\
+</dependency>\
+\
+EOF\
+%{nil}
+
+#==============================================================================
+#
+# update_maven_depmap updates the main maven depmap
+#
+%update_maven_depmap() \
+echo -e "<dependencies>\\n" > %{_mavendepmapdir}/maven2-depmap.xml\
+if [ -d %{_mavendepmapfragdir} ] && [ -n "`find %{_mavendepmapfragdir} -type f`" ]; then\
+cat %{_mavendepmapfragdir}/* >> %{_mavendepmapdir}/maven2-depmap.xml\
+fi\
+echo -e "</dependencies>\\n" >> %{_mavendepmapdir}/maven2-depmap.xml
+
+
 # PEAR install macros
 # Author: Elan Ruusamäe <glen at pld-linux.org>
 #
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm.macros?r1=1.408&r2=1.409&f=u



More information about the pld-cvs-commit mailing list