- Patch Java runtime build to include OSGi meta-information in the manifest

(thanks to Mat Booth)
- Add "antlr3" prefix to all man pages to prevent namespace conflicts with
    standard man pages included in the man-pages package
- Split headers and man pages into a C-devel subpackage
- Fix multiple file ownership of Java runtime and gunit by the tool package
This commit is contained in:
Miloš Jakubíček 2010-03-09 08:11:14 +00:00
parent f25d10c974
commit 2eaaac3dad
2 changed files with 78 additions and 23 deletions

View File

@ -17,24 +17,6 @@
</plugins> </plugins>
<extensions> <extensions>
--- runtime/Java/pom.xml.orig 2010-01-29 02:13:13.000000000 +0100
+++ runtime/Java/pom.xml 2010-01-29 02:13:21.000000000 +0100
@@ -104,15 +104,6 @@
</configuration>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <findbugsXmlOutput>true</findbugsXmlOutput>
- <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
- <xmlOutput>true</xmlOutput>
- </configuration>
- </plugin>
</plugins>
</build>
--- tool/pom.xml.orig 2009-09-23 20:50:28.000000000 +0200 --- tool/pom.xml.orig 2009-09-23 20:50:28.000000000 +0200
+++ tool/pom.xml 2010-02-01 13:01:08.000000000 +0100 +++ tool/pom.xml 2010-02-01 13:01:08.000000000 +0100
@@ -75,8 +82,7 @@ @@ -75,8 +82,7 @@
@ -92,3 +74,49 @@
<!-- <!--
--- runtime/Java/pom.xml.orig 2009-09-23 20:50:28.000000000 +0200
+++ runtime/Java/pom.xml 2010-03-08 01:05:05.000000000 +0100
@@ -105,14 +105,38 @@
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
+ <artifactId>maven-jar-plugin</artifactId>
<configuration>
- <findbugsXmlOutput>true</findbugsXmlOutput>
- <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
- <xmlOutput>true</xmlOutput>
+ <archive>
+ <manifestFile>target/osgi/MANIFEST.MF</manifestFile>
+ </archive>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <excludeDependencies>true</excludeDependencies>
+ <manifestLocation>target/osgi</manifestLocation>
+ <instructions>
+ <!-- stops the "uses" clauses being added to "Export-Package" manifest entry -->
+ <_nouses>true</_nouses>
+ <Bundle-Vendor>antlr.org</Bundle-Vendor>
+ <Bundle-SymbolicName>org.antlr.runtime</Bundle-SymbolicName>
+ <Export-Package>org.antlr.*;version=${project.version}</Export-Package>
+ <Import-Package></Import-Package>
+ </instructions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>

View File

@ -9,7 +9,7 @@
Summary: ANother Tool for Language Recognition Summary: ANother Tool for Language Recognition
Name: antlr3 Name: antlr3
Version: %{antlr_version} Version: %{antlr_version}
Release: 3%{?dist} Release: 4%{?dist}
URL: http://www.antlr.org/ URL: http://www.antlr.org/
Source0: http://www.antlr.org/download/antlr-%{antlr_version}.tar.gz Source0: http://www.antlr.org/download/antlr-%{antlr_version}.tar.gz
Source1: http://www.antlr.org/download/C/libantlr3c-%{antlr_version}.tar.gz Source1: http://www.antlr.org/download/C/libantlr3c-%{antlr_version}.tar.gz
@ -29,6 +29,7 @@ BuildRoot: %{_tmppath}/%{name}-%{antlr_version}-%{release}-root-%(%{__id_u} -n
BuildRequires: java-devel >= 1:1.6.0 BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils BuildRequires: jpackage-utils
BuildRequires: maven2 BuildRequires: maven2
BuildRequires: maven-plugin-bundle
BuildRequires: maven2-plugin-resources BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-compiler BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-jar BuildRequires: maven2-plugin-jar
@ -110,6 +111,14 @@ Summary: C run-time support for ANTLR-generated parsers
%description C %description C
C run-time support for ANTLR-generated parsers C run-time support for ANTLR-generated parsers
%package C-devel
Group: Development/Libraries
Summary: Header files for the C bindings for ANTLR-generated parsers
Requires: %{name}-C = %{antlr_version}-%{release}
%description C-devel
Header files for the C bindings for ANTLR-generated parsers
%package C-docs %package C-docs
Group: Documentation Group: Documentation
Summary: API documentation for the C run-time support for ANTLR-generated parsers Summary: API documentation for the C run-time support for ANTLR-generated parsers
@ -228,7 +237,12 @@ popd
pushd libantlr3c-%{antlr_version} pushd libantlr3c-%{antlr_version}
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT%{_libdir}/libantlr3c.{a,la} rm $RPM_BUILD_ROOT%{_libdir}/libantlr3c.{a,la}
gzip api/man/man3/* pushd api/man/man3
for file in `ls -1 * | grep -vi "^antlr3"`; do
mv $file antlr3-$file
done
gzip *
popd
mv api/man/man3 $RPM_BUILD_ROOT%{_mandir}/ mv api/man/man3 $RPM_BUILD_ROOT%{_mandir}/
rmdir api/man rmdir api/man
popd popd
@ -260,7 +274,9 @@ rm -rf $RPM_BUILD_ROOT
%files tool %files tool
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc tool/{README.txt,LICENSE.txt,CHANGES.txt} %doc tool/{README.txt,LICENSE.txt,CHANGES.txt}
%{_javadir}/*.jar %{_javadir}/antlr3.jar
%{_javadir}/antlr3-maven*.jar
%{_javadir}/antlr-%{antlr_version}.jar
%{_bindir}/antlr3 %{_bindir}/antlr3
%{_mavenpomdir}/JPP-antlr3-maven-plugin.pom %{_mavenpomdir}/JPP-antlr3-maven-plugin.pom
%{_mavenpomdir}/JPP-antlr.pom %{_mavenpomdir}/JPP-antlr.pom
@ -273,8 +289,11 @@ rm -rf $RPM_BUILD_ROOT
%files C %files C
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/libantlr3c.so
%files C-devel
%defattr(-,root,root,-)
%{_includedir}/antlr3* %{_includedir}/antlr3*
%{_libdir}/*
%{_mandir}/man3/* %{_mandir}/man3/*
%files C-docs %files C-docs
@ -283,7 +302,7 @@ rm -rf $RPM_BUILD_ROOT
%files java %files java
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_javadir}/antlr-runtime-%{antlr_version}.jar %{_javadir}/*runtime*.jar
%files javascript %files javascript
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -295,6 +314,14 @@ rm -rf $RPM_BUILD_ROOT
%{_mavenpomdir}/JPP-maven-gunit-plugin.pom %{_mavenpomdir}/JPP-maven-gunit-plugin.pom
%changelog %changelog
* Mon Mar 08 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.2-4
- Patch Java runtime build to include OSGi meta-information in the manifest
(thanks to Mat Booth)
- Add "antlr3" prefix to all man pages to prevent namespace conflicts with
standard man pages included in the man-pages package
- Split headers and man pages into a C-devel subpackage
- Fix multiple file ownership of Java runtime and gunit by the tool package
* Tue Mar 02 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.2-3 * Tue Mar 02 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.2-3
- Rebuilt in non-bootstrap mode. - Rebuilt in non-bootstrap mode.