1 |
Name: maven-license-plugin |
2 |
Version: 1.9.0 |
3 |
Release: %mkrel 1 |
4 |
Summary: Maven plugin to update header licenses of source files |
5 |
|
6 |
Group: Development/Java |
7 |
License: ASL 2.0 |
8 |
URL: http://code.google.com/p/maven-license-plugin |
9 |
### upstream only provides binaries or source without build scripts |
10 |
# tar creation instructions |
11 |
# svn export http://maven-license-plugin.googlecode.com/svn/tags/maven-license-plugin-1.9.0 maven-license-plugin |
12 |
# tar cfJ maven-license-plugin-1.9.0.tar.xz maven-license-plugin |
13 |
Source0: %{name}-%{version}.tar.xz |
14 |
# custom depmap needed to workaround missing xml-commons-apis poms |
15 |
#Source1: maven-license-plugin-jpp-depmap.xml |
16 |
# remove testng dep (tests are skipped) and maven-license-plugin call |
17 |
# add maven 3 support |
18 |
Patch0: maven-license-plugin-1.9.0-fixbuild.patch |
19 |
|
20 |
BuildArch: noarch |
21 |
|
22 |
BuildRequires: java-devel |
23 |
BuildRequires: jpackage-utils |
24 |
# pom BR |
25 |
BuildRequires: mycila-parent-pom |
26 |
BuildRequires: apache-resource-bundles |
27 |
BuildRequires: maven |
28 |
BuildRequires: maven-assembly-plugin |
29 |
BuildRequires: maven-clean-plugin |
30 |
BuildRequires: maven-compiler-plugin |
31 |
BuildRequires: maven-dependency-plugin |
32 |
BuildRequires: maven-deploy-plugin |
33 |
BuildRequires: maven-install-plugin |
34 |
BuildRequires: maven-jar-plugin |
35 |
BuildRequires: maven-javadoc-plugin |
36 |
BuildRequires: maven-plugin-plugin |
37 |
BuildRequires: maven-release-plugin |
38 |
BuildRequires: maven-remote-resources-plugin |
39 |
BuildRequires: maven-source-plugin |
40 |
BuildRequires: maven-surefire-plugin |
41 |
BuildRequires: plexus-utils |
42 |
BuildRequires: xmltool |
43 |
# old BR |
44 |
BuildRequires: maven-changelog-plugin |
45 |
BuildRequires: maven-changes-plugin |
46 |
BuildRequires: maven-eclipse-plugin |
47 |
BuildRequires: maven-help-plugin |
48 |
BuildRequires: maven-idea-plugin |
49 |
BuildRequires: maven-plugin-testing-harness |
50 |
BuildRequires: maven-pmd-plugin |
51 |
BuildRequires: maven-resources-plugin |
52 |
BuildRequires: maven-repository-plugin |
53 |
BuildRequires: maven-shared |
54 |
BuildRequires: maven-site-plugin |
55 |
BuildRequires: plexus-classworlds |
56 |
BuildRequires: xml-commons-apis |
57 |
|
58 |
Requires: java |
59 |
Requires: jpackage-utils |
60 |
Requires: maven |
61 |
Requires: mycila-parent-pom |
62 |
Requires: xmltool |
63 |
|
64 |
Requires(post): jpackage-utils |
65 |
Requires(postun): jpackage-utils |
66 |
|
67 |
%description |
68 |
maven-license-plugin is a Maven 2 plugin that help you managing license |
69 |
headers in source files. Basically, when you are developing a project |
70 |
either in open source or in a company, you often need to add at the top |
71 |
of your source files a license to protect your work. |
72 |
This plugin lets you maintain the headers, including checking if the |
73 |
header is present, generating a report and of course having the |
74 |
possibility to update / reformat missing license headers. |
75 |
|
76 |
|
77 |
%package javadoc |
78 |
Summary: Javadocs for %{name} |
79 |
Group: Development/Java |
80 |
Requires: %{name} = %{version}-%{release} |
81 |
Requires: jpackage-utils |
82 |
BuildArch: noarch |
83 |
|
84 |
%description javadoc |
85 |
This package contains the API documentation for %{name}. |
86 |
|
87 |
|
88 |
%prep |
89 |
%setup -q -n %{name} |
90 |
|
91 |
%patch0 -p0 |
92 |
|
93 |
# fix EOL |
94 |
sed -i 's/\r//' LICENSE.txt |
95 |
sed -i 's/\r//' NOTICE.txt |
96 |
|
97 |
%build |
98 |
|
99 |
mvn-rpmbuild -e -Dmaven.test.skip=true install javadoc:aggregate |
100 |
|
101 |
%install |
102 |
rm -rf $RPM_BUILD_ROOT |
103 |
|
104 |
mkdir -p $RPM_BUILD_ROOT%{_javadir} |
105 |
install -Dp -m 644 target/%{name}-%{version}.jar \ |
106 |
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar |
107 |
|
108 |
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
109 |
cp -rp target/site/apidocs/ $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
110 |
|
111 |
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} |
112 |
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom |
113 |
%add_maven_depmap JPP-%{name}.pom %{name}.jar |
114 |
|
115 |
%post |
116 |
%update_maven_depmap |
117 |
|
118 |
%postun |
119 |
%update_maven_depmap |
120 |
|
121 |
%files |
122 |
%doc NOTICE.txt LICENSE.txt |
123 |
%{_mavenpomdir}/JPP-%{name}.pom |
124 |
%{_mavendepmapfragdir}/%{name} |
125 |
%{_javadir}/%{name}.jar |
126 |
|
127 |
%pre javadoc |
128 |
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ |
129 |
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : |
130 |
|
131 |
%files javadoc |
132 |
%{_javadocdir}/%{name} |