Do not install versioned jar (#1022080)

- Install LICENSE files in each independent subpackage
- Minor spec cleanups
This commit is contained in:
Stanislav Ochotnicky 2013-11-11 09:00:20 +01:00
parent 8ef11388e2
commit 2d9bcda017

View File

@ -4,7 +4,7 @@
Summary: ANother Tool for Language Recognition
Name: antlr
Version: 2.7.7
Release: 28%{?dist}
Release: 29%{?dist}
Epoch: 0
License: Public Domain
URL: http://www.antlr.org/
@ -16,7 +16,6 @@ Source3: http://repo2.maven.org/maven2/%{name}/%{name}/%{version}
Patch1: %{name}-%{version}-newgcc.patch
# see BZ#848662
Patch2: antlr-examples-license.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%ifarch %ix86 x86_64 ia64 armv4l sparcv9 alpha s390x ppc ppc64
%if ! 0%{?rhel} >= 6
@ -133,13 +132,11 @@ cd lib/python
cd ../../
%install
rm -rf $RPM_BUILD_ROOT
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}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
cp -p work/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
# script
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr
@ -151,9 +148,8 @@ install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir}
install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir}
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr work/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr work/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# python
cd lib/python
@ -165,13 +161,9 @@ 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
%clean
rm -rf $RPM_BUILD_ROOT
%files tool
%defattr(-,root,root,-)
%doc LICENSE.txt
%{_javadir}/%{name}*.jar
%{_javadir}/%{name}.jar
%{_bindir}/antlr
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
@ -180,30 +172,34 @@ rm -rf $RPM_BUILD_ROOT
# as we ship only a static library, it doesn't make sense
# to have a separate -devel package for the headers
%files C++
%defattr(-,root,root,-)
%doc LICENSE.txt
%{_includedir}/%{name}
%{_libdir}/libantlr.a
%{_bindir}/antlr-config
%files C++-doc
%defattr(-,root,root,-)
%doc LICENSE.txt
%doc lib/cpp/gen_doc/html/
%files manual
%defattr(-,root,root,-)
%doc LICENSE.txt
%doc doc/*
%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%doc LICENSE.txt
%doc %{_javadocdir}/%{name}
%files python
%defattr(-,root,root,-)
%doc LICENSE.txt
%{python_sitelib}/antlr/*
%{python_sitelib}/antlr-*
%changelog
* Mon Nov 11 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:2.7.7-29
- Do not install versioned jar (#1022080)
- Install LICENSE files in each independent subpackage
- Minor spec cleanups
* Fri Nov 08 2013 Marek Goldmann <mgoldman@redhat.com> - 0:2.7.7-28
- Rebuild