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