diff -Nurb antlr-2.7.7/debian/antlr-cil-2.7.pc antlr-2.7.7.new/debian/antlr-cil-2.7.pc
--- antlr-2.7.7/debian/antlr-cil-2.7.pc	1970-01-01 01:00:00.000000000 +0100
+++ antlr-2.7.7.new/debian/antlr-cil-2.7.pc	2008-01-19 13:21:02.000000000 +0000
@@ -0,0 +1,8 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib/cli/antlr-2.7
+
+Name: Antlr
+Description: language tool for constructing recognizers, compilers etc
+Version: 2.7
+Libs: -r:${libdir}/antlr.runtime.dll -r:${libdir}/antlr.astframe.dll
diff -Nurb antlr-2.7.7/debian/antlr.snk.uue antlr-2.7.7.new/debian/antlr.snk.uue
--- antlr-2.7.7/debian/antlr.snk.uue	1970-01-01 01:00:00.000000000 +0100
+++ antlr-2.7.7.new/debian/antlr.snk.uue	2008-01-19 12:34:34.000000000 +0000
@@ -0,0 +1,17 @@
+begin 644 antlr.snk.uue
+M!P(````D``!24T$R``0``!$```"_&Y7B2L#1&)Q;47.U2+]3=?2V!EK^_?U[
+M^1L]'<]N!L-)*7!66*)[X_%>H[$,:>W00EW)W$8]8EC\'@`E$T.""`-9#H)X
+MV8B&_FB3K#R(\+'TATB;?@L4\+"E^I*4F=F5BE=!7UXSRZN4T7(H?ARY>L1Z
+M7X-3X[K72E+&H'V-JI$;FO9+%.<L]/>`?:W7L(3[V5X[/1\BI'CL+=$Y?'N?
+M-!+F5W%R@TST"7P#H];EON(9&_\BTQ\!>8=D(I0"E<E/^NL\>EUT5:*SS3GP
+M]@K_$AG"[O;6$FKA,>VV%7EXGT1[[^<(L=2/_\\\O?MW[+PUD_B5`DIP\&W)
+M`<,9&)C8,;N<T`)!&))7.@"6[%_MT^#)CJ1*^/B`.LX*!'=9:`>R;8'G5H2U
+MQH0O'4P7R>HL"/><TIXBK6D-3;VM]5IN+_6@#13.'ZN19PQ/Y-1#10YYYZ[3
+M0^UX=8RA#@`PW`@X[<Y;&<N1&!QXV/6Y.,S1U\(`&!+S/"#DM'@!"N@B7[*G
+MOW-I@+$J3QF0:6-$4^'A2O\PK39:.LE5)7R.?DY_7RH5^\*Z-0@-T]Z&_V8M
+MG*3#[Y.HN2Z(35%MHW"?/\1*<4^_J%TH^2U`?)AFMMUK*=_B:5"Q]IP#)Q-Y
+M-)%L"\GHA*2IUZQ_?P,O9@G"'!]!D4N.ROFDXZGF6H*X^4730VY-MZ`N<XI1
+MN<+O2?)(?EY!-)R<;6A3.VT$A$?O=WM['JT?+C39NMH/ARIO_DE!&<^H5C35
++'$;>+H^R0#7@8W@`
+`
+end
diff -Nurb antlr-2.7.7/debian/changelog antlr-2.7.7.new/debian/changelog
--- antlr-2.7.7/debian/changelog	2008-01-19 13:21:57.000000000 +0000
+++ antlr-2.7.7.new/debian/changelog	2008-01-19 12:35:12.000000000 +0000
@@ -1,3 +1,12 @@
+antlr (2.7.7-3) unstable; urgency=low
+
+  * enable building of cshart libs. Closes: #369010
+    - add antrl.snk.uue key for signing CLI assemblies
+    - use dh_installcligac to install assembiles in the GAC
+    - replace \ with / in nant build file
+
+ -- Sam Clegg <samo@debian.org>  Sat, 19 Jan 2008 12:35:09 +0000
+
 antlr (2.7.7-2) unstable; urgency=low
 
   * Removed Build-Depends pn libgcj-dev. Closes: #359727
diff -Nurb antlr-2.7.7/debian/control antlr-2.7.7.new/debian/control
--- antlr-2.7.7/debian/control	2008-01-19 13:21:57.000000000 +0000
+++ antlr-2.7.7.new/debian/control	2008-01-19 12:35:58.000000000 +0000
@@ -3,9 +3,8 @@
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
 Uploaders: Arnaud Vandyck <avdyk@debian.org>, John Leuner <jewel@debian.org>, Michael Koch <konqueror@gmx.de>, Barry Hawkins <barry@bytemason.org>
-Build-Depends: debhelper (>= 4), java-gcj-compat-dev, gcj, python, autotools-dev, python-all-dev (>= 2.3.5-11)
+Build-Depends: debhelper (>= 4), java-gcj-compat-dev, gcj, python, autotools-dev, python-all-dev (>= 2.3.5-11), nant, mono-mcs (>= 1.0) | c-sharp-compiler, sharutils
 Build-Depends-Indep: python-support (>= 0.3)
-Build-Conflicts: mono-jit
 Standards-Version: 3.7.3
 
 Package: antlr
@@ -38,6 +37,18 @@
  .
  These are the static libraries for C++.
 
+Package: libantlr2.7-cil
+Section: libdevel
+Architecture: any
+Recommends: antlr
+Description: language tool for constructing recognizers, compilers etc
+ ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is
+ a language tool that provides a framework for constructing recognizers,
+ compilers, and translators from grammatical descriptions containing C++
+ or Java actions [You can use PCCTS 1.xx to generate C-based parsers].
+ .
+ This package contains the C# (CLI) libraries.
+
 Package: cantlr
 Section: devel
 Architecture: any
diff -Nurb antlr-2.7.7/debian/libantlr2.7-cil.dirs antlr-2.7.7.new/debian/libantlr2.7-cil.dirs
--- antlr-2.7.7/debian/libantlr2.7-cil.dirs	1970-01-01 01:00:00.000000000 +0100
+++ antlr-2.7.7.new/debian/libantlr2.7-cil.dirs	2008-01-19 12:34:34.000000000 +0000
@@ -0,0 +1 @@
+usr/lib/antlr-2.7
diff -Nurb antlr-2.7.7/debian/libantlr2.7-cil.install antlr-2.7.7.new/debian/libantlr2.7-cil.install
--- antlr-2.7.7/debian/libantlr2.7-cil.install	1970-01-01 01:00:00.000000000 +0100
+++ antlr-2.7.7.new/debian/libantlr2.7-cil.install	2008-01-19 13:03:04.000000000 +0000
@@ -0,0 +1,3 @@
+debian/antlr-cil-2.7.pc /usr/lib/pkgconfig
+lib/antlr.astframe.dll /usr/lib/cli/antlr-2.7
+lib/antlr.runtime.dll /usr/lib/cli/antlr-2.7
diff -Nurb antlr-2.7.7/debian/libantlr2.7-cil.installcligac antlr-2.7.7.new/debian/libantlr2.7-cil.installcligac
--- antlr-2.7.7/debian/libantlr2.7-cil.installcligac	1970-01-01 01:00:00.000000000 +0100
+++ antlr-2.7.7.new/debian/libantlr2.7-cil.installcligac	2008-01-19 12:56:27.000000000 +0000
@@ -0,0 +1,2 @@
+/usr/lib/cli/antlr-2.7/antlr.astframe.dll
+/usr/lib/cli/antlr-2.7/antlr.runtime.dll
diff -Nurb antlr-2.7.7/debian/libantlr2.7-cil.links antlr-2.7.7.new/debian/libantlr2.7-cil.links
--- antlr-2.7.7/debian/libantlr2.7-cil.links	1970-01-01 01:00:00.000000000 +0100
+++ antlr-2.7.7.new/debian/libantlr2.7-cil.links	2008-01-19 12:51:46.000000000 +0000
@@ -0,0 +1 @@
+usr/lib/pkgconfig/antlr-cil-2.7.pc usr/lib/pkgconfig/antlr-cil.pc
diff -Nurb antlr-2.7.7/debian/rules antlr-2.7.7.new/debian/rules
--- antlr-2.7.7/debian/rules	2008-01-19 13:21:57.000000000 +0000
+++ antlr-2.7.7.new/debian/rules	2008-01-19 13:00:37.000000000 +0000
@@ -2,17 +2,17 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+export MONO_SHARED_DIR = $(shell pwd)/debian
 
 configure: configure-stamp
-configure-stamp: autotools
+configure-stamp:
 	dh_testdir
 	cp /usr/share/misc/config.* scripts
 	JAVAC=/usr/lib/jvm/java-gcj/bin/javac CLASSPATH=`pwd` JAVA=/usr/lib/jvm/java-gcj/bin/java \
 	./configure \
 		--prefix=/usr \
-		--mandir=\$${prefix}/share/man \
-		--disable-csharp
-	touch configure-stamp-indep
+		--mandir=\$${prefix}/share/man 
+	touch configure-stamp
 
 build-indep: configure build-stamp-indep
 build-stamp-indep:
@@ -23,19 +23,22 @@
 build: configure build-stamp
 build-stamp:
 	dh_testdir
+	uudecode -o debian/antlr.snk debian/antlr.snk.uue
 	$(MAKE) -f debian/Makefile.debian make_with_gcj
 	$(MAKE) -C lib/cpp CXXFLAGS="+ -fPIC -DPIC"
 	mv -f lib/cpp/src/libantlr.a debian/libantlr-pic.a
 	$(MAKE) -C lib/cpp clean
 	$(MAKE) -C lib/cpp
+	$(MAKE) -C lib/csharp
 	touch build-stamp
 
 clean:
 	dh_testdir
 	dh_testroot
-	-rm -f build-stamp build-stamp-indep configure-stamp-indep
+	-rm -f build-stamp build-stamp-indep configure-stamp
 	[ ! -f debian/Makefile.debian ] || $(MAKE) -f debian/Makefile.debian clean
 	-cd lib/cpp; $(MAKE) clean
+	-cd lib/csharp; $(MAKE) clean
 	-rm -rf lib/cpp/src/.deps
 	-rm -f lib/cpp/config.sub lib/cpp/config.guess lib/cpp/config.cache lib/cpp/config.log
 	-rm -f lib/cpp/scripts/config.sub lib/cpp/scripts/config.guess lib/cpp/scripts/config.cache lib/cpp/scripts/config.log
@@ -46,6 +49,9 @@
 	-rm -f scripts/config.guess scripts.config.sub
 	-rm -f antlr/Version.java
 	-rm -f debian/libantlr-pic.a
+	-rm -f lib/csharp/antlr.astframe/bin/antlr.astframe.xml lib/csharp/antlr.runtime/bin/antlr.runtime.xml
+	-rm -f debian/antlr.snk
+	-rm -rf debian/.wapi
 	dh_clean
 
 install-indep: build-indep
@@ -53,6 +59,8 @@
 	dh_testroot
 	dh_clean -k
 	dh_installdirs
+	dh_install
+	dh_link
 	$(MAKE) -f debian/Makefile.debian install DESTDIR=`pwd`/debian/antlr
 	install -m644 lib/python/antlr/antlr.py debian/antlr/usr/share/python-support/antlr
 	install -m644 CHANGES.txt debian/antlr/usr/share/doc/antlr/changelog
@@ -63,17 +71,34 @@
 	dh_testroot
 	dh_clean -k
 	dh_installdirs
+	dh_install
+	dh_link
 	$(MAKE) -C lib/cpp install prefix=`pwd`/debian/libantlr-dev/usr
-	mv -f debian/libantlr-pic.a debian/libantlr-dev/usr/lib/
 	install -m755 scripts/antlr-config debian/libantlr-dev/usr/bin
 	install -m755 cantlr debian/cantlr/usr/bin
 	install -m644 CHANGES.txt debian/cantlr/usr/share/doc/cantlr/changelog
 	install -m644 CHANGES.txt debian/libantlr-dev/usr/share/doc/libantlr-dev/changelog
+	install -m644 debian/libantlr-pic.a debian/libantlr-dev/usr/lib/
 
 binary-indep: build-indep install-indep
 	dh_testdir 
 	dh_testroot
 #
+# C# library
+	dh_makeclilibs -V
+	dh_installcligac 
+	dh_clideps 
+	dh_installdocs -plibantlr2.7-cil
+	dh_installexamples -plibantlr2.7-cil
+	dh_installchangelogs -plibantlr2.7-cil
+	dh_fixperms -plibantlr2.7-cil
+	dh_compress -plibantlr2.7-cil
+	dh_installdeb -plibantlr2.7-cil
+	dh_gencontrol -plibantlr2.7-cil
+	dh_md5sums -plibantlr2.7-cil
+	dh_builddeb -plibantlr2.7-cil
+
+#
 #   antlr-doc:
 	dh_installdocs -pantlr-doc
 	dh_installexamples -pantlr-doc
@@ -130,4 +155,4 @@
 	dh_builddeb -plibantlr-dev -pcantlr
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install autotools
+.PHONY: build clean binary-indep binary-arch binary install
diff -Nurb antlr-2.7.7/debian/substvars antlr-2.7.7.new/debian/substvars
--- antlr-2.7.7/debian/substvars	1970-01-01 01:00:00.000000000 +0100
+++ antlr-2.7.7.new/debian/substvars	2008-01-19 12:34:34.000000000 +0000
@@ -0,0 +1 @@
+shlibs:Depends=libgcc1 (>= 1:4.1.1-21), zlib1g , libgcj8-1 (>= 4.2.1), libc6 (>= 2.7-1)
Binary files antlr-2.7.7/lib/antlr.astframe.dll and antlr-2.7.7.new/lib/antlr.astframe.dll differ
Binary files antlr-2.7.7/lib/antlr.runtime.dll and antlr-2.7.7.new/lib/antlr.runtime.dll differ
Binary files antlr-2.7.7/lib/cpp/src/libantlr.a and antlr-2.7.7.new/lib/cpp/src/libantlr.a differ
Binary files antlr-2.7.7/lib/csharp/antlr.astframe/antlr.astframe.dll and antlr-2.7.7.new/lib/csharp/antlr.astframe/antlr.astframe.dll differ
diff -Nurb antlr-2.7.7/lib/csharp/antlr.astframe/AssemblyInfo.cs antlr-2.7.7.new/lib/csharp/antlr.astframe/AssemblyInfo.cs
--- antlr-2.7.7/lib/csharp/antlr.astframe/AssemblyInfo.cs	2006-11-01 21:37:17.000000000 +0000
+++ antlr-2.7.7.new/lib/csharp/antlr.astframe/AssemblyInfo.cs	2008-01-19 12:34:34.000000000 +0000
@@ -30,6 +30,7 @@
 // by using the '*' as shown below:
 
 [assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyKeyFile("../../../debian/antlr.snk")]
 
 #if STRONGNAME
 #pragma warning disable 1699
diff -Nurb antlr-2.7.7/lib/csharp/antlr.runtime/AssemblyInfo.cs antlr-2.7.7.new/lib/csharp/antlr.runtime/AssemblyInfo.cs
--- antlr-2.7.7/lib/csharp/antlr.runtime/AssemblyInfo.cs	2006-11-01 21:37:17.000000000 +0000
+++ antlr-2.7.7.new/lib/csharp/antlr.runtime/AssemblyInfo.cs	2008-01-19 12:34:34.000000000 +0000
@@ -31,6 +31,7 @@
 // by using the '*' as shown below:
 
 [assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyKeyFile("../../../debian/antlr.snk")]
 
 #if STRONGNAME
 #pragma warning disable 1699
diff -Nurb antlr-2.7.7/lib/csharp/antlr.runtime.build antlr-2.7.7.new/lib/csharp/antlr.runtime.build
--- antlr-2.7.7/lib/csharp/antlr.runtime.build	2006-11-01 21:37:17.000000000 +0000
+++ antlr-2.7.7.new/lib/csharp/antlr.runtime.build	2008-01-19 12:34:34.000000000 +0000
@@ -122,7 +122,7 @@
         </csc>
 
         <!-- copy the antlr.runtime assembly to the astframe build folder -->
-        <copy file="${compile.dir}\${project.FileName}.dll" tofile="${astframe.compile.dir}\${project.FileName}.dll" />
+        <copy file="${compile.dir}/${project.FileName}.dll" tofile="${astframe.compile.dir}/${project.FileName}.dll" />
 
         <!-- compile antlr.astframe.dll -->
         <csc target="library" output="${astframe.compile.dir}/${astframe.FileName}.dll" debug="${debug}" doc="${astframe.build.dir}/${astframe.FileName}.xml">
@@ -134,7 +134,7 @@
 	            	<include name="System.dll" />
 					<include name="System.Drawing.dll" />
 					<include name="System.Windows.Forms.dll" />
-					<include name="${astframe.compile.dir}\${project.FileName}.dll" />
+					<include name="${astframe.compile.dir}/${project.FileName}.dll" />
 				</references>              					
 				<arg value="/nowarn:1591"/>
         </csc>
 
