msrb pushed to jenkins-script-security-plugin (master). "Migrate to .hpi with symlinks"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 16 07:37:52 UTC 2015
>From e9f8282dc26b172b95edb38c272a3b89d0c84a62 Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Thu, 16 Apr 2015 09:37:10 +0200
Subject: Migrate to .hpi with symlinks
diff --git a/jenkins-script-security-plugin.spec b/jenkins-script-security-plugin.spec
index 59e3b35..bf9c609 100644
--- a/jenkins-script-security-plugin.spec
+++ b/jenkins-script-security-plugin.spec
@@ -1,10 +1,10 @@
%global mod_name jenkins-script-security-plugin
%global short_name script-security
-%global plugin_home %{_datadir}/jenkins/webroot/WEB-INF/plugins/%{short_name}.jpi
+%global plugin_home %{_datadir}/jenkins/webroot/WEB-INF/plugins/
Name: jenkins-script-security-plugin
Version: 1.13
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Jenkins Script Security Plugin
# from POM
@@ -39,9 +39,7 @@ This package contains the API documentation for %{name}.
find . -name "*.jar" -delete
cp %{SOURCE1} .
-%mvn_package '::hpi::' __noinstall
-
-%mvn_file ::jar:: %{name}/%{short_name} %{plugin_home}/WEB-INF/lib/%{short_name}
+%mvn_file ::hpi:: %{name}/%{short_name}
%build
# missing org.jenkins-ci:test-annotations
@@ -49,12 +47,16 @@ cp %{SOURCE1} .
%install
install -d -m 755 %{buildroot}/%{plugin_home}
-unzip -d %{buildroot}/%{plugin_home} target/%{short_name}.hpi
-pushd %{buildroot}/%{plugin_home}/WEB-INF/lib/
- rm %{short_name}.jar
+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
%files -f .mfiles
@@ -65,6 +67,9 @@ popd
%license LICENSE
%changelog
+* Thu Apr 16 2015 Michal Srb <msrb at redhat.com> - 1.13-3
+- Migrate to .hpi with symlinks
+
* Tue Mar 31 2015 Michal Srb <msrb at redhat.com> - 1.13-2
- Install as a plugin
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/jenkins-script-security-plugin.git/commit/?h=master&id=e9f8282dc26b172b95edb38c272a3b89d0c84a62
More information about the scm-commits
mailing list