1 |
%global mod_name extras-executable-war |
2 |
%global short_name executable-war |
3 |
%global jenkins_webroot %{_datadir}/jenkins/webroot |
4 |
|
5 |
Name: jenkins-executable-war |
6 |
Version: 1.29 |
7 |
Release: %mkrel 7 |
8 |
Group: Development/Java |
9 |
Summary: Jenkins Executable War |
10 |
|
11 |
# License is specified in pom.xml |
12 |
License: MIT |
13 |
URL: https://github.com/jenkinsci/extras-executable-war |
14 |
Source0: https://github.com/jenkinsci/%{mod_name}/archive/%{short_name}-%{version}.tar.gz |
15 |
# Text copied from https://www.opensource.org/licenses/mit-license.php |
16 |
Source1: LICENSE.txt |
17 |
|
18 |
Patch0: 0001-Work-with-exploded-WAR.patch |
19 |
|
20 |
BuildRequires: maven-local |
21 |
|
22 |
BuildArch: noarch |
23 |
|
24 |
%description |
25 |
This package enables executable war support for Jenkins. |
26 |
|
27 |
%package javadoc |
28 |
Summary: Javadoc for %{name} |
29 |
|
30 |
%description javadoc |
31 |
This package contains the API documentation for %{name}. |
32 |
|
33 |
%package webroot |
34 |
Summary: Unpacked classes in Jenkins webroot directory |
35 |
Requires: jenkins-webapp |
36 |
|
37 |
%description webroot |
38 |
This package contains unpacked "jenkins-executable-war" classes in Jenkins |
39 |
webroot directory. |
40 |
|
41 |
%prep |
42 |
%setup -q -n %{mod_name}-%{short_name}-%{version} |
43 |
|
44 |
%patch0 -p1 |
45 |
|
46 |
cp %{SOURCE1} . |
47 |
|
48 |
# there is a licensing issue with parent POM |
49 |
# https://issues.jenkins-ci.org/browse/JENKINS-17682 |
50 |
# it doesn't contain anything interesting, we can remove it |
51 |
%pom_remove_parent |
52 |
|
53 |
%pom_xpath_replace "pom:build/pom:plugins/pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:source" "1.5" |
54 |
%pom_xpath_replace "pom:build/pom:plugins/pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:target" "1.5" |
55 |
|
56 |
%build |
57 |
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 |
58 |
|
59 |
%install |
60 |
%mvn_install |
61 |
|
62 |
install -d -m 755 %{buildroot}/%{jenkins_webroot}/ |
63 |
unzip -d %{buildroot}/%{jenkins_webroot}/ target/%{short_name}-%{version}.jar |
64 |
|
65 |
%files -f .mfiles |
66 |
%dir %{_javadir}/%{name} |
67 |
%doc LICENSE.txt |
68 |
%files webroot |
69 |
%{jenkins_webroot}/* |
70 |
%exclude %{jenkins_webroot}/META-INF |
71 |
%files javadoc -f .mfiles-javadoc |
72 |
%doc LICENSE.txt |
73 |
|