commit 0957aec69d74b1e025d550981277d880e0538fa4
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Oct 3 09:46:11 2014 +0200
Install as Jenkins plugin
jenkins-ssh-slaves-plugin.spec | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/jenkins-ssh-slaves-plugin.spec b/jenkins-ssh-slaves-plugin.spec
index 14aa8ec..8e701e3 100644
--- a/jenkins-ssh-slaves-plugin.spec
+++ b/jenkins-ssh-slaves-plugin.spec
@@ -1,9 +1,10 @@
%global mod_name ssh-slaves-plugin
%global short_name ssh-slaves
+%global plugin_home %{_datadir}/jenkins/plugins/%{short_name}
Name: jenkins-ssh-slaves-plugin
Version: 1.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Jenkins SSH Slaves Plugin
License: MIT
@@ -34,29 +35,41 @@ This package contains the API documentation for %{name}.
%prep
%setup -q -n %{mod_name}-%{short_name}-%{version}
-# do not build HPI yet, JAR is enough for now
+cp %{SOURCE1} .
+
%mvn_package ::hpi: __noinstall
+%mvn_file ::jar:: %{name}/%{short_name} %{plugin_home}/WEB-INF/lib/%{short_name}
# TODO: this should be pulled in from somewhere else
%pom_add_dep org.acegisecurity:acegi-security
%pom_add_dep com.trilead:trilead-ssh2
-cp %{SOURCE1} .
-
%build
# tests are disabled because of missing dep (org.jenkins-ci.main:jenkins-test-harness)
%mvn_build -f
%install
+# unpack hpi file into the correct location
+install -d -m 755 %{buildroot}/%{plugin_home}
+unzip -d %{buildroot}/%{plugin_home} target/%{short_name}.hpi
+rm %{buildroot}/%{plugin_home}/WEB-INF/lib/%{short_name}.jar
+xmvn-subst %{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.txt
%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt
%changelog
+* Fri Oct 03 2014 Michal Srb <msrb(a)redhat.com> - 1.6-3
+- Install as Jenkins plugin
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.6-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild