Update to 2.0.1

- Versionless jars & javadocs
- Use maven 3 to build
- Use apache-commons-parent for BR
This commit is contained in:
Stanislav Ochotnicky 2011-01-18 17:47:10 +01:00
parent 1221498e96
commit 7176e65292
3 changed files with 23 additions and 38 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
commons-io-1.4-src.tar.gz commons-io-1.4-src.tar.gz
/commons-io-2.0-src.tar.gz /commons-io-2.0-src.tar.gz
/commons-io-2.0.1-src.tar.gz

View File

@ -2,7 +2,7 @@
%global short_name commons-%{base_name} %global short_name commons-%{base_name}
Name: apache-%{short_name} Name: apache-%{short_name}
Version: 2.0 Version: 2.0.1
Release: 1%{?dist} Release: 1%{?dist}
Epoch: 1 Epoch: 1
Summary: Utilities to assist with developing IO functionality Summary: Utilities to assist with developing IO functionality
@ -15,26 +15,15 @@ BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0 BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils BuildRequires: jpackage-utils
BuildRequires: junit4 BuildRequires: junit4
BuildRequires: maven2 >= 2.2.1 BuildRequires: maven
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-surefire-provider-junit4 BuildRequires: maven-surefire-provider-junit4
BuildRequires: apache-commons-parent
Requires: java >= 1:1.6.0 Requires: java >= 1:1.6.0
Requires: jpackage-utils Requires: jpackage-utils
Requires(post): jpackage-utils Requires(post): jpackage-utils
Requires(postun): jpackage-utils Requires(postun): jpackage-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# This should go away with F-17 # This should go away with F-17
Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release} Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release}
Obsoletes: jakarta-%{short_name} <= 0:1.4 Obsoletes: jakarta-%{short_name} <= 0:1.4
@ -59,30 +48,19 @@ This package contains the API documentation for %{name}.
sed -i 's/\r//' *.txt sed -i 's/\r//' *.txt
%build %build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ mvn-local install javadoc:javadoc
install javadoc:javadoc
%install %install
rm -rf $RPM_BUILD_ROOT
# jars # jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -d -m 755 %{buildroot}%{_javadir}
install -p -m 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar install -p -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.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
# pom # pom
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name} %add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
# following line is only for backwards compatibility. New packages # 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} %add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
# javadoc # javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%clean %pre javadoc
rm -rf $RPM_BUILD_ROOT # 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 %post
%update_maven_depmap %update_maven_depmap
@ -113,10 +92,15 @@ rm -rf $RPM_BUILD_ROOT
%files javadoc %files javadoc
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt %doc LICENSE.txt NOTICE.txt
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name} %doc %{_javadocdir}/%{name}
%changelog %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 * Fri Oct 22 2010 Chris Spike <chris.spike@arcor.de> 1:2.0-1
- Updated to 2.0 - Updated to 2.0
- Cleaned up BRs - Cleaned up BRs

View File

@ -1 +1 @@
c5ce73b7e82b82dffc12bbc846345638 commons-io-2.0-src.tar.gz 0bbe5b7a91f73ea8cc9a18e891732597 commons-io-2.0.1-src.tar.gz