Rebase to latest upstream version
- Replace maven plugins with apache-commons-parent for BR - Versionless jars and javadocs
This commit is contained in:
parent
e8bd503287
commit
0047ba2a54
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
commons-net-2.0-src.tar.gz
|
||||
/commons-net-2.2-src.tar.gz
|
||||
|
@ -3,8 +3,8 @@
|
||||
%global short_name commons-%{base_name}
|
||||
|
||||
Name: apache-%{short_name}
|
||||
Version: 2.0
|
||||
Release: 6%{?dist}
|
||||
Version: 2.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Internet protocol suite Java library
|
||||
License: ASL 2.0
|
||||
Group: Development/Libraries
|
||||
@ -14,24 +14,17 @@ BuildArch: noarch
|
||||
BuildRequires: jpackage-utils >= 0:1.7.2
|
||||
BuildRequires: java-devel >= 1:1.6.0
|
||||
BuildRequires: maven-doxia-sitetools
|
||||
BuildRequires: maven-plugin-bundle
|
||||
BuildRequires: maven-surefire-maven-plugin
|
||||
BuildRequires: maven-changes-plugin
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
BuildRequires: maven2-plugin-antrun
|
||||
BuildRequires: maven2-plugin-assembly
|
||||
BuildRequires: maven2-plugin-compiler
|
||||
BuildRequires: maven2-plugin-install
|
||||
BuildRequires: maven2-plugin-idea
|
||||
BuildRequires: maven2-plugin-jar
|
||||
BuildRequires: maven2-plugin-javadoc
|
||||
BuildRequires: maven2-plugin-resources
|
||||
BuildRequires: maven-surefire-provider-junit4
|
||||
BuildRequires: maven-plugin-build-helper
|
||||
BuildRequires: apache-commons-parent
|
||||
|
||||
Requires: java >= 1:1.6.0
|
||||
Requires: jpackage-utils >= 0:1.7.2
|
||||
Requires(post): jpackage-utils
|
||||
Requires(postun): jpackage-utils
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Provides: jakarta-%{short_name} = 0:%{version}-%{release}
|
||||
Obsoletes: jakarta-%{short_name} < 0:2.0-3
|
||||
@ -68,36 +61,25 @@ mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_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
|
||||
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
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
|
||||
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{name}
|
||||
|
||||
# following line is only for backwards compatibility. New packages
|
||||
# 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
|
||||
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 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
@ -105,20 +87,29 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%postun
|
||||
%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
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt NOTICE.txt
|
||||
%{_javadir}/*
|
||||
%{_mavenpomdir}/JPP-%{short_name}.pom
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%{_mavendepmapfragdir}
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_javadocdir}/%{name}-%{version}
|
||||
%doc %{_javadocdir}/%{name}
|
||||
%doc LICENSE.txt NOTICE.txt
|
||||
|
||||
%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
|
||||
- Add license to javadoc subpackage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user