summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authordominique.leuenberger <dominique.leuenberger@c587cffe-e639-0410-9787-d7902ae8ed56>2009-05-21 20:10:31 +0000
committerdominique.leuenberger <dominique.leuenberger@c587cffe-e639-0410-9787-d7902ae8ed56>2009-05-21 20:10:31 +0000
commite52cff2b1078ccd577a4a2739ac92231c2b5da7e (patch)
tree5fcdf72c7d099d17acac865d7259027bc58ba8a5 /src/bindings
parent6a08d35bef9467681fbf4bec21f2fa766afd3ac5 (diff)
downloadlibproxy-git-e52cff2b1078ccd577a4a2739ac92231c2b5da7e.tar.gz
.NET: the library is installed versioned to avoid conflicts. a working sample is included in samples/dotnet
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/dotnet/AssemblyInfo.cs.in33
-rw-r--r--src/bindings/dotnet/Makefile.am41
-rw-r--r--src/bindings/dotnet/libproxy-sharp-1.0.pc.in2
3 files changed, 69 insertions, 7 deletions
diff --git a/src/bindings/dotnet/AssemblyInfo.cs.in b/src/bindings/dotnet/AssemblyInfo.cs.in
new file mode 100644
index 0000000..cbee88d
--- /dev/null
+++ b/src/bindings/dotnet/AssemblyInfo.cs.in
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * libproxy - A library for proxy configuration
+ * Copyright (C) 2008-2009 Dominique Leuenberger <dominique@leuenberger.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ ******************************************************************************/
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly:AssemblyVersion("@VERSION@")]
+[assembly:AssemblyTitle ("LibProxy#")]
+[assembly:AssemblyDescription ("A library that provides automatic proxy configuration management.")]
+[assembly:AssemblyCopyright ("Copyright (c) 2006-2009 Nathaniel McCallum")]
+[assembly:AssemblyCompany ("")]
+[assembly:AssemblyDelaySign(false)]
+[assembly:AssemblyKeyFile("libproxy.snk")]
+[assembly:CLSCompliant(false)]
+
diff --git a/src/bindings/dotnet/Makefile.am b/src/bindings/dotnet/Makefile.am
index 22f496f..d7cd966 100644
--- a/src/bindings/dotnet/Makefile.am
+++ b/src/bindings/dotnet/Makefile.am
@@ -1,11 +1,40 @@
-libproxydir=$(pkglibdir)
-libproxy_SCRIPTS = libproxy-sharp.dll
-CLEANFILES = libproxy-sharp.dll
+libproxydir=$(pkglibdir)/@VERSION@
+libproxy_SCRIPTS = @ASSEMBLY_NAME@.dll
+CLEANFILES = @ASSEMBLY_NAME@.dll
-libproxy_sources = libproxy.cs
+EXTRA_DIST = libproxy-sharp-1.0.pc.in
+EXTRA_SCRIPTS = config.status
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libproxy-sharp-1.0.pc
+
+CSC = $(MCS) $(MCS_FLAGS) $(CSFLAGS)
+libproxy_sources = libproxy.cs
+libproxy_sources_in = AssemblyInfo.cs.in
+libproxy_generated_sources = $(libproxy_sources_in:.in=)
libproxy_build_sources = $(addprefix $(srcdir)/, $(libproxy_sources))
-libproxy-sharp.dll: $(libproxy_build_sources)
- $(MCS) /target:library -out:$@ $< -keyfile:libproxy.snk
+@ASSEMBLY_NAME@.dll: $(libproxy_build_sources) $(libproxy_generated_sources)
+ $(CSC) /target:library -out:$@ $< $(libproxy_generated_sources)
+
+install-data-local:
+ @if test -n '$(ASSEMBLY_NAME).dll'; then \
+ echo "$(GACUTIL) /i $(ASSEMBLY_NAME).dll /f $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) /i $(ASSEMBLY_NAME).dll /f $(GACUTIL_FLAGS) || exit 1; \
+ for POLICY in $(POLICIES); \
+ do echo "$(GACUTIL) /i $$POLICY /f $(GACUTIL_POLICY_FLAGS)"; \
+ $(GACUTIL) /i $$POLICY /f $(GACUTIL_POLICY_FLAGS) || exit 1; \
+ done \
+ fi
+
+uninstall-local:
+ @if test -n '$(ASSEMBLY_NAME).dll'; then \
+ echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \
+ for POLICY in $(taglib_policy_names); \
+ do echo "$(GACUTIL) /u $$POLICY /f $(GACUTIL_POLICY_FLAGS)"; \
+ $(GACUTIL) /u $$POLICY /f $(GACUTIL_POLICY_FLAGS) || exit 1; \
+ done \
+ fi
diff --git a/src/bindings/dotnet/libproxy-sharp-1.0.pc.in b/src/bindings/dotnet/libproxy-sharp-1.0.pc.in
index afad3bf..46860d1 100644
--- a/src/bindings/dotnet/libproxy-sharp-1.0.pc.in
+++ b/src/bindings/dotnet/libproxy-sharp-1.0.pc.in
@@ -5,4 +5,4 @@ libdir=@libdir@
Name: Libproxy#
Description: Libproxy# - .NET Binding to libproxy
Version: @VERSION@
-Libs: -r:${libdir}/libproxy/${Version}/libproxy-sharp.dll
+Libs: -r:${libdir}/libproxy/@VERSION@/libproxy-sharp.dll