forked from pool/antlr
- Add condition about python2 module, the rewrite happened in antlr4
for python3 support and it is completely different than the antlr2 * The python module is not used by any package in TW bsc#1068226 OBS-URL: https://build.opensuse.org/package/show/Java:packages/antlr?expand=0&rev=50
This commit is contained in:
parent
5e700c6688
commit
cfe1af7e17
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package antlr-bootstrap
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 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
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 12 11:53:47 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Add condition about python2 module, the rewrite happened in antlr4
|
||||
for python3 support and it is completely different than the antlr2
|
||||
* The python module is not used by any package in TW bsc#1068226
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 7 14:35:50 UTC 2017 - dimstar@opensuse.org
|
||||
|
||||
|
16
antlr.spec
16
antlr.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package antlr
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 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
|
||||
@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without python2
|
||||
Name: antlr
|
||||
Version: 2.7.7
|
||||
Release: 0
|
||||
@ -36,7 +37,9 @@ BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: java-devel >= 1.6
|
||||
BuildRequires: javapackages-tools
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-base
|
||||
%endif
|
||||
BuildRequires: xml-commons-apis
|
||||
Requires: %{name}-java
|
||||
Provides: %{name}-bootstrap = %{version}
|
||||
@ -124,7 +127,9 @@ ant \
|
||||
jar
|
||||
%configure
|
||||
make -j1
|
||||
%if %{with python}
|
||||
%py_compile lib/python/antlr
|
||||
%endif
|
||||
|
||||
%install
|
||||
#### jars ###
|
||||
@ -141,14 +146,17 @@ install -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}
|
||||
install -m 0755 scripts/%{name}-config %{buildroot}%{_bindir}/
|
||||
|
||||
### python runtime ###
|
||||
%if %{with python2}
|
||||
install -d -m 0755 %{buildroot}%{py_sitedir}/%{name}
|
||||
cp -a lib/python/antlr/* %{buildroot}%{py_sitedir}/%{name}
|
||||
# compat symlink
|
||||
ln -s -f %{py_sitedir}/%{name}/*.py %{buildroot}%{_datadir}/%{name}-%{version}/
|
||||
ln -s -f %{py_sitedir}/%{name}/*.pyc %{buildroot}%{_datadir}/%{name}-%{version}/
|
||||
%endif
|
||||
|
||||
### cpp runtime ###
|
||||
install -m 0644 lib/cpp/src/lib%{name}.a %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
install -m 0755 lib/cpp/src/lib%{name}.a %{buildroot}%{_libdir}
|
||||
install -d -m 0755 %{buildroot}%{_includedir}/%{name}
|
||||
install -m 0644 lib/cpp/%{name}/*hpp %{buildroot}%{_includedir}/%{name}
|
||||
|
||||
@ -173,13 +181,15 @@ find doc -type f | xargs chmod 0644
|
||||
%doc doc examples
|
||||
|
||||
%files devel
|
||||
%attr(755,root,root) %{_libdir}/libantlr.a
|
||||
%{_libdir}/libantlr.a
|
||||
%{_includedir}/%{name}
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python-%{name}
|
||||
%dir %{_datadir}/%{name}-%{version}
|
||||
%{_datadir}/%{name}-%{version}/*py
|
||||
%{_datadir}/%{name}-%{version}/*pyc
|
||||
%{py_sitedir}/%{name}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user