msrb pushed to jenkins-ssh-credentials-plugin (master). "Migrate to .hpi with symlinks"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 16 07:45:34 UTC 2015
>From d8ebef1207b9a612510b60775df3dbcad1a486ab Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Thu, 16 Apr 2015 09:42:03 +0200
Subject: Migrate to .hpi with symlinks
diff --git a/jenkins-ssh-credentials-plugin.spec b/jenkins-ssh-credentials-plugin.spec
index 8f24979..fb30ee1 100644
--- a/jenkins-ssh-credentials-plugin.spec
+++ b/jenkins-ssh-credentials-plugin.spec
@@ -1,10 +1,10 @@
%global mod_name ssh-credentials-plugin
%global short_name ssh-credentials
-%global plugin_home %{_datadir}/jenkins/webroot/WEB-INF/plugins/%{short_name}.jpi
+%global plugin_home %{_datadir}/jenkins/webroot/WEB-INF/plugins/
Name: jenkins-ssh-credentials-plugin
Version: 1.10
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Jenkins SSH Credentials Plugin
License: MIT
@@ -43,23 +43,26 @@ This package contains the API documentation for %{name}.
%patch0 -p1
-%mvn_package ::hpi: __noinstall
%pom_add_dep net.jcip:jcip-annotations
-%mvn_file ::jar:: %{name}/%{short_name} %{plugin_home}/WEB-INF/lib/%{short_name}
+%mvn_file ::hpi:: %{name}/%{short_name}
%build
# missing dep org.codehaus.mojo:findbugs-maven-plugin
%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/
-
+unzip -d target/%{short_name}.hpi-unpacked target/%{short_name}.hpi
+pushd target/%{short_name}.hpi-unpacked/WEB-INF/lib/
+ rm %{short_name}.jar && ln -s %{_javadir}/%{name}/%{short_name}.jar .
+ xmvn-subst -s .
+popd
+pushd target/%{short_name}.hpi-unpacked/
+ zip -y -r %{short_name}.hpi .
+popd
+mv target/%{short_name}.hpi-unpacked/%{short_name}.hpi target/
+cp target/%{short_name}.hpi %{buildroot}/%{plugin_home}/
%mvn_install
-sed -i 's|%{plugin_home}/WEB-INF/lib/%{short_name}.jar||' .mfiles
%files -f .mfiles
%dir %{_javadir}/%{name}
@@ -70,6 +73,9 @@ sed -i 's|%{plugin_home}/WEB-INF/lib/%{short_name}.jar||' .mfiles
%doc LICENSE.txt
%changelog
+* Thu Apr 16 2015 Michal Srb <msrb at redhat.com> - 1.10-5
+- Migrate to .hpi with symlinks
+
* Tue Apr 14 2015 Michal Srb <msrb at redhat.com> - 1.10-4
- Rebuild
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/jenkins-ssh-credentials-plugin.git/commit/?h=master&id=d8ebef1207b9a612510b60775df3dbcad1a486ab
More information about the scm-commits
mailing list