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