/[packages]/cauldron/jenkins-antisamy-markup-formatter-plugin/current/SPECS/jenkins-antisamy-markup-formatter-plugin.spec
ViewVC logotype

Contents of /cauldron/jenkins-antisamy-markup-formatter-plugin/current/SPECS/jenkins-antisamy-markup-formatter-plugin.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1917398 - (show annotations) (download)
Sun Dec 4 08:33:40 2022 UTC (2 years, 4 months ago) by danf
File size: 2528 byte(s)
SILENT: Switch URLs to https:
1 %global mod_name antisamy-markup-formatter-plugin
2 %global short_name antisamy-markup-formatter
3 %global plugin_home %{_datadir}/jenkins/webroot/WEB-INF/plugins/
4
5 Name: jenkins-antisamy-markup-formatter-plugin
6 Version: 1.3
7 Release: %mkrel 3
8 Group: Development/Java
9 Summary: OWASP Markup Formatter Plugin for Jenkins
10
11 # License is specified in pom.xml
12 # Jenkins upstream usually don't include license text in git repository
13 # BSD: src/main/java/hudson/markup/EbayPolicy.java
14 # rest is MIT
15 License: MIT and BSD
16 URL: https://github.com/jenkinsci/antisamy-markup-formatter-plugin
17 Source0: https://github.com/jenkinsci/%{mod_name}/archive/%{short_name}-%{version}.tar.gz
18 # Text copied from https://www.opensource.org/licenses/mit-license.php
19 Source1: LICENSE-MIT.txt
20 # Text copied from src/main/java/hudson/markup/EbayPolicy.java
21 Source2: LICENSE-BSD.txt
22 Patch0: update-owasp-html-sanitizer.patch
23
24 BuildRequires: maven-local
25 BuildRequires: mvn(org.jenkins-ci.plugins:plugin:pom:)
26 BuildRequires: mvn(org.kohsuke:access-modifier-checker)
27 BuildRequires: mvn(org.jenkins-ci.main:jenkins-core)
28 BuildRequires: mvn(com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer)
29 BuildRequires: zip
30
31 BuildArch: noarch
32
33 %description
34 This package provides Jenkins plugin which uses policy definitions to allow
35 limited HTML markup in user-submitted text.
36
37 %package javadoc
38 Summary: Javadoc for %{name}
39
40 %description javadoc
41 This package contains the API documentation for
42 %{name}.
43
44 %prep
45 %setup -q -n %{mod_name}-%{short_name}-%{version}
46
47 %patch0 -p1
48
49 cp %{SOURCE1} .
50 cp %{SOURCE2} .
51 %mvn_file ::hpi:: %{name}/%{short_name}
52
53 %build
54 # tests are disabled, because "package org.jvnet.hudson.test does not exist"
55 # we don't have these Jenkins test artifacts in Fedora
56 %mvn_build -f
57
58 %install
59 install -d -m 755 %{buildroot}/%{plugin_home}
60 unzip -d target/%{short_name}.hpi-unpacked target/%{short_name}.hpi
61 pushd target/%{short_name}.hpi-unpacked/WEB-INF/lib/
62 rm %{short_name}.jar && ln -s %{_javadir}/%{name}/%{short_name}.jar .
63 xmvn-subst -s .
64 popd
65 pushd target/%{short_name}.hpi-unpacked/
66 zip -y -r %{short_name}.hpi .
67 popd
68 mv target/%{short_name}.hpi-unpacked/%{short_name}.hpi target/
69 cp target/%{short_name}.hpi %{buildroot}/%{plugin_home}/
70 %mvn_install
71
72 %files -f .mfiles
73 %dir %{_javadir}/%{name}
74 %{plugin_home}
75 %doc LICENSE-MIT.txt LICENSE-BSD.txt
76 %files javadoc -f .mfiles-javadoc
77 %doc LICENSE-MIT.txt LICENSE-BSD.txt
78

  ViewVC Help
Powered by ViewVC 1.1.30