- Use original upstream tarball, prebuilt jars are anyway removed in %%prep
- Don't overuse macros - Added explanation about headers in the C++ subpackage - Remove unnecessary Makefile and Makefile.in from %%docs, permissions fixed - Added doxygen docs for C++ as a -C++-doc subpackage - antlr-config moved into the C++ subpackage - Removed %%post and %%postun javadoc relicts from JPackage
This commit is contained in:
parent
128afbd32e
commit
07b0a4f6c7
@ -1 +1 @@
|
|||||||
antlr-2.7.7-RHCLEAN.tar.gz
|
antlr-2.7.7.tar.gz
|
||||||
|
63
antlr.spec
63
antlr.spec
@ -4,13 +4,12 @@
|
|||||||
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: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
Epoch: 0
|
Epoch: 0
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
URL: http://www.antlr.org/
|
URL: http://www.antlr.org/
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
#http://www.antlr.org/download/antlr-%{version}.tar.gz
|
Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz
|
||||||
Source0: antlr-%{version}-RHCLEAN.tar.gz
|
|
||||||
Source1: %{name}-build.xml
|
Source1: %{name}-build.xml
|
||||||
Source2: %{name}-script
|
Source2: %{name}-script
|
||||||
Patch1: %{name}-%{version}-newgcc.patch
|
Patch1: %{name}-%{version}-newgcc.patch
|
||||||
@ -72,13 +71,24 @@ 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
|
||||||
|
Group: Documentation
|
||||||
|
Summary: Documentation for C++ bindings for antlr2 generated parsers
|
||||||
|
BuildRequires: doxygen
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description C++-doc
|
||||||
|
This package contains the documentation for the C++ bindings for parsers
|
||||||
|
generated by ANTLR2.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
# remove all binary libs
|
# remove all binary libs
|
||||||
find . -name "*.jar" -exec rm -f {} \;
|
find . -name "*.jar" -exec rm -f {} \;
|
||||||
cp -p %{SOURCE1} build.xml
|
cp -p %{SOURCE1} build.xml
|
||||||
|
|
||||||
%patch1
|
%patch1
|
||||||
|
# CRLF->LF
|
||||||
|
sed -i 's/\r//' LICENSE.txt
|
||||||
|
|
||||||
%build
|
%build
|
||||||
ant -Dj2se.apidoc=%{_javadocdir}/java
|
ant -Dj2se.apidoc=%{_javadocdir}/java
|
||||||
@ -86,15 +96,21 @@ cp work/lib/antlr.jar . # make expects to find it here
|
|||||||
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
|
||||||
|
|
||||||
find . -type f > /tmp/antlr.filelist
|
|
||||||
rm antlr.jar # no longer needed
|
rm antlr.jar # no longer needed
|
||||||
|
|
||||||
|
# fix doc permissions and remove Makefiles
|
||||||
|
rm doc/{Makefile,Makefile.in}
|
||||||
|
chmod 0644 doc/*
|
||||||
|
|
||||||
|
# generate doxygen docs for C++ bindings
|
||||||
|
pushd lib/cpp
|
||||||
|
doxygen doxygen.cfg
|
||||||
|
find gen_doc -type f -exec chmod 0644 {} \;
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
%global headers %{_includedir}/%{name}
|
mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}}
|
||||||
mkdir -p $RPM_BUILD_ROOT{%{headers},%{_libdir},%{_bindir}}
|
|
||||||
|
|
||||||
# jars
|
# jars
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||||||
@ -106,7 +122,7 @@ 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%{headers}
|
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}
|
||||||
|
|
||||||
@ -118,26 +134,24 @@ ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%post javadoc
|
|
||||||
rm -f %{_javadocdir}/%{name}
|
|
||||||
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
|
||||||
|
|
||||||
%postun javadoc
|
|
||||||
if [ $1 -eq 0 ]; then
|
|
||||||
%{__rm} -f %{_javadocdir}/%{name}
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files tool
|
%files tool
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc INSTALL.txt LICENSE.txt
|
%doc INSTALL.txt LICENSE.txt
|
||||||
%{_javadir}/%{name}*.jar
|
%{_javadir}/%{name}*.jar
|
||||||
%{_bindir}/antlr-config
|
|
||||||
%{_bindir}/antlr
|
%{_bindir}/antlr
|
||||||
|
|
||||||
|
# this is actually a development package for the C++ target
|
||||||
|
# as we ship only a static library, it doesn't make sense
|
||||||
|
# to have a separate -devel package for the headers
|
||||||
%files C++
|
%files C++
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{headers}
|
%{_includedir}/%{name}
|
||||||
%{_libdir}/libantlr.a
|
%{_libdir}/libantlr.a
|
||||||
|
%{_bindir}/antlr-config
|
||||||
|
|
||||||
|
%files C++-doc
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc lib/cpp/gen_doc/html/
|
||||||
|
|
||||||
%files manual
|
%files manual
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -149,6 +163,15 @@ fi
|
|||||||
%doc %{_javadocdir}/%{name}
|
%doc %{_javadocdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 29 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0:2.7.7-10
|
||||||
|
- Use original upstream tarball, prebuilt jars are anyway removed in %%prep
|
||||||
|
- Don't overuse macros
|
||||||
|
- Added explanation about headers in the C++ subpackage
|
||||||
|
- Remove unnecessary Makefile and Makefile.in from %%docs, permissions fixed
|
||||||
|
- Added doxygen docs for C++ as a -C++-doc subpackage
|
||||||
|
- antlr-config moved into the C++ subpackage
|
||||||
|
- Removed %%post and %%postun javadoc relicts from JPackage
|
||||||
|
|
||||||
* Tue Apr 27 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0:2.7.7-9
|
* Tue Apr 27 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0:2.7.7-9
|
||||||
- Drop native build, alternatives, jedit, gcj bits and other jpackage crap
|
- Drop native build, alternatives, jedit, gcj bits and other jpackage crap
|
||||||
- Disable debuginfo since we have only a static library.
|
- Disable debuginfo since we have only a static library.
|
||||||
|
Loading…
Reference in New Issue
Block a user