1 |
%global mod_name ant-plugin |
2 |
%global short_name ant |
3 |
%global plugin_home %{_datadir}/jenkins/webroot/WEB-INF/plugins/ |
4 |
|
5 |
Name: jenkins-ant-plugin |
6 |
Version: 1.2 |
7 |
Release: %mkrel 6 |
8 |
Group: Development/Java |
9 |
|
10 |
Summary: Jenkins Ant Plugin |
11 |
|
12 |
# License is specified in pom.xml |
13 |
License: MIT |
14 |
URL: https://github.com/jenkinsci/ant-plugin |
15 |
Source0: https://github.com/jenkinsci/%{mod_name}/archive/%{short_name}-%{version}.tar.gz |
16 |
# Text copied from http://www.opensource.org/licenses/mit-license.php |
17 |
Source1: LICENSE.txt |
18 |
|
19 |
Patch0: build-with-remoting-2.48.patch |
20 |
|
21 |
BuildRequires: maven-local |
22 |
BuildRequires: mvn(org.jenkins-ci.plugins:plugin:pom:) |
23 |
BuildRequires: mvn(org.kohsuke:access-modifier-checker) |
24 |
BuildRequires: mvn(org.jenkins-ci.main:jenkins-core) |
25 |
|
26 |
BuildRequires: zip |
27 |
|
28 |
BuildArch: noarch |
29 |
|
30 |
%description |
31 |
This package provides plugin which permits Jenkins to run Apache Ant |
32 |
build steps. |
33 |
|
34 |
%package javadoc |
35 |
Summary: Javadoc for %{name} |
36 |
|
37 |
%description javadoc |
38 |
This package contains the API documentation for %{name}. |
39 |
|
40 |
%prep |
41 |
%setup -q -n %{mod_name}-%{short_name}-%{version} |
42 |
|
43 |
%patch0 -p1 |
44 |
|
45 |
cp %{SOURCE1} . |
46 |
%mvn_file ::hpi:: %{name}/%{short_name} |
47 |
|
48 |
%build |
49 |
# tests are disabled, because "package com.gargoylesoftware.htmlunit.html does not exist" |
50 |
# we don't have these Jenkins test artifacts in Fedora |
51 |
%mvn_build -f |
52 |
|
53 |
%install |
54 |
install -d -m 755 %{buildroot}/%{plugin_home} |
55 |
unzip -d target/%{short_name}.hpi-unpacked target/%{short_name}.hpi |
56 |
pushd target/%{short_name}.hpi-unpacked/WEB-INF/lib/ |
57 |
rm %{short_name}.jar && ln -s %{_javadir}/%{name}/%{short_name}.jar . |
58 |
xmvn-subst -s . |
59 |
popd |
60 |
pushd target/%{short_name}.hpi-unpacked/ |
61 |
zip -y -r %{short_name}.hpi . |
62 |
popd |
63 |
mv target/%{short_name}.hpi-unpacked/%{short_name}.hpi target/ |
64 |
cp target/%{short_name}.hpi %{buildroot}/%{plugin_home}/ |
65 |
%mvn_install |
66 |
|
67 |
%files -f .mfiles |
68 |
%dir %{_javadir}/%{name} |
69 |
%dir %{_mavenpomdir}/%{name} |
70 |
%{plugin_home} |
71 |
%doc LICENSE.txt |
72 |
%files javadoc -f .mfiles-javadoc |
73 |
%doc LICENSE.txt |
74 |
|