All pastes #461059 Raw Edit

Something

public text v1 · immutable
#461059 ·published 2007-04-27 14:17 UTC
rendered paste body
Index: configure.ac
===================================================================
--- configure.ac	(revision 75409)
+++ configure.ac	(working copy)
@@ -27,6 +27,20 @@
 fi
 
 #
+# The GAC tool
+#
+
+AC_PATH_PROG(GACUTIL, gacutil, no)
+if test "x$GACUTIL" = "xno" ; then
+	AC_MSG_ERROR([No gacutil tool found])
+fi
+
+AC_SUBST(GACUTIL)
+
+GACUTIL_FLAGS='/gacdir $(DESTDIR)$(prefix)'
+AC_SUBST(GACUTIL_FLAGS)
+
+#
 # Use D-Bus as a fallback to get the keyring socket address
 #
 AC_ARG_ENABLE(dbus, 
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 75409)
+++ src/Makefile.am	(working copy)
@@ -1,5 +1,9 @@
 SUBDIRS=Gnome.Keyring
 
+ASSEMBLY_NAME=Gnome.Keyring
+ASSEMBLY=$(ASSEMBLY_NAME).dll
+SNK=$(ASSEMBLY_NAME).key
+
 pkgconfigdir=$(libdir)/pkgconfig
 CSFLAGS+= -debug+ -debug:full -nologo -r:Mono.Posix.dll
 
@@ -7,7 +11,7 @@
 pkgconfig_DATA = gnome-keyring-sharp.pc
 gnomekeyring_SCRIPTS = Gnome.Keyring.dll
 
-CLEANFILES = Gnome.Keyring.dll*
+CLEANFILES = $(ASSEMBLY_NAME).*
 
 # 
 gnomekeyring_references = $(DBUS_LIBS)
@@ -31,6 +35,19 @@
 
 gnomekeyring_build_sources = $(addprefix $(srcdir)/, $(gnomekeyring_sources)) $(addprefix $(top_builddir)/src/Gnome.Keyring/, AssemblyInfo.cs)
 
-Gnome.Keyring.dll: $(gnomekeyring_build_sources)
+$(ASSEMBLY): $(gnomekeyring_build_sources) $(SNK)
 	$(CSC) $(CSFLAGS) $(gnomekeyring_references) -target:library -out:$@ $(gnomekeyring_build_sources)
 
+$(SNK): $(top_srcdir)/$(SNK)
+	cp $(top_srcdir)/$(SNK) .
+
+### GAC install rules ###
+
+install-data-local:
+	echo "$(GACUTIL) /i $(ASSEMBLY) $(GACUTIL_FLAGS)"; \
+	$(GACUTIL) /i $(ASSEMBLY) $(GACUTIL_FLAGS) || exit 1;
+
+uninstall-local:
+	echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
+	$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1;
+
Index: src/Gnome.Keyring/AssemblyInfo.cs.in
===================================================================
--- src/Gnome.Keyring/AssemblyInfo.cs.in	(revision 75409)
+++ src/Gnome.Keyring/AssemblyInfo.cs.in	(working copy)
@@ -33,4 +33,5 @@
 [assembly: AssemblyDescription ("")]
 [assembly: AssemblyCopyright ("(c) 2006 Novell, Inc.")]
 [assembly: AssemblyCompany ("Novell, Inc.")]
+[assembly: AssemblyKeyFile ("Gnome.Keyring.key")]
 
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 75409)
+++ Makefile.am	(working copy)
@@ -1,2 +1,3 @@
 SUBDIRS=src docs sample
+EXTRA_DIST=Gnome.Keyring.key