[jmapviewer/f19] %mvn_artifact not available on f19, use %add_maven_depmap
Michael Šimáček
msimacek at fedoraproject.org
Fri May 2 16:31:31 UTC 2014
commit 64f74f364e04b826b8497901482802c9bea97e66
Author: Michael Simacek <msimacek at redhat.com>
Date: Fri May 2 18:29:30 2014 +0200
%mvn_artifact not available on f19, use %add_maven_depmap
jmapviewer-template.pom | 8 ++++++++
jmapviewer.spec | 21 ++++++++++++++++-----
2 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/jmapviewer-template.pom b/jmapviewer-template.pom
new file mode 100644
index 0000000..3b248c8
--- /dev/null
+++ b/jmapviewer-template.pom
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.openstreetmap</groupId>
+ <artifactId>jmapviewer</artifactId>
+ <version>@VERSION@</version>
+ <description>JMapViewer is a java component which allows to easily integrate an OSM map view into your Java application. https://wiki.openstreetmap.org/wiki/JMapViewer</description>
+</project>
diff --git a/jmapviewer.spec b/jmapviewer.spec
index d706260..29ec027 100644
--- a/jmapviewer.spec
+++ b/jmapviewer.spec
@@ -8,6 +8,7 @@ URL: http://wiki.openstreetmap.org/wiki/JMapViewer
# Patent-free tarball created by jmapviewer-generate-tarball.sh
Source0: jmapviewer-%{version}.tar.xz
Source1: jmapviewer-generate-tarball.sh
+Source2: jmapviewer-template.pom
BuildArch: noarch
@@ -36,19 +37,29 @@ sed -i '/<\/javac>/a \
<javadoc sourcepath="src" destdir="target/site/apidocs/" encoding="UTF-8"\/>
' build.xml
+sed 's/@VERSION@/%{version}/g' %SOURCE2 > pom.xml
+
%build
ant build pack
-%mvn_artifact org.openstreetmap:%{name}:%{version} JMapViewer.jar
-%mvn_file :%{name} JMapViewer
-
%install
-%mvn_install
+install -dm755 %{buildroot}%{_javadir}
+install -pm644 JMapViewer.jar %{buildroot}%{_javadir}/%{name}.jar
+
+install -dm755 %{buildroot}%{_mavenpomdir}
+install -pm644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+
+%add_maven_depmap
+
+install -dm755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
+
%files -f .mfiles
%doc Readme.txt Gpl.txt
-%files javadoc -f .mfiles-javadoc
+%files javadoc
+%{_javadocdir}/%{name}
%doc Gpl.txt
%changelog
More information about the scm-commits
mailing list