Use maven3 to build
- Fix depmap - Fix Jave BRs
This commit is contained in:
parent
7423e0a87f
commit
4e4d90a32d
44
jsr-305.spec
44
jsr-305.spec
@ -1,6 +1,6 @@
|
||||
Name: jsr-305
|
||||
Version: 0
|
||||
Release: 0.6.20090319svn%{?dist}
|
||||
Release: 0.7.20090319svn%{?dist}
|
||||
Summary: Correctness annotations for Java code
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -14,8 +14,8 @@ URL: http://jsr-305.googlecode.com/
|
||||
# xz jsr-305-0.4.20090319.tar
|
||||
Source0: jsr-305-0.4.20090319.tar.xz
|
||||
|
||||
BuildRequires: java-1.6.0-openjdk-devel
|
||||
BuildRequires: jpackage-utils, maven2
|
||||
BuildRequires: java >= 0:1.6.0
|
||||
BuildRequires: jpackage-utils, maven
|
||||
BuildRequires: maven-compiler-plugin
|
||||
BuildRequires: maven-install-plugin
|
||||
BuildRequires: maven-jar-plugin
|
||||
@ -23,7 +23,8 @@ BuildRequires: maven-javadoc-plugin
|
||||
BuildRequires: maven-resources-plugin
|
||||
BuildRequires: maven-site-plugin
|
||||
BuildRequires: maven-surefire-plugin
|
||||
Requires: java >= 1.5, jpackage-utils
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
Requires: java, jpackage-utils
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -45,15 +46,9 @@ This package contains the API documentation for %{name}.
|
||||
sed -i 's/\r//' sampleUses/pom.xml
|
||||
|
||||
%build
|
||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||
mkdir -p $MAVEN_REPO_LOCAL
|
||||
|
||||
mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL install
|
||||
cd ri
|
||||
mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL javadoc:javadoc
|
||||
mvn-rpmbuild install javadoc:aggregate
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
# JAR files
|
||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||||
@ -61,19 +56,16 @@ cp -p ri/target/ri-0.1-SNAPSHOT.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
|
||||
# Javadocs
|
||||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -rp ri/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/
|
||||
cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/
|
||||
|
||||
# pom
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
|
||||
install -pm 644 ri/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%add_to_maven_depmap org.apache.maven %{name} %{version} JPP %{name}
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a 'com.google.code.findbugs:jsr305'
|
||||
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}-parent.pom
|
||||
%add_maven_depmap JPP-%{name}-parent.pom
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
|
||||
%pre javadoc
|
||||
# workaround for rpm bug 646523 (can be removed in F-17)
|
||||
@ -81,17 +73,21 @@ install -pm 644 ri/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
|
||||
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc ri/LICENSE sampleUses
|
||||
%{_mavenpomdir}/JPP-jsr-305.pom
|
||||
%{_javadir}/*
|
||||
%{_mavendepmapfragdir}/jsr-305
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%{_mavenpomdir}/JPP-%{name}-parent.pom
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadocdir}/*
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Sep 12 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0-0.7.20090319svn
|
||||
- Use maven3 to build
|
||||
- Fix depmap
|
||||
- Fix Jave BRs
|
||||
|
||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.6.20090319svn
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user