rpms/lpg/F-11 lpg-bootstrap-target.patch, NONE, 1.1 lpg-build.xml, NONE, 1.1 lpg-manifest.mf, NONE, 1.1 lpg-osgi-jar.patch, NONE, 1.1 lpg.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

mbooth mbooth at fedoraproject.org
Wed Jul 15 09:35:47 UTC 2009


Author: mbooth

Update of /cvs/pkgs/rpms/lpg/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9538

Modified Files:
	.cvsignore sources 
Added Files:
	lpg-bootstrap-target.patch lpg-build.xml lpg-manifest.mf 
	lpg-osgi-jar.patch lpg.spec 
Log Message:
Initial commit of LPG package.



lpg-bootstrap-target.patch:

--- NEW FILE lpg-bootstrap-target.patch ---
--- lpg-generator-cpp/src/Makefile	2009-04-27 23:58:38.000000000 +0100
+++ lpg-generator-cpp/src/Makefile	2009-04-27 23:59:28.000000000 +0100
@@ -26,7 +26,7 @@
 GEN_FILES=jikespg_sym.h jikespg_def.h jikespg_prs.h jikespg_prs.cpp jikespg_act.h jikespg_act.cpp jikespg_init.cpp
 
 bootstrap: jikespg.g
-	../bin/lpg jikespg.g
+	../bin/$(TARGET) jikespg.g
 	$(RM) jikespg.l
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.


--- NEW FILE lpg-build.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<project name="lpg" default="all" basedir=".">
	<target name="init">
		<property name="srcdir" value="lpgjavaruntime/"/>
		<property name="bindir" value="bin/"/>
		<property name="jarname" value="lpgjavaruntime.jar"/>
	</target>

	<target name="all" depends="init">
		<echo message="basedir = ${basedir}"/>

		<!-- compile the source code -->
		<delete dir="${bindir}"/>
		<mkdir dir="${bindir}"/>
		<javac destdir="${bindir}" failonerror="true" includeAntRuntime="no" source="1.5" target="1.5">
			<src path="${srcdir}"/>
		</javac>

		<!-- make jar file -->
		<delete file="${jarname}"/>
		<jar destfile="${jarname}" basedir="${bindir}" includes="**/*.class"
			manifest="MANIFEST.MF"/>
	</target>
</project>


--- NEW FILE lpg-manifest.mf ---
Manifest-Version: 1.0
Bundle-ClassPath: .
Bundle-Vendor: Eclipse.org
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
Bundle-Name: SourceForge LPG
Bundle-SymbolicName: net.sourceforge.lpg.lpgjavaruntime
Export-Package: lpg.lpgjavaruntime; version="1.1"
Bundle-Version: 1.1.0.v200803061910
Bundle-ManifestVersion: 2


lpg-osgi-jar.patch:

--- NEW FILE lpg-osgi-jar.patch ---
--- lpg-java-runtime/META-INF/MANIFEST.MF	2009-05-18 23:09:59.000000000 +0100
+++ lpg-java-runtime/META-INF/MANIFEST.MF	2009-07-04 16:26:41.204699558 +0100
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: LPG Java Runtime
 Bundle-SymbolicName: lpg.runtime
-Bundle-ClassPath: lpgruntime.jar
+Bundle-ClassPath: .
 Bundle-Version: 2.0.17
 Bundle-Vendor: pcharles at us.ibm.com
 Bundle-Localization: plugin
--- lpg-java-runtime/exportPlugin.xml	2009-02-18 23:14:10.000000000 +0000
+++ lpg-java-runtime/exportPlugin.xml	2009-07-04 16:41:44.509545672 +0100
@@ -70,9 +70,6 @@
         <!-- Copy necessary resources -->
 
 		<jar destfile="lpgruntime.jar" basedir="${temp.folder}/bin"
-			 includes="**/*.class,**/*.properties"/>
-		<jar destfile="${build.result.folder}/${plugin.jar.name}" basedir="${basedir}"
-			 manifest="META-INF/MANIFEST.MF"
-			includes="lpgruntime.jar"/>
+			 includes="**/*.class,**/*.properties" manifest="${basedir}/META-INF/MANIFEST.MF"/>
 	</target>
 </project>


--- NEW FILE lpg.spec ---
%global    _version 2.0.17
%global    _compat_version 1.1.0

Name:      lpg
Version:   %{_version}
Release:   2%{?dist}
Summary:   LALR Parser Generator
Group:     Development/Libraries
# although the text of the licence isn't distributed with some of the source,
# the author has exlicitly stated that everything is covered under the EPL
# see: http://sourceforge.net/forum/forum.php?thread_id=3277926&forum_id=523519
License:   EPL
URL:       http://lpg.sourceforge.net/

Source0:   http://downloads.sourceforge.net/lpg/lpg-java-runtime-src-%{version}.zip
Source1:   http://downloads.sourceforge.net/lpg/lpg-generator-cpp-src-%{version}.zip
Source2:   http://downloads.sourceforge.net/lpg/lpg-generator-templates-%{version}.zip

# source archive for the java compat lib
Source3:   http://downloads.sourceforge.net/lpg/lpgdistribution-05-16-06.zip

# upstream does not provide a build script or manifest file for the java
# compat lib
Source4:   %{name}-build.xml
Source5:   %{name}-manifest.mf

# TODO: drop Source3, 4, 5 and obsolete the java-compat package when dependent
# projects are ported to LPG 2.x.x

# executable name in the bootstrap make target is wrong; sent upstream, see:
# https://sourceforge.net/tracker/?func=detail&aid=2794057&group_id=155963&atid=797881
Patch0:    %{name}-bootstrap-target.patch

# change build script to build the base jar with osgi bundle info
Patch1:    %{name}-osgi-jar.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
The LALR Parser Generator (LPG) is a tool for developing scanners and parsers
written in Java, C++ or C. Input is specified by BNF rules. LPG supports
backtracking (to resolve ambiguity), automatic AST generation and grammar
inheritance.

%package       java
Summary:       Java runtime library for LPG
Group:         Development/Libraries

BuildArch:     noarch

BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: ant
Requires:      java
Requires:      jpackage-utils

%description   java
Java runtime library for parsers generated with the LALR Parser Generator
(LPG).

%package       java-compat
Version:       %{_compat_version}
Summary:       Compatibility Java runtime library for LPG 1.x
Group:         Development/Libraries

BuildArch:     noarch

BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: ant
Requires:      java
Requires:      jpackage-utils

%description   java-compat
Compatibility Java runtime library for parsers generated with the LALR Parser
Generator (LPG) 1.x.

%package       manual
Summary:       Manual for LPG
Group:         Development/Libraries

BuildArch:     noarch

%description   manual
Programmer's manual for the LALR Parser Generator (LPG).

%prep
%setup -q -T -c -n %{name}-%{version}

# because you can't use setup to unzip to subdirectories when your source
# archives do not create top level directories
unzip -qq %{SOURCE0} -d lpg-java-runtime
unzip -qq %{SOURCE1} -d lpg-generator-cpp
unzip -qq %{SOURCE2} -d lpg-generator-templates
chmod -Rf a+rX,u+w,g-w,o-w .

# setup java compat stuff
%setup -q -D -T -a 3 -n %{name}-%{version}
cp -p %{SOURCE4} lpgdistribution/build.xml
cp -p %{SOURCE5} lpgdistribution/MANIFEST.MF

# apply patches
%patch0 -p0
%patch1 -p0

%build
# build java stuff
(cd lpg-java-runtime && ant -f exportPlugin.xml)

# build java compat stuff
(cd lpgdistribution && ant)

# build native stuff
pushd lpg-generator-cpp/src

# ARCH just tells us what tools to use, so this can be the same on all arches
# we build twice in order to bootstrap the grammar parser
make clean install ARCH=linux_x86 \
  LOCAL_CFLAGS="%{optflags}" LOCAL_CXXFLAGS="%{optflags}"
make bootstrap ARCH=linux_x86
make clean install ARCH=linux_x86 \
  LOCAL_CFLAGS="%{optflags}" LOCAL_CXXFLAGS="%{optflags}"

popd

%install
rm -rf %{buildroot}

install -pD -T lpg-java-runtime/%{name}runtime.jar \
  %{buildroot}%{_javadir}/%{name}runtime-%{_version}.jar
install -pD -T lpgdistribution/%{name}javaruntime.jar \
  %{buildroot}%{_javadir}/%{name}javaruntime-%{_compat_version}.jar
install -pD -T lpg-generator-cpp/bin/%{name}-linux_x86 \
  %{buildroot}%{_bindir}/%{name}

# create unversioned symlinks to jars
(cd %{buildroot}%{_javadir} && for jar in *-%{_version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{_version}||g"`; done)
(cd %{buildroot}%{_javadir} && for jar in *-%{_compat_version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{_compat_version}||g"`; done)

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc lpg-generator-templates/docs/*
%{_bindir}/%{name}

%files java
%defattr(-,root,root,-)
%doc lpg-java-runtime/Eclipse\ Public\ License\ -\ Version\ 1_0.htm
%{_javadir}/%{name}runtime*

%files java-compat
%defattr(-,root,root,-)
%doc lpg-java-runtime/Eclipse\ Public\ License\ -\ Version\ 1_0.htm
%{_javadir}/%{name}javaruntime*

%changelog
* Sun Jul 05 2009 Mat Booth <fedora at matbooth.co.uk> 2.0.17-2
- Add version constants so we get the correct version numbers on the java
  libraries.

* Sat Jul 04 2009 Mat Booth <fedora at matbooth.co.uk> 2.0.17-1
- Update to 2.0.17.
- Add OSGI manifest info to the runtime jar.
- Bundle generator docs with the generator in the main package.

* Tue May 19 2009 Mat Booth <fedora at matbooth.co.uk> 2.0.16-2
- Better document source files/patches.

* Tue Apr 28 2009 Mat Booth <fedora at matbooth.co.uk> 2.0.16-1
- Initial release of version 2.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/lpg/F-11/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	15 Jul 2009 02:30:52 -0000	1.1
+++ .cvsignore	15 Jul 2009 09:35:47 -0000	1.2
@@ -0,0 +1,4 @@
+lpgdistribution-05-16-06.zip
+lpg-generator-cpp-src-2.0.17.zip
+lpg-generator-templates-2.0.17.zip
+lpg-java-runtime-src-2.0.17.zip


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/lpg/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	15 Jul 2009 02:30:52 -0000	1.1
+++ sources	15 Jul 2009 09:35:47 -0000	1.2
@@ -0,0 +1,4 @@
+9aa10697f2124224e771f74231a47dcb  lpgdistribution-05-16-06.zip
+c1d8b5c1cbf0f18d3e6fe98361808db1  lpg-generator-cpp-src-2.0.17.zip
+2b7d752473adb2380b2441dfb3ebc89f  lpg-generator-templates-2.0.17.zip
+ab8266357cc499ed84f83853e4d73a51  lpg-java-runtime-src-2.0.17.zip




More information about the fedora-extras-commits mailing list