aboutsummaryrefslogtreecommitdiff
path: root/bindings/ruby/extconf.rb
diff options
context:
space:
mode:
authorDavid Bremner <bremner@debian.org>2019-02-17 07:30:33 -0400
committerDavid Bremner <bremner@debian.org>2019-02-17 07:30:33 -0400
commitf7130468d27c4f37d45e6aa60baacfc3329ccff4 (patch)
treef26a901f6e28185d60200c9111de30e1c15b4996 /bindings/ruby/extconf.rb
Import notmuch_0.28.2.orig.tar.gz
[dgit import orig notmuch_0.28.2.orig.tar.gz]
Diffstat (limited to 'bindings/ruby/extconf.rb')
-rw-r--r--bindings/ruby/extconf.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
new file mode 100644
index 00000000..161de5a2
--- /dev/null
+++ b/bindings/ruby/extconf.rb
@@ -0,0 +1,25 @@
+#!/usr/bin/env ruby
+# coding: utf-8
+# Copyright 2010, 2011, 2012 Ali Polatel <alip@exherbo.org>
+# Distributed under the terms of the GNU General Public License v3
+
+require 'mkmf'
+
+dir = File.join(ENV['NOTMUCH_SRCDIR'], 'lib')
+
+# includes
+$INCFLAGS = "-I#{dir} #{$INCFLAGS}"
+
+if ENV['EXTRA_LDFLAGS']
+ $LDFLAGS += " " + ENV['EXTRA_LDFLAGS']
+end
+
+if not ENV['LIBNOTMUCH']
+ exit 1
+end
+
+$LOCAL_LIBS += ENV['LIBNOTMUCH']
+
+# Create Makefile
+dir_config('notmuch')
+create_makefile('notmuch')