Accepting request 1114349 from Java:packages:test

simplify

OBS-URL: https://build.opensuse.org/request/show/1114349
OBS-URL: https://build.opensuse.org/package/show/Java:packages/antlr?expand=0&rev=78
This commit is contained in:
Fridrich Strba 2023-09-29 13:05:15 +00:00 committed by Git OBS Bridge
parent 7f3ea5c136
commit 2cca62e761
2 changed files with 9 additions and 19 deletions

View File

@ -99,9 +99,8 @@ delBinaryFiles
%install %install
install -d -m 0755 %{buildroot}%{_javadir} install -d -m 0755 %{buildroot}%{_javadir}
install -m 0644 %{name}.jar %{buildroot}%{_javadir}/ install -m 0644 %{name}.jar %{buildroot}%{_javadir}/
ln -s -f %{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{name}-%{version}.jar
%files %files
%{_javadir}/%{name}*.jar %{_javadir}/%{name}.jar
%changelog %changelog

View File

@ -27,7 +27,7 @@ URL: https://www.antlr.org/
Source0: antlr-%{version}.tar.bz2 Source0: antlr-%{version}.tar.bz2
Source1: %{name}-build.xml Source1: %{name}-build.xml
Source2: %{name}-script Source2: %{name}-script
Source3: http://repo2.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom Source3: https://repo1.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom
Source1000: antlr-rpmlintrc Source1000: antlr-rpmlintrc
Patch0: %{name}-jedit.patch Patch0: %{name}-jedit.patch
Patch1: gcc45fix.diff Patch1: gcc45fix.diff
@ -35,7 +35,7 @@ Patch2: fix-docpath.diff
BuildRequires: ant BuildRequires: ant
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: java-devel >= 1.8 BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local BuildRequires: javapackages-local >= 6
BuildRequires: xml-commons-apis BuildRequires: xml-commons-apis
Requires: %{name}-java Requires: %{name}-java
Provides: %{name}-bootstrap = %{version} Provides: %{name}-bootstrap = %{version}
@ -130,7 +130,7 @@ ant \
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \ -Dant.build.javac.source=8 -Dant.build.javac.target=8 \
jar jar
%configure --without-examples %configure --without-examples
make -j1 %make_build -j1
%if %{with python2} %if %{with python2}
%py_compile lib/python/antlr %py_compile lib/python/antlr
@ -139,16 +139,14 @@ make -j1
%install %install
### jars ### ### jars ###
install -d -m 0755 %{buildroot}%{_javadir} install -d -m 0755 %{buildroot}%{_javadir}
cp -a work/lib/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar install -pm 0644 work/lib/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -s -f ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# compat symlink
install -d -m 0755 %{buildroot}%{_datadir}/%{name}-%{version}/ install -d -m 0755 %{buildroot}%{_datadir}/%{name}-%{version}/
ln -s -f %{_javadir}/%{name}-%{version}.jar %{buildroot}%{_datadir}/%{name}-%{version}/%{name}.jar ln -s -f %{_javadir}/%{name}.jar %{buildroot}%{_datadir}/%{name}-%{version}/%{name}.jar
### pom ### ### pom ###
install -d -m 0755 %{buildroot}%{_mavenpomdir} install -d -m 0755 %{buildroot}%{_mavenpomdir}
install -pm 0644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom %{mvn_install_pom} %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar -a %{name}:%{name}all -f java %add_maven_depmap %{name}-%{version}.pom %{name}.jar -a %{name}:%{name}all -f java
### scripts ### ### scripts ###
install -d -m 0755 %{buildroot}%{_bindir}/ install -d -m 0755 %{buildroot}%{_bindir}/
@ -178,16 +176,9 @@ find doc -type f | xargs chmod 0644
%{_bindir}/antlr %{_bindir}/antlr
%{_bindir}/antlr-config %{_bindir}/antlr-config
%files java %files java -f .mfiles-java
%dir %{_datadir}/%{name}-%{version} %dir %{_datadir}/%{name}-%{version}
%{_datadir}/%{name}-%{version}/*jar %{_datadir}/%{name}-%{version}/*jar
%{_javadir}/%{name}*.jar
%{_mavenpomdir}/*
%if %{defined _maven_repository}
%config(noreplace) %{_mavendepmapfragdir}/%{name}-java
%else
%{_datadir}/maven-metadata/%{name}-java.xml
%endif
%files manual %files manual
%doc doc %doc doc