[checkstyle] Install maven pom.xml and fix javadoc Requires
Stanislav Ochotnicky
sochotni at fedoraproject.org
Thu Oct 21 14:38:51 UTC 2010
commit 3108e84716d7e7fcdee44ac56b2ec87f3075d794
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date: Thu Oct 21 16:37:53 2010 +0200
Install maven pom.xml and fix javadoc Requires
0001-Remove-sonatype-parent.patch | 30 ++++++++++++++++++++++++++++++
0002-Remove-linkcheck-plugin.patch | 27 +++++++++++++++++++++++++++
checkstyle.spec | 18 ++++++++++++++++--
3 files changed, 73 insertions(+), 2 deletions(-)
---
diff --git a/0001-Remove-sonatype-parent.patch b/0001-Remove-sonatype-parent.patch
new file mode 100644
index 0000000..cf9a227
--- /dev/null
+++ b/0001-Remove-sonatype-parent.patch
@@ -0,0 +1,30 @@
+From ce9c855bc485bb1df802b753e5443deddcd740d5 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky at redhat.com>
+Date: Thu, 21 Oct 2010 14:59:43 +0200
+Subject: [PATCH 1/2] Remove sonatype parent
+
+---
+ pom.xml | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index f54cd34..6d4ae4c 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -2,13 +2,6 @@
+
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+- <!-- Used for making releases. -->
+- <parent>
+- <artifactId>oss-parent</artifactId>
+- <groupId>org.sonatype.oss</groupId>
+- <version>5</version>
+- </parent>
+-
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+--
+1.7.2.3
+
diff --git a/0002-Remove-linkcheck-plugin.patch b/0002-Remove-linkcheck-plugin.patch
new file mode 100644
index 0000000..2fcccda
--- /dev/null
+++ b/0002-Remove-linkcheck-plugin.patch
@@ -0,0 +1,27 @@
+From 283e474e39adab99e3c7c88455bd4723b65c5e38 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky at redhat.com>
+Date: Thu, 21 Oct 2010 15:10:47 +0200
+Subject: [PATCH 2/2] Remove linkcheck plugin
+
+---
+ pom.xml | 4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index 6d4ae4c..6ebda69 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -347,10 +347,6 @@
+ </plugin>
+
+ <plugin>
+- <groupId>org.apache.maven.plugins</groupId>
+- <artifactId>maven-linkcheck-plugin</artifactId>
+- </plugin>
+- <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+--
+1.7.2.3
+
diff --git a/checkstyle.spec b/checkstyle.spec
index de2dfdf..e2f66ee 100644
--- a/checkstyle.spec
+++ b/checkstyle.spec
@@ -74,7 +74,6 @@ BuildRequires: junit4
BuildRequires: guava
Requires: java
-Requires: jpackage-utils >= 0:1.5
Requires: apache-commons-cli
Requires: apache-commons-beanutils
Requires: apache-commons-collections
@@ -85,6 +84,9 @@ Requires: xalan-j2
Requires: xerces-j2
Requires: jdom
Requires: velocity
+Requires: jpackage-utils
+Requires(post): jpackage-utils
+Requires(postun): jpackage-utils
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -108,9 +110,10 @@ Demonstrations and samples for %{name}.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
+Requires: jpackage-utils
%description javadoc
-Javadoc for %{name}.
+API documentation for %{name}.
%prep
%setup -q -n %{name}-%{version}
@@ -144,6 +147,12 @@ cp -pa target/%{name}-%{version}.jar %{buildroot}%{_javadir}
done
)
+# pom
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-checkstyle.pom
+%add_to_maven_depmap com.puppycrawl.tools checkstyle %{version} JPP checkstyle
+
+
# script
install -Dm 755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
@@ -171,6 +180,7 @@ EOF
rm -rf %{buildroot}
%post
+%update_maven_depmap
# Note that we're using a fully versioned catalog, so this is always ok.
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
%{_bindir}/install-catalog --add \
@@ -179,6 +189,7 @@ if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
fi
%postun
+%update_maven_depmap
# Note that we're using a fully versioned catalog, so this is always ok.
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
%{_bindir}/install-catalog --remove \
@@ -191,6 +202,8 @@ fi
%doc LICENSE LICENSE.apache20 README RIGHTS.antlr
%doc checkstyle_checks.xml java.header sun_checks.xml suppressions.xml
+%{_mavenpomdir}/*pom
+%{_mavendepmapfragdir}/%{name}
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_datadir}/xml/%{name}
@@ -209,6 +222,7 @@ fi
%changelog
* Thu Oct 21 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 5.3-1
- Use maven as build system (upstream change)
+- Javadoc subpackage add Require on jpackage-utils
- Obsolete manual subpackage (not available with mvn)
- Cleanup BRs/Rs
- Remove old patches
More information about the scm-commits
mailing list