6c088e
From cf8978c21d0a6f0bf9a00983f123597c8bb331b6 Mon Sep 17 00:00:00 2001
6c088e
From: Michal Srb <msrb@redhat.com>
6c088e
Date: Wed, 12 Feb 2014 18:24:13 +0100
6c088e
Subject: [PATCH 2/3] [macros] Fix add_maven_depmap for SCL usage
6c088e
6c088e
Use %{pkg_name} when calling without arguments
6c088e
Let's make sure we install fragment file without prefix
6c088e
---
6c088e
 etc/macros.fjava | 6 +++---
6c088e
 1 file changed, 3 insertions(+), 3 deletions(-)
6c088e
6c088e
diff --git a/etc/macros.fjava b/etc/macros.fjava
6c088e
index bdfd624..e2a41e6 100644
6c088e
--- a/etc/macros.fjava
6c088e
+++ b/etc/macros.fjava
6c088e
@@ -52,8 +52,8 @@
6c088e
 set -e \
6c088e
 # default values \
6c088e
 %if %# == 0 \
6c088e
-   _pompart="JPP-%{name}.pom" \
6c088e
-   _jarpart="%{name}.jar" \
6c088e
+   _pompart="JPP-%{?scl:%{pkg_name}}%{!?scl:%{name}}.pom" \
6c088e
+   _jarpart="%{?scl:%{pkg_name}}%{!?scl:%{name}}.jar" \
6c088e
 %else \
6c088e
    _pompart="%1" \
6c088e
    _jarpart="%2" \
6c088e
@@ -67,7 +67,7 @@ for _dir in %{_jnidir} %{_javajnidir} %{_javadir}; do \
6c088e
 done \
6c088e
 python -m %{javadir}-utils/maven_depmap %{-a} %{-v*:-r %{-v*}} \\\
6c088e
           -p "%{_prefix}" -n "%{?scl}" \\\
6c088e
-          %{buildroot}%{_mavendepmapfragdir}/%{name}%{-f*:-%{-f*}} \\\
6c088e
+          %{buildroot}%{_mavendepmapfragdir}/%{?scl:%{pkg_name}}%{!?scl:%{name}}%{-f*:-%{-f*}} \\\
6c088e
           %{buildroot}%{_mavenpomdir}/$_pompart \\\
6c088e
 %if %# == 2 \
6c088e
           "${_jpath}" \\\
6c088e
-- 
6c088e
1.9.0
6c088e