Update to current packaging guidelines

This commit is contained in:
Mikolaj Izdebski 2013-07-02 06:45:12 +02:00
parent 4f6293f6b5
commit 2f0d532518

View File

@ -347,7 +347,6 @@ Documentation pour %{name}.
%package javadoc
Summary: Javadoc for %{name}
Requires: jpackage-utils
%description javadoc
Javadoc for %{name}.
@ -418,29 +417,26 @@ do
jarname=$(basename $jar .jar)
pomname="JPP.%{name}-${jarname}.pom"
#Determine where to put it
case $jarname in
#These go into %%{_javadir}, pom files have different names
ant | ant-bootstrap | ant-launcher) destdir=$RPM_BUILD_ROOT%{_javadir}; destname="";pomname="JPP-$jarname.pom";;
#Bootstracp builds an incomplete ant-junit, don't ship it
%if %with bootstrap
ant-junit) continue;;
#Bootstracp builds an incomplete ant-junit, don't ship it
[ $jarname == ant-bootstrap ] && continue
%endif
#These go into %%{_javadir}/ant
*) destdir=$RPM_BUILD_ROOT%{_javadir}/%{name}; destname="/%{name}";
esac
#instal jar
install -m 644 ${jar} ${destdir}/${jarname}.jar
install -m 644 ${jar} $RPM_BUILD_ROOT%{_javadir}/%{name}/${jarname}.jar
# jar aliases
ln -sf ../../java${destname}/${jarname}.jar $RPM_BUILD_ROOT%{ant_home}/lib/${jarname}.jar
ln -sf ../../java/%{name}/${jarname}.jar $RPM_BUILD_ROOT%{ant_home}/lib/${jarname}.jar
#bootstrap does not have a pom
[ $jarname == ant-bootstrap ] && continue
#install pom
install -m 644 src/etc/poms/${jarname}/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/${pomname}
%add_to_maven_depmap org.apache.ant ${jarname} %{version} JPP${destname} ${jarname}
install -p -m 644 src/etc/poms/${jarname}/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/${pomname}
%add_maven_depmap ${pomname} %{name}/${jarname}.jar
done
for mod in ant ant-bootstrap ant-launcher; do
ln -sf %{name}/${mod}.jar $RPM_BUILD_ROOT%{_javadir}
done
# add backward compatibility for nodeps jar that is now part of
@ -448,8 +444,8 @@ done
%add_to_maven_depmap org.apache.ant ant-nodeps %{version} JPP ant
#ant-parent pom
install -m 644 src/etc/poms/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-parent.pom
%add_to_maven_depmap org.apache.ant ant-parent %{version} JPP ant-parent
install -p -m 644 src/etc/poms/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-parent.pom
%add_maven_depmap JPP-%{name}-parent.pom
# scripts: remove dos and os/2 scripts
rm -f src/script/*.bat
@ -524,6 +520,9 @@ find $RPM_BUILD_ROOT%{_datadir}/ant/etc -type f -name "*.xsl" \
%{_javadir}/%{name}-launcher.jar
%{_javadir}/%{name}-bootstrap.jar
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/%{name}.jar
%{_javadir}/%{name}/%{name}-launcher.jar
%{_javadir}/%{name}/%{name}-bootstrap.jar
%dir %{ant_home}
%dir %{ant_home}/etc
%{ant_home}/etc/ant-update.xsl
@ -682,6 +681,7 @@ find $RPM_BUILD_ROOT%{_datadir}/ant/etc -type f -name "*.xsl" \
- Remove arch-specific patch as ant is noarch now
- Remove bcond macro definitions (provided by rpm itself)
- Remove Group tags
- Update to current packaging guidelines
* Mon Jun 03 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.9.1-2
- Enable unit tests