Build with maven 3.
- Adapt to current guidelines.
This commit is contained in:
parent
082709f53b
commit
0d07a7c86e
@ -1,14 +1,9 @@
|
|||||||
%global base_name codec
|
%global base_name codec
|
||||||
%global short_name commons-%{base_name}
|
%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}
|
Name: apache-%{short_name}
|
||||||
Version: 1.4
|
Version: 1.4
|
||||||
Release: 12%{?dist}
|
Release: 13%{?dist}
|
||||||
Summary: Implementations of common encoders and decoders
|
Summary: Implementations of common encoders and decoders
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: ASL 2.0
|
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
|
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
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: java-devel >= 1:1.6.0
|
BuildRequires: java-devel >= 1:1.6.0
|
||||||
BuildRequires: jpackage-utils
|
BuildRequires: jpackage-utils
|
||||||
BuildRequires: maven2-plugin-antrun
|
BuildRequires: maven-antrun-plugin
|
||||||
BuildRequires: maven2-plugin-assembly
|
BuildRequires: maven-assembly-plugin
|
||||||
BuildRequires: maven2-plugin-compiler
|
BuildRequires: maven-compiler-plugin
|
||||||
BuildRequires: maven2-plugin-idea
|
BuildRequires: maven-idea-plugin
|
||||||
BuildRequires: maven2-plugin-install
|
BuildRequires: maven-install-plugin
|
||||||
BuildRequires: maven2-plugin-jar
|
BuildRequires: maven-jar-plugin
|
||||||
BuildRequires: maven2-plugin-javadoc
|
BuildRequires: maven-javadoc-plugin
|
||||||
BuildRequires: maven2-plugin-resources
|
BuildRequires: maven-resources-plugin
|
||||||
BuildRequires: maven-doxia-sitetools
|
BuildRequires: maven-doxia-sitetools
|
||||||
BuildRequires: maven-plugin-bundle
|
BuildRequires: maven-plugin-bundle
|
||||||
BuildRequires: maven-surefire-maven-plugin
|
BuildRequires: maven-surefire-maven-plugin
|
||||||
BuildRequires: maven-surefire-provider-junit
|
BuildRequires: maven-surefire-provider-junit
|
||||||
Requires: java >= 1:1.6.0
|
Requires: java >= 1:1.6.0
|
||||||
Requires: jpackage-utils
|
Requires: jpackage-utils
|
||||||
Requires(post):jpackage-utils
|
|
||||||
Requires(postun):jpackage-utils
|
|
||||||
|
|
||||||
Provides: jakarta-%{short_name} = %{version}-%{release}
|
Provides: jakarta-%{short_name} = %{version}-%{release}
|
||||||
Obsoletes: 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
|
sed -i 's/\r//' RELEASE-NOTES*.txt LICENSE.txt NOTICE.txt
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
mvn-rpmbuild install javadoc:javadoc
|
||||||
mkdir -p $MAVEN_REPO_LOCAL
|
|
||||||
|
|
||||||
mvn-jpp \
|
|
||||||
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
||||||
install javadoc:javadoc
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
# jars
|
# jars
|
||||||
install -pD -T target/%{short_name}-%{version}.jar \
|
install -pD -T target/%{short_name}-%{version}.jar \
|
||||||
%{buildroot}%{_javadir}/%{short_name}.jar
|
%{buildroot}%{_javadir}/%{short_name}.jar
|
||||||
@ -86,39 +71,23 @@ cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
|||||||
|
|
||||||
# pom
|
# pom
|
||||||
install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_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}
|
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "%{short_name}:%{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} || :
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES*
|
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES*
|
||||||
%{_mavendepmapfragdir}/*
|
%{_mavendepmapfragdir}/*
|
||||||
%{_mavenpomdir}/*
|
%{_mavenpomdir}/*
|
||||||
%{_javadir}/*
|
%{_javadir}/*
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc LICENSE.txt
|
%doc LICENSE.txt
|
||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 30 2011 Alexander Kurtakov <akurtako@redhat.com> 1.4-13
|
||||||
|
- Build with maven 3.
|
||||||
|
- Adapt to current guidelines.
|
||||||
|
|
||||||
* Thu Feb 10 2011 mbooth <mbooth@sd.matbooth.co.uk> 1.4-12
|
* Thu Feb 10 2011 mbooth <mbooth@sd.matbooth.co.uk> 1.4-12
|
||||||
- Drop versioned jars and javadocs.
|
- Drop versioned jars and javadocs.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user