!4 Fixed the blockage of using the 'grep -n' command when xpp3 .xml does not exist

From: @zhangwenlong01 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
This commit is contained in:
openeuler-ci-bot 2023-03-13 07:27:56 +00:00 committed by Gitee
commit f4e37c1caf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: xpp3
Version: 1.1.4
Release: 21
Release: 22
License: ASL 1.1
Summary: Xml Pull Parser 3rd Edition
URL: http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/index.html
@ -39,11 +39,13 @@ ant xpp3 junit apidoc
jar ufm build/xpp3-1.1.4c.jar %{SOURCE4}
%install
ret=0
%if 0%(find %{_buildrootdir} -name xpp3.xml)
for line in `grep -n uuid $(find %{_buildrootdir} -name xpp3.xml) | cut -d \: -f 1`
do
sed -i "${line}s/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/f2f42549-cfab-4d71-be48-5e9f9a41e5f${ret}/g" $(find %{_buildrootdir} -name xpp3.xml)
ret=`expr $ret + 1`
done
%endif
%mvn_file ':{*}' @1
%mvn_package :xpp3_min minimal
%mvn_artifact %{SOURCE1} build/xpp3-1.1.4c.jar
@ -58,5 +60,8 @@ done
%files help -f .mfiles-javadoc
%changelog
* Mon Mar 13 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 1.1.4-22
- Fixed the blockage of using the 'grep -n' command when xpp3 .xml does not exist
* Tue Dec 3 2019 Ling Yang <lingyang2@huawei.com> - 1.1.4-20
- Package init