Update to 2.0.1
- Versionless jars & javadocs - Use maven 3 to build - Use apache-commons-parent for BR
This commit is contained in:
parent
1221498e96
commit
7176e65292
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
commons-io-1.4-src.tar.gz
|
||||
/commons-io-2.0-src.tar.gz
|
||||
/commons-io-2.0.1-src.tar.gz
|
||||
|
@ -2,7 +2,7 @@
|
||||
%global short_name commons-%{base_name}
|
||||
|
||||
Name: apache-%{short_name}
|
||||
Version: 2.0
|
||||
Version: 2.0.1
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Utilities to assist with developing IO functionality
|
||||
@ -15,26 +15,15 @@ BuildArch: noarch
|
||||
BuildRequires: java-devel >= 1:1.6.0
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: junit4
|
||||
BuildRequires: maven2 >= 2.2.1
|
||||
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-plugin-bundle
|
||||
BuildRequires: maven-resources-plugin
|
||||
BuildRequires: maven-surefire-plugin
|
||||
BuildRequires: maven
|
||||
BuildRequires: maven-surefire-provider-junit4
|
||||
BuildRequires: apache-commons-parent
|
||||
|
||||
Requires: java >= 1:1.6.0
|
||||
Requires: jpackage-utils
|
||||
Requires(post): jpackage-utils
|
||||
Requires(postun): jpackage-utils
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# This should go away with F-17
|
||||
Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name} <= 0:1.4
|
||||
@ -59,30 +48,19 @@ This package contains the API documentation for %{name}.
|
||||
sed -i 's/\r//' *.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-local install javadoc:javadoc
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
# jars
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
|
||||
pushd $RPM_BUILD_ROOT%{_javadir}
|
||||
for jar in *-%{version}*; do
|
||||
ln -sf ${jar} `echo $jar| sed "s|apache-||g"`
|
||||
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
||||
ln -sf ${jar} `echo $jar| sed "s|apache-\(.*\)-%{version}|\1|g"`
|
||||
done
|
||||
popd # come back from javadir
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
install -p -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
||||
|
||||
# pom
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 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
|
||||
@ -90,12 +68,13 @@ install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%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} || :
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
@ -113,10 +92,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt NOTICE.txt
|
||||
%doc %{_javadocdir}/%{name}-%{version}
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Jan 18 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1:2.0.1-1
|
||||
- Update to 2.0.1
|
||||
- Versionless jars & javadocs
|
||||
- Use maven 3 to build
|
||||
- Use apache-commons-parent for BR
|
||||
|
||||
* Fri Oct 22 2010 Chris Spike <chris.spike@arcor.de> 1:2.0-1
|
||||
- Updated to 2.0
|
||||
- Cleaned up BRs
|
||||
|
Loading…
Reference in New Issue
Block a user