commit 1032a0b233e2a7b2559e244a5474a8aa43c38ef8
Author: Michal Srb <msrb(a)redhat.com>
Date: Wed Oct 1 14:56:49 2014 +0200
Install unpacked (Resolves: rhbz#1147821)
jenkins-icon-shim.spec | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/jenkins-icon-shim.spec b/jenkins-icon-shim.spec
index afc8bce..27cd215 100644
--- a/jenkins-icon-shim.spec
+++ b/jenkins-icon-shim.spec
@@ -1,14 +1,16 @@
-%global shortname icon-shim
+%global mod_name icon-shim-plugin
+%global short_name icon-shim
+%global plugin_home %{_datadir}/jenkins/plugins/%{short_name}
Name: jenkins-icon-shim
Version: 1.0.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Jenkins Icon Shim Plugin
# specified in POM file
License: MIT
URL:
https://github.com/jenkinsci/icon-shim-plugin
-Source0:
https://github.com/jenkinsci/%{shortname}-plugin/archive/%{shortname}-pom...
+Source0:
https://github.com/jenkinsci/%{short_name}-plugin/archive/%{short_name}-p...
# taken from
http://opensource.org/licenses/MIT
Source1: LICENSE
@@ -33,11 +35,13 @@ This package contains the API documentation for %{name}.
%prep
-%setup -q -n %{shortname}-plugin-%{shortname}-pom-%{version}
+%setup -q -n %{mod_name}-%{short_name}-pom-%{version}
cp %{SOURCE1} .
%pom_remove_plugin :findbugs-maven-plugin plugin
+%mvn_package ::hpi: __noinstall
+%mvn_file :{*}:jar:: %{name}/@1 %{plugin_home}/WEB-INF/lib/@1
%build
# "package org.jvnet.hudson.test does not exist" - we don't have
@@ -45,15 +49,26 @@ cp %{SOURCE1} .
%mvn_build -f
%install
+
+install -d -m 755 %{buildroot}/%{plugin_home}
+unzip -d %{buildroot}/%{plugin_home} plugin/target/%{short_name}.hpi
+rm %{buildroot}/%{plugin_home}/WEB-INF/lib/*
+
%mvn_install
+sed -i 's|%{plugin_home}/WEB-INF/lib/%{short_name}.jar||' .mfiles
%files -f .mfiles
%dir %{_javadir}/%{name}
+%dir %{_mavenpomdir}/%{name}
+%{plugin_home}
%doc LICENSE
%files javadoc -f .mfiles-javadoc
%doc LICENSE
%changelog
+* Wed Oct 01 2014 Michal Srb <msrb(a)redhat.com> - 1.0.3-2
+- Install unpacked (Resolves: rhbz#1147821)
+
* Mon Sep 08 2014 Michal Srb <msrb(a)redhat.com> - 1.0.3-1
- Initial packaging