ea707bce16
OBS-URL: https://build.opensuse.org/request/show/730041 OBS-URL: https://build.opensuse.org/package/show/Java:packages/antlr3?expand=0&rev=1
104 lines
3.1 KiB
RPMSpec
104 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package antlr3-java
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global antlr_version 3.5.2
|
|
Name: antlr3-java
|
|
Version: %{antlr_version}
|
|
Release: 0
|
|
Summary: Java run-time support for ANTLR-generated parsers
|
|
License: BSD
|
|
Group: Development/Libraries/Java
|
|
URL: https://www.antlr3.org/
|
|
Source0: https://github.com/antlr/antlr3/archive/%{antlr_version}.tar.gz
|
|
Patch0: 0001-java8-fix.patch
|
|
# Generate OSGi metadata
|
|
Patch1: osgi-manifest.patch
|
|
BuildRequires: fdupes
|
|
BuildRequires: maven-local
|
|
BuildRequires: mvn(antlr:antlr)
|
|
BuildRequires: mvn(org.antlr:stringtemplate)
|
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
|
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
|
|
BuildRequires: unzip
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Java run-time support for ANTLR-generated parsers
|
|
|
|
%package javadoc
|
|
Summary: API documentation for %{name}
|
|
Group: Documentation/HTML
|
|
BuildArch: noarch
|
|
|
|
%description javadoc
|
|
%{summary}.
|
|
|
|
%prep
|
|
%setup -q -n antlr3-%{antlr_version}
|
|
|
|
sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/main/resources/org/antlr/antlr.properties
|
|
%patch0 -p1
|
|
%patch1
|
|
|
|
%if %{without bootstrap}
|
|
# remove pre-built artifacts
|
|
find -type f -a -name *.jar -delete
|
|
find -type f -a -name *.class -delete
|
|
%endif
|
|
|
|
%pom_disable_module antlr3-maven-archetype
|
|
%pom_disable_module gunit
|
|
%pom_disable_module gunit-maven-plugin
|
|
%pom_disable_module antlr-complete
|
|
%pom_disable_module runtime/Java
|
|
|
|
%pom_remove_plugin :maven-source-plugin
|
|
%pom_remove_plugin :maven-javadoc-plugin
|
|
|
|
# compile for target 1.6, see BZ#842572
|
|
sed -i 's/jsr14/1.6/' antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml \
|
|
antlr3-maven-plugin/pom.xml \
|
|
gunit/pom.xml \
|
|
gunit-maven-plugin/pom.xml \
|
|
pom.xml \
|
|
runtime/Java/pom.xml \
|
|
tool/pom.xml
|
|
|
|
# workarounds bug in filtering (Mark invalid)
|
|
%pom_xpath_remove pom:resource/pom:filtering
|
|
|
|
%build
|
|
pushd runtime/Java
|
|
%{mvn_file} :antlr-runtime antlr3-runtime
|
|
%{mvn_build} -f
|
|
popd
|
|
|
|
%install
|
|
pushd runtime/Java
|
|
%mvn_install
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
popd
|
|
|
|
%files -f runtime/Java/.mfiles
|
|
%license tool/LICENSE.txt
|
|
|
|
%files javadoc -f runtime/Java/.mfiles-javadoc
|
|
%license tool/LICENSE.txt
|
|
|
|
%changelog
|