use %%{mono_archs} instead of hardcoding list
This commit is contained in:
parent
40d74dcd6f
commit
779d7d81f0
@ -60,7 +60,8 @@
|
|||||||
version="true"
|
version="true"
|
||||||
packagenames="${packagenames}"
|
packagenames="${packagenames}"
|
||||||
splitindex="true"
|
splitindex="true"
|
||||||
use="true">
|
use="true"
|
||||||
|
additionalparam="-Xdoclint:none">
|
||||||
<link href="${j2se.apidoc}"/>
|
<link href="${j2se.apidoc}"/>
|
||||||
</javadoc>
|
</javadoc>
|
||||||
</target>
|
</target>
|
||||||
|
167
antlr.spec
167
antlr.spec
@ -1,35 +1,34 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
# since we have only a static library
|
# since we have only a static library
|
||||||
|
|
||||||
Summary: ANother Tool for Language Recognition
|
Summary: ANother Tool for Language Recognition
|
||||||
Name: antlr
|
Name: antlr
|
||||||
Version: 2.7.7
|
Version: 2.7.7
|
||||||
Release: 37%{?dist}
|
Release: 39%{?dist}
|
||||||
Epoch: 0
|
Epoch: 0
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
URL: http://www.antlr.org/
|
URL: http://www.antlr.org/
|
||||||
Group: Development/Tools
|
Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz
|
||||||
Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz
|
Source1: %{name}-build.xml
|
||||||
Source1: %{name}-build.xml
|
Source2: %{name}-script
|
||||||
Source2: %{name}-script
|
Source3: http://repo2.maven.org/maven2/antlr/antlr/%{version}/%{name}-%{version}.pom
|
||||||
Source3: http://repo2.maven.org/maven2/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
Patch1: %{name}-%{version}-newgcc.patch
|
||||||
Patch1: %{name}-%{version}-newgcc.patch
|
|
||||||
# see BZ#848662
|
# see BZ#848662
|
||||||
Patch2: antlr-examples-license.patch
|
Patch2: antlr-examples-license.patch
|
||||||
|
|
||||||
%ifarch %ix86 x86_64 ia64 armv4l sparcv9 alpha s390x ppc ppc64
|
%ifarch %{mono_arches}
|
||||||
%if ! 0%{?rhel} >= 6
|
%if ! 0%{?rhel} >= 6
|
||||||
BuildRequires: mono-core
|
BuildRequires: mono-core
|
||||||
BuildRequires: mono-winforms
|
BuildRequires: mono-winforms
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: java-javadoc
|
BuildRequires: java-devel >= 1:1.7.0
|
||||||
BuildRequires: jpackage-utils
|
BuildRequires: java-javadoc
|
||||||
BuildRequires: java-devel >= 1:1.7.0
|
BuildRequires: javapackages-local
|
||||||
|
BuildRequires: doxygen
|
||||||
Requires: jpackage-utils
|
BuildRequires: python2-devel
|
||||||
Requires: java-headless >= 1:1.7.0
|
BuildRequires: python-setuptools
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
|
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
|
||||||
@ -38,64 +37,53 @@ compilers, and translators from grammatical descriptions containing
|
|||||||
C++ or Java actions [You can use PCCTS 1.xx to generate C-based
|
C++ or Java actions [You can use PCCTS 1.xx to generate C-based
|
||||||
parsers].
|
parsers].
|
||||||
|
|
||||||
%package tool
|
%package tool
|
||||||
Group: Development/Tools
|
Summary: ANother Tool for Language Recognition
|
||||||
Summary: ANother Tool for Language Recognition
|
Provides: %{name} = %{version}-%{release}
|
||||||
Provides: %{name} = %{version}-%{release}
|
Obsoletes: %{name} < %{version}-%{release}
|
||||||
Obsoletes: %{name} < %{version}-%{release}
|
BuildArch: noarch
|
||||||
Requires: jpackage-utils
|
|
||||||
Requires: java-headless >= 1:1.7.0
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description tool
|
%description tool
|
||||||
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
|
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
|
||||||
language tool that provides a framework for constructing recognizers,
|
language tool that provides a framework for constructing recognizers,
|
||||||
compilers, and translators from grammatical descriptions containing
|
compilers, and translators from grammatical descriptions containing
|
||||||
C++ or Java actions [You can use PCCTS 1.xx to generate C-based
|
C++ or Java actions [You can use PCCTS 1.xx to generate C-based
|
||||||
parsers].
|
parsers].
|
||||||
|
|
||||||
%package manual
|
%package manual
|
||||||
Group: Development/Tools
|
Summary: Manual for %{name}
|
||||||
Summary: Manual for %{name}
|
BuildArch: noarch
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description manual
|
%description manual
|
||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Group: Documentation
|
Summary: Javadoc for %{name}
|
||||||
Summary: Javadoc for %{name}
|
BuildArch: noarch
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
Javadoc for %{name}.
|
Javadoc for %{name}.
|
||||||
|
|
||||||
%package C++
|
%package C++
|
||||||
Group: Development/Libraries
|
Summary: C++ bindings for antlr2 generated parsers
|
||||||
Summary: C++ bindings for antlr2 generated parsers
|
Provides: antlr-static = %{version}-%{release}
|
||||||
Provides: antlr-static = %{version}-%{release}
|
|
||||||
|
|
||||||
%description C++
|
%description C++
|
||||||
This package provides a static C++ library for parsers generated by ANTLR2.
|
This package provides a static C++ library for parsers generated by ANTLR2.
|
||||||
|
|
||||||
%package C++-doc
|
%package C++-doc
|
||||||
Group: Documentation
|
Summary: Documentation for C++ bindings for antlr2 generated parsers
|
||||||
Summary: Documentation for C++ bindings for antlr2 generated parsers
|
BuildArch: noarch
|
||||||
BuildRequires: doxygen
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description C++-doc
|
%description C++-doc
|
||||||
This package contains the documentation for the C++ bindings for parsers
|
This package contains the documentation for the C++ bindings for parsers
|
||||||
generated by ANTLR2.
|
generated by ANTLR2.
|
||||||
|
|
||||||
%package python
|
%package python
|
||||||
Group: Development/Libraries
|
Summary: Python runtime support for ANTLR-generated parsers
|
||||||
Summary: Python runtime support for ANTLR-generated parsers
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description python
|
%description python
|
||||||
Python runtime support for ANTLR-generated parsers
|
Python runtime support for ANTLR-generated parsers
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -108,13 +96,18 @@ cp -p %{SOURCE1} build.xml
|
|||||||
# CRLF->LF
|
# CRLF->LF
|
||||||
sed -i 's/\r//' LICENSE.txt
|
sed -i 's/\r//' LICENSE.txt
|
||||||
|
|
||||||
|
# set jar location
|
||||||
|
%mvn_file %{name}:%{name} %{name}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
ant -Dj2se.apidoc=%{_javadocdir}/java
|
ant -Dj2se.apidoc=%{_javadocdir}/java
|
||||||
cp work/lib/antlr.jar . # make expects to find it here
|
# make expects to find it here
|
||||||
|
cp work/lib/antlr.jar .
|
||||||
export CLASSPATH=.
|
export CLASSPATH=.
|
||||||
%configure --without-examples
|
%configure --without-examples
|
||||||
make CXXFLAGS="${CXXFLAGS} -fPIC" DEBUG=1 verbose=1
|
make CXXFLAGS="${CXXFLAGS} -fPIC" DEBUG=1 verbose=1
|
||||||
rm antlr.jar # no longer needed
|
# no longer needed
|
||||||
|
rm antlr.jar
|
||||||
|
|
||||||
# fix doc permissions and remove Makefiles
|
# fix doc permissions and remove Makefiles
|
||||||
rm doc/{Makefile,Makefile.in}
|
rm doc/{Makefile,Makefile.in}
|
||||||
@ -122,8 +115,8 @@ chmod 0644 doc/*
|
|||||||
|
|
||||||
# generate doxygen docs for C++ bindings
|
# generate doxygen docs for C++ bindings
|
||||||
pushd lib/cpp
|
pushd lib/cpp
|
||||||
doxygen doxygen.cfg
|
doxygen doxygen.cfg
|
||||||
find gen_doc -type f -exec chmod 0644 {} \;
|
find gen_doc -type f -exec chmod 0644 {} \;
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# build python
|
# build python
|
||||||
@ -132,67 +125,65 @@ cd lib/python
|
|||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
# jars, POM and depmap
|
||||||
|
%mvn_artifact %{SOURCE3} work/lib/%{name}.jar
|
||||||
|
%mvn_alias %{name}:%{name} %{name}:%{name}all
|
||||||
|
%mvn_install -J work/api
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}}
|
mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}}
|
||||||
|
|
||||||
# jars
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
|
||||||
cp -p work/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
|
||||||
|
|
||||||
# script
|
# script
|
||||||
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr
|
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr
|
||||||
|
|
||||||
# C++ lib and headers, antlr-config
|
# C++ lib and headers, antlr-config
|
||||||
|
|
||||||
install -p -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{_includedir}/%{name}
|
install -p -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{_includedir}/%{name}
|
||||||
install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir}
|
install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir}
|
||||||
install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir}
|
install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir}
|
||||||
|
|
||||||
# javadoc
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
cp -pr work/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
|
|
||||||
# python
|
# python
|
||||||
cd lib/python
|
cd lib/python
|
||||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
# POM and depmap
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
|
||||||
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
|
|
||||||
%add_maven_depmap -a antlr:antlrall
|
|
||||||
|
|
||||||
%files tool -f .mfiles
|
%files tool -f .mfiles
|
||||||
%doc LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{_javadir}/%{name}.jar
|
|
||||||
%{_bindir}/antlr
|
%{_bindir}/antlr
|
||||||
|
|
||||||
# this is actually a development package for the C++ target
|
# this is actually a development package for the C++ target
|
||||||
# as we ship only a static library, it doesn't make sense
|
# as we ship only a static library, it doesn't make sense
|
||||||
# to have a separate -devel package for the headers
|
# to have a separate -devel package for the headers
|
||||||
%files C++
|
%files C++
|
||||||
%doc LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{_includedir}/%{name}
|
%{_includedir}/%{name}
|
||||||
%{_libdir}/libantlr.a
|
%{_libdir}/libantlr.a
|
||||||
%{_bindir}/antlr-config
|
%{_bindir}/antlr-config
|
||||||
|
|
||||||
%files C++-doc
|
%files C++-doc
|
||||||
%doc LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc lib/cpp/gen_doc/html/
|
%doc lib/cpp/gen_doc/html/
|
||||||
|
|
||||||
%files manual
|
%files manual
|
||||||
%doc LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc doc/*
|
%doc doc/*
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc -f .mfiles-javadoc
|
||||||
%doc LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc %{_javadocdir}/%{name}
|
|
||||||
|
|
||||||
%files python
|
%files python
|
||||||
%doc LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{python_sitelib}/antlr/*
|
%{python_sitelib}/antlr/*
|
||||||
%{python_sitelib}/antlr-*
|
%{python_sitelib}/antlr-*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 02 2015 gil cattaneo <puntogil@libero.it> 0:2.7.7-39
|
||||||
|
- adapt to current guideline
|
||||||
|
- remove some rpmlint problems
|
||||||
|
- disable javadoc doclint
|
||||||
|
- introduce license macro
|
||||||
|
|
||||||
|
* Fri Aug 21 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 0:2.7.7-38
|
||||||
|
- use %%{mono_archs} instead of hardcoding list (rhbz#1255726)
|
||||||
|
|
||||||
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.7.7-37
|
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.7.7-37
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user