[jenkins-junit-plugin] Initial packaging
Michal Srb
msrb at fedoraproject.org
Thu Sep 25 19:12:55 UTC 2014
commit fbe76a0a05d150d14cd8bd21bee8859162cfcf1f
Author: Michal Srb <msrb at redhat.com>
Date: Thu Sep 25 21:12:35 2014 +0200
Initial packaging
.gitignore | 2 +
jenkins-junit-plugin.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +
3 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..de0c3be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/junit-1.1.tar.gz
+/LICENSE.txt
diff --git a/jenkins-junit-plugin.spec b/jenkins-junit-plugin.spec
new file mode 100644
index 0000000..22b6778
--- /dev/null
+++ b/jenkins-junit-plugin.spec
@@ -0,0 +1,66 @@
+%global mod_name junit-plugin
+%global short_name junit
+%global plugin_home %{_datadir}/jenkins/plugins/%{short_name}
+
+Name: jenkins-junit-plugin
+Version: 1.1
+Release: 1%{?dist}
+Summary: Jenkins JUnit Plugin
+
+# License is specified in pom.xml
+License: MIT
+URL: https://github.com/jenkinsci/junit-plugin
+Source0: https://github.com/jenkinsci/%{mod_name}/archive/%{short_name}-%{version}.tar.gz
+# Text copied from http://www.opensource.org/licenses/mit-license.php
+Source1: LICENSE.txt
+
+BuildRequires: maven-local
+BuildRequires: mvn(org.jenkins-ci.plugins:plugin:pom:)
+BuildRequires: mvn(org.kohsuke:access-modifier-checker)
+BuildRequires: mvn(org.jenkins-ci.main:jenkins-core)
+
+BuildArch: noarch
+
+%description
+This package provides Jenkins plugin which allows JUnit-format test
+results to be published.
+
+%package javadoc
+Summary: Javadoc for %{name}
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q -n %{mod_name}-%{short_name}-%{version}
+
+cp %{SOURCE1} .
+%mvn_package ::hpi: __noinstall
+%mvn_file ::jar:: %{name}/%{short_name} %{plugin_home}/WEB-INF/lib/%{short_name}
+
+%build
+# tests have special needs:
+# "package com.gargoylesoftware.htmlunit.html does not exist"
+# we don't have these Jenkins test artifacts in Fedora
+%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/*
+
+%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
+* Wed Sep 24 2014 Michal Srb <msrb at redhat.com> - 1.1-1
+- Initial packaging
diff --git a/sources b/sources
index e69de29..795811c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+894fe1223e104eef46dc3baf2588cd40 junit-1.1.tar.gz
+b28808853537299bae3b2025e2c38d89 LICENSE.txt
More information about the scm-commits
mailing list