Rebase to latest upstream version

- Replace maven plugins with apache-commons-parent for BR
- Versionless jars and javadocs
This commit is contained in:
Stanislav Ochotnicky 2010-12-10 16:33:04 +01:00
parent e8bd503287
commit 0047ba2a54
3 changed files with 26 additions and 34 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
commons-net-2.0-src.tar.gz commons-net-2.0-src.tar.gz
/commons-net-2.2-src.tar.gz

View File

@ -3,8 +3,8 @@
%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.2
Release: 6%{?dist} Release: 1%{?dist}
Summary: Internet protocol suite Java library Summary: Internet protocol suite Java library
License: ASL 2.0 License: ASL 2.0
Group: Development/Libraries Group: Development/Libraries
@ -14,24 +14,17 @@ BuildArch: noarch
BuildRequires: jpackage-utils >= 0:1.7.2 BuildRequires: jpackage-utils >= 0:1.7.2
BuildRequires: java-devel >= 1:1.6.0 BuildRequires: java-devel >= 1:1.6.0
BuildRequires: maven-doxia-sitetools BuildRequires: maven-doxia-sitetools
BuildRequires: maven-plugin-bundle BuildRequires: maven-changes-plugin
BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-surefire-provider-junit BuildRequires: maven-surefire-provider-junit
BuildRequires: maven2-plugin-antrun BuildRequires: maven-surefire-provider-junit4
BuildRequires: maven2-plugin-assembly BuildRequires: maven-plugin-build-helper
BuildRequires: maven2-plugin-compiler BuildRequires: apache-commons-parent
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-idea
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-resources
Requires: java >= 1:1.6.0 Requires: java >= 1:1.6.0
Requires: jpackage-utils >= 0:1.7.2 Requires: jpackage-utils >= 0:1.7.2
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)
Provides: jakarta-%{short_name} = 0:%{version}-%{release} Provides: jakarta-%{short_name} = 0:%{version}-%{release}
Obsoletes: jakarta-%{short_name} < 0:2.0-3 Obsoletes: jakarta-%{short_name} < 0:2.0-3
@ -68,36 +61,25 @@ mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_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 $RPM_BUILD_ROOT%{_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 $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
ln -s %{name}.jar $RPM_BUILD_ROOT%{_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 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{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 %{name}
# following line is only for backwards compatibility. New packages # following line is only for backwards compatibility. New packages
# should use proper groupid org.apache.commons and also artifactid # should use proper groupid org.apache.commons and also artifactid
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name} %add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{name}
# javadoc # javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post %post
%update_maven_depmap %update_maven_depmap
@ -105,20 +87,29 @@ rm -rf $RPM_BUILD_ROOT
%postun %postun
%update_maven_depmap %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,-) %defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt %doc LICENSE.txt NOTICE.txt
%{_javadir}/* %{_javadir}/*
%{_mavenpomdir}/JPP-%{short_name}.pom %{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir} %{_mavendepmapfragdir}
%files javadoc %files javadoc
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name} %doc %{_javadocdir}/%{name}
%doc LICENSE.txt NOTICE.txt %doc LICENSE.txt NOTICE.txt
%changelog %changelog
* Fri Dec 10 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.2-1
- Replace maven plugins with apache-commons-parent for BR
- Versionless jars and javadocs
- Rebase to latest upstream version
* Thu Jul 8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-6 * Thu Jul 8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-6
- Add license to javadoc subpackage - Add license to javadoc subpackage

View File

@ -1 +1 @@
583630202369df3cf996cbdba4d8634b commons-net-2.0-src.tar.gz e52a248454857af78784dad1f5a94d87 commons-net-2.2-src.tar.gz