/[packages]/cauldron/maven-license-plugin/current/SPECS/maven-license-plugin.spec
ViewVC logotype

Contents of /cauldron/maven-license-plugin/current/SPECS/maven-license-plugin.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91186 - (show annotations) (download)
Mon Apr 25 22:32:12 2011 UTC (13 years, 9 months ago) by dmorgan
File size: 4191 byte(s)
imported package maven-license-plugin
1 Name: maven-license-plugin
2 Version: 1.8.0
3 Release: %mkrel 3
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.8.0 maven-license-plugin
12 # tar cfJ maven-license-plugin-1.8.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 Patch0: 001-mavenlicenseplugin-fixbuild.patch
18 BuildArch: noarch
19
20 BuildRequires: java-devel
21 BuildRequires: jpackage-utils
22 BuildRequires: maven2
23 BuildRequires: maven-assembly-plugin
24 BuildRequires: maven-deploy-plugin
25 BuildRequires: maven-jar-plugin
26 BuildRequires: maven-javadoc-plugin
27 BuildRequires: maven-source-plugin
28 BuildRequires: maven-changelog-plugin
29 BuildRequires: maven-changes-plugin
30 BuildRequires: maven-clean-plugin
31 BuildRequires: maven-compiler-plugin
32 BuildRequires: maven-dependency-plugin
33 BuildRequires: maven-eclipse-plugin
34 BuildRequires: maven-help-plugin
35 BuildRequires: maven-idea-plugin
36 BuildRequires: maven-install-plugin
37 BuildRequires: maven-plugin-plugin
38 BuildRequires: maven-pmd-plugin
39 BuildRequires: maven-resources-plugin
40 BuildRequires: maven-repository-plugin
41 BuildRequires: maven-remote-resources-plugin
42 BuildRequires: maven-site-plugin
43 BuildRequires: maven-surefire-plugin
44 BuildRequires: maven-shared
45 BuildRequires: maven-plugin-testing-harness
46 BuildRequires: maven-release-plugin
47 BuildRequires: plexus-utils
48 BuildRequires: plexus-classworlds
49 BuildRequires: xml-commons-apis
50 BuildRequires: xmltool
51
52 Requires: java
53 Requires: jpackage-utils
54 Requires: maven2
55 Requires: xmltool
56
57 Requires(post): jpackage-utils
58 Requires(postun): jpackage-utils
59
60 %description
61 maven-license-plugin is a Maven 2 plugin that help you managing license
62 headers in source files. Basically, when you are developing a project
63 either in open source or in a company, you often need to add at the top
64 of your source files a license to protect your work.
65 This plugin lets you maintain the headers, including checking if the
66 header is present, generating a report and of course having the
67 possibility to update / reformat missing license headers.
68
69
70 %package javadoc
71 Summary: Javadocs for %{name}
72 Group: Development/Java
73 Requires: %{name} = %{version}-%{release}
74 Requires: jpackage-utils
75 BuildArch: noarch
76
77 %description javadoc
78 This package contains the API documentation for %{name}.
79
80
81 %prep
82 %setup -q -n %{name}
83 %patch0 -p1
84 # fix EOL
85 sed -i 's/\r//' LICENSE.txt
86 sed -i 's/\r//' NOTICE.txt
87
88
89 %build
90 export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
91 mkdir -p $MAVEN_REPO_LOCAL
92
93 mvn-jpp \
94 -e \
95 -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
96 -Dmaven2.jpp.depmap.file=%{SOURCE1} \
97 -Dmaven.test.skip=true \
98 install javadoc:aggregate
99
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 mkdir -p $RPM_BUILD_ROOT%{_javadir}
104 install -Dp -m 644 target/%{name}-%{version}.jar \
105 $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
106 (cd $RPM_BUILD_ROOT%{_javadir} && ln -sf %{name}-%{version}.jar %{name}.jar)
107
108 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
109 cp -rp target/site/apidocs/ \
110 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
111 (cd $RPM_BUILD_ROOT%{_javadocdir} && ln -sf %{name}-%{version} %{name})
112
113 install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
114 install -pm 644 pom.xml \
115 $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
116
117 %add_to_maven_depmap com.mycila.maven-license-plugin %{name} %{version} JPP %{name}
118
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123
124 %files
125 %defattr(-,root,root,-)
126 %doc NOTICE.txt LICENSE.txt
127 %{_mavenpomdir}/*
128 %{_mavendepmapfragdir}/*
129 %{_javadir}/*
130
131
132 %files javadoc
133 %defattr(-,root,root,-)
134 %{_javadocdir}/%{name}
135 %{_javadocdir}/%{name}-%{version}
136
137
138 %post
139 %update_maven_depmap
140
141 %postun
142 %update_maven_depmap
143

  ViewVC Help
Powered by ViewVC 1.1.30