Fix pom filename (Resolves rhbz#655811)
Also: - Use new maven plugin names - Remove gcj support - Few tweaks according to new guidelines - Make jars and javadocs versionless
This commit is contained in:
parent
fcf51ae4b3
commit
151b072895
79
jsr-305.spec
79
jsr-305.spec
@ -1,11 +1,9 @@
|
|||||||
%define with_gcj %{!?_without_gcj:1}%{?_without_gcj:0}
|
|
||||||
|
|
||||||
Name: jsr-305
|
Name: jsr-305
|
||||||
Version: 0
|
Version: 0
|
||||||
Release: 0.4.20090319svn%{?dist}
|
Release: 0.5.20090319svn%{?dist}
|
||||||
Summary: Correctness annotations for Java code
|
Summary: Correctness annotations for Java code
|
||||||
|
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://jsr-305.googlecode.com/
|
URL: http://jsr-305.googlecode.com/
|
||||||
# There has been no official release yet. This is a snapshot of the Subversion
|
# There has been no official release yet. This is a snapshot of the Subversion
|
||||||
@ -15,29 +13,25 @@ URL: http://jsr-305.googlecode.com/
|
|||||||
# tar -cvf jsr-305-0.4.20090319.tar jsr-305
|
# tar -cvf jsr-305-0.4.20090319.tar jsr-305
|
||||||
# xz jsr-305-0.4.20090319.tar
|
# xz jsr-305-0.4.20090319.tar
|
||||||
Source0: jsr-305-0.4.20090319.tar.xz
|
Source0: jsr-305-0.4.20090319.tar.xz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
# We need the OpenJDK javadoc because sinjdoc doesn't grok annotations.
|
|
||||||
BuildRequires: java-1.6.0-openjdk-devel
|
BuildRequires: java-1.6.0-openjdk-devel
|
||||||
BuildRequires: jpackage-utils, maven2
|
BuildRequires: jpackage-utils, maven2
|
||||||
BuildRequires: maven2-plugin-compiler, maven2-plugin-install
|
BuildRequires: maven-compiler-plugin
|
||||||
BuildRequires: maven2-plugin-jar, maven2-plugin-javadoc
|
BuildRequires: maven-install-plugin
|
||||||
BuildRequires: maven2-plugin-resources, maven2-plugin-site
|
BuildRequires: maven-jar-plugin
|
||||||
BuildRequires: maven2-plugin-surefire, tomcat5
|
BuildRequires: maven-javadoc-plugin
|
||||||
|
BuildRequires: maven-resources-plugin
|
||||||
|
BuildRequires: maven-site-plugin
|
||||||
|
BuildRequires: maven-surefire-plugin
|
||||||
|
BuildRequires: tomcat5
|
||||||
Requires: java >= 1.5, jpackage-utils
|
Requires: java >= 1.5, jpackage-utils
|
||||||
|
|
||||||
%if %{with_gcj}
|
|
||||||
BuildRequires: java-gcj-compat-devel >= 1.0.31
|
|
||||||
Requires(post): java-gcj-compat >= 1.0.31
|
|
||||||
Requires(postun): java-gcj-compat >= 1.0.31
|
|
||||||
%else
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadoc documentation for %{name}
|
Summary: Javadoc documentation for %{name}
|
||||||
Group: Development/Documentation
|
Group: Documentation
|
||||||
Requires: %{name} = %{version}-%{release}, jpackage-utils
|
Requires: jpackage-utils
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains reference implementations, test cases, and other
|
This package contains reference implementations, test cases, and other
|
||||||
@ -49,6 +43,7 @@ This package contains the API documentation for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}
|
%setup -q -n %{name}
|
||||||
|
sed -i 's/\r//' sampleUses/pom.xml
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||||
@ -63,60 +58,48 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
# JAR files
|
# JAR files
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||||||
cp -p ri/target/ri-0.1-SNAPSHOT.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
cp -p ri/target/ri-0.1-SNAPSHOT.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||||
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
|
||||||
|
|
||||||
# Javadocs
|
# Javadocs
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||||
pushd ri/target/site/apidocs
|
cp -rp ri/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/
|
||||||
cp -rp . $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
||||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
popd
|
|
||||||
|
|
||||||
# pom
|
# pom
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/maven2/poms
|
mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
|
||||||
install -pm 644 ri/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.%{name}.pom
|
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_to_maven_depmap org.apache.maven %{name} %{version} JPP %{name}
|
||||||
|
|
||||||
# Precompiled bits
|
|
||||||
%if %{with_gcj}
|
|
||||||
%{_bindir}/aot-compile-rpm
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%update_maven_depmap
|
%update_maven_depmap
|
||||||
%if %{with_gcj}
|
|
||||||
if [ -x %{_bindir}/rebuild-gcj-db ]; then
|
|
||||||
%{_bindir}/rebuild-gcj-db
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%update_maven_depmap
|
%update_maven_depmap
|
||||||
%if %{with_gcj}
|
|
||||||
if [ -x %{_bindir}/rebuild-gcj-db ]; then
|
%pre javadoc
|
||||||
%{_bindir}/rebuild-gcj-db
|
# workaround for rpm bug 646523 (can be removed in F-17)
|
||||||
fi
|
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||||
%endif
|
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc ri/LICENSE sampleUses
|
%doc ri/LICENSE sampleUses
|
||||||
%{_datadir}/maven2/poms/JPP.jsr-305.pom
|
%{_mavenpomdir}/JPP-jsr-305.pom
|
||||||
%{_javadir}/*
|
%{_javadir}/*
|
||||||
%{_mavendepmapfragdir}/jsr-305
|
%{_mavendepmapfragdir}/jsr-305
|
||||||
%if %{with_gcj}
|
|
||||||
%{_libdir}/gcj/%{name}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_javadocdir}/*
|
%{_javadocdir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 26 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0-0.5.20090319svn
|
||||||
|
- Fix pom filename (Resolves rhbz#655811)
|
||||||
|
- Use new maven plugin names
|
||||||
|
- Remove gcj support
|
||||||
|
- Few tweaks according to new guidelines
|
||||||
|
- Make jars and javadocs versionless
|
||||||
|
|
||||||
* Thu Jan 14 2010 Jerry James <loganjerry@gmail.com> - 0-0.4.20090319svn
|
* Thu Jan 14 2010 Jerry James <loganjerry@gmail.com> - 0-0.4.20090319svn
|
||||||
- Update to 19 Mar 2009 snapshot
|
- Update to 19 Mar 2009 snapshot
|
||||||
- Compress with xz instead of bzip2
|
- Compress with xz instead of bzip2
|
||||||
|
Loading…
Reference in New Issue
Block a user