aboutsummaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2009-12-11 10:28:06 -0600
committerCody Russell <crussell@canonical.com>2009-12-11 10:28:06 -0600
commit6d3743ef998358604fc37a3e1759257cd1061523 (patch)
treef9507a0cb28461717be73203997f4cff72449fd9 /sources
parentdc33785e02e846dc061b06a349a1d6033e333d35 (diff)
downloadlibayatana-appindicator-6d3743ef998358604fc37a3e1759257cd1061523.tar.gz
libayatana-appindicator-6d3743ef998358604fc37a3e1759257cd1061523.tar.bz2
libayatana-appindicator-6d3743ef998358604fc37a3e1759257cd1061523.zip
Build for Mono bindings
Diffstat (limited to 'sources')
-rw-r--r--sources/Makefile.am39
-rw-r--r--sources/appindicator-sharp.dll.config.in7
-rw-r--r--sources/appindicator-sharp.pc.in12
-rwxr-xr-xsources/build-mono-bindings.sh11
4 files changed, 58 insertions, 11 deletions
diff --git a/sources/Makefile.am b/sources/Makefile.am
new file mode 100644
index 0000000..23e8214
--- /dev/null
+++ b/sources/Makefile.am
@@ -0,0 +1,39 @@
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = appindicator-sharp.pc
+
+API = libappindicator-api.xml
+RAW_API = libappindicator-api.raw
+METADATA = libappindicator-api.metadata
+ASSEMBLY_NAME = appindicator-sharp
+ASSEMBLY = appindicator-sharp.dll
+TARGET = $(ASSEMBLY) $(ASSEMBLY).config
+assemblydir = $(libdir)/appindicator-sharp
+assembly_DATA = $(TARGET)
+CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb generated-stamp generated/*.cs $(API) $(RAW_API)
+DISTCLEANFILES = $(ASSEMBLY).config
+EXTRA_DIST = $(RAW_API) $(METADATA) appindicator-sharp.pc.in appindicator-sharp.dll.config.in
+
+references = $(GTK_SHARP_LIBS)
+
+$(RAW_API): app-indicator.sources.xml
+ $(GAPI_PARSER) app-indicator.sources.xml
+
+$(API): $(METADATA) $(RAW_API)
+ cp $(srcdir)/$(RAW_API) $(API)
+ chmod u+w $(API)
+ @if test -n '$(METADATA)'; then \
+ echo "$(GAPI_FIXUP) --api=$(API) --metadata=$(srcdir)/$(METADATA)"; \
+ $(GAPI_FIXUP) --api=$(API) --metadata=$(srcdir)/$(METADATA); \
+ fi
+
+api_includes = $(GTK_SHARP_FLAGS)
+
+generated-stamp: $(API)
+ rm -f generated/* && \
+ $(GAPI_CODEGEN) --generate $(API) $(api_includes) \
+ --outdir=generated --assembly-name=$(ASSEMBLY_NAME) \
+ && touch generated-stamp
+
+$(ASSEMBLY): generated-stamp
+ @rm -f $(ASSEMBLY).mdb
+ $(CSC) $(CSFLAGS) -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(references) $(GENERATED_SOURCES) \ No newline at end of file
diff --git a/sources/appindicator-sharp.dll.config.in b/sources/appindicator-sharp.dll.config.in
new file mode 100644
index 0000000..c8caa80
--- /dev/null
+++ b/sources/appindicator-sharp.dll.config.in
@@ -0,0 +1,7 @@
+<configuration>
+ <dllmap dll="libappindicator.dll" target="libappindicator@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="libgtk-2.0-0.dll" target="libgtk-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+</configuration>
diff --git a/sources/appindicator-sharp.pc.in b/sources/appindicator-sharp.pc.in
new file mode 100644
index 0000000..be5595a
--- /dev/null
+++ b/sources/appindicator-sharp.pc.in
@@ -0,0 +1,12 @@
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+assemblies_dir=${libdir}/appindicator-sharp
+
+Name: appindicator
+Description: application indicators for .NET
+Version: @VERSION@
+Libraries: ${assemblies_dir}/appindicator-sharp.dll ${assemblies_dir}/appindicator-sharp.dll.config
+Requires: gtk-sharp-2.0
+Cflags:
+Libs: -r:${assemblies_dir}/appindicator-sharp.dll
diff --git a/sources/build-mono-bindings.sh b/sources/build-mono-bindings.sh
deleted file mode 100755
index bca765e..0000000
--- a/sources/build-mono-bindings.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-gapi2-parser app-indicator.sources.xml
-
-cp libappindicator-api.raw libappindicator-api.xml
-
-gapi2-fixup --api=libappindicator-api.xml --metadata=libappindicator-api.metadata
-
-gapi2-codegen --outdir=generated `pkg-config --cflags gtk-sharp-2.0` --generate libappindicator-api.xml
-
-gmcs -pkg:gtk-sharp-2.0 -target:library -out:AppIndicator.dll generated/*.cs