[apache-commons-codec] Build with maven 3.
Alexander Kurtakov
akurtakov at fedoraproject.org
Wed Nov 30 13:03:21 UTC 2011
commit 3a3cec5b3e9d363e3a00cb105b9175e33f49144e
Author: Alexander Kurtakov < <akurtako at redhat.com>
Date: Wed Nov 30 15:03:03 2011 +0200
Build with maven 3.
- Adapt to current guidelines.
apache-commons-codec.spec | 61 +++++++++++----------------------------------
1 files changed, 15 insertions(+), 46 deletions(-)
---
diff --git a/apache-commons-codec.spec b/apache-commons-codec.spec
index 4d167ed..21cfaee 100644
--- a/apache-commons-codec.spec
+++ b/apache-commons-codec.spec
@@ -1,14 +1,9 @@
%global base_name codec
%global short_name commons-%{base_name}
-# enable OSGi automatic dep solving
-%global _use_internal_dependency_generator 0
-%global __find_provides /usr/lib/rpm/osgideps.pl -p
-%global __find_requires /usr/lib/rpm/osgideps.pl -r
-
Name: apache-%{short_name}
Version: 1.4
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: Implementations of common encoders and decoders
Group: Development/Libraries
License: ASL 2.0
@@ -16,28 +11,25 @@ URL: http://commons.apache.org/%{base_name}/
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
-BuildRequires: maven2-plugin-antrun
-BuildRequires: maven2-plugin-assembly
-BuildRequires: maven2-plugin-compiler
-BuildRequires: maven2-plugin-idea
-BuildRequires: maven2-plugin-install
-BuildRequires: maven2-plugin-jar
-BuildRequires: maven2-plugin-javadoc
-BuildRequires: maven2-plugin-resources
+BuildRequires: maven-antrun-plugin
+BuildRequires: maven-assembly-plugin
+BuildRequires: maven-compiler-plugin
+BuildRequires: maven-idea-plugin
+BuildRequires: maven-install-plugin
+BuildRequires: maven-jar-plugin
+BuildRequires: maven-javadoc-plugin
+BuildRequires: maven-resources-plugin
BuildRequires: maven-doxia-sitetools
BuildRequires: maven-plugin-bundle
BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-surefire-provider-junit
Requires: java >= 1:1.6.0
Requires: jpackage-utils
-Requires(post):jpackage-utils
-Requires(postun):jpackage-utils
Provides: jakarta-%{short_name} = %{version}-%{release}
Obsoletes: jakarta-%{short_name} < %{version}-%{release}
@@ -65,16 +57,9 @@ Obsoletes: jakarta-%{short_name}-javadoc < %{version}-%{release}
sed -i 's/\r//' RELEASE-NOTES*.txt LICENSE.txt NOTICE.txt
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
-
-mvn-jpp \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
- install javadoc:javadoc
+mvn-rpmbuild install javadoc:javadoc
%install
-rm -rf %{buildroot}
-
# jars
install -pD -T target/%{short_name}-%{version}.jar \
%{buildroot}%{_javadir}/%{short_name}.jar
@@ -86,39 +71,23 @@ cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
# pom
install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
-%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
-
-# following line is only for backwards compatibility. New packages
-# should use proper groupid org.apache.commons
-%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
-
-%clean
-rm -rf %{buildroot}
-
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
-%pre javadoc
-# workaround for rpm bug, can be removed in F-17
-[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
-rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
+%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "%{short_name}:%{short_name}"
%files
-%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES*
%{_mavendepmapfragdir}/*
%{_mavenpomdir}/*
%{_javadir}/*
%files javadoc
-%defattr(-,root,root,-)
%doc LICENSE.txt
%{_javadocdir}/%{name}
%changelog
+* Wed Nov 30 2011 Alexander Kurtakov <akurtako at redhat.com> 1.4-13
+- Build with maven 3.
+- Adapt to current guidelines.
+
* Thu Feb 10 2011 mbooth <mbooth at sd.matbooth.co.uk> 1.4-12
- Drop versioned jars and javadocs.
More information about the scm-commits
mailing list