tevent-waf: added man page and pkgconfig file
authorAndrew Tridgell <tridge@samba.org>
Tue, 13 Apr 2010 11:20:52 +0000 (21:20 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 13 Apr 2010 13:03:27 +0000 (23:03 +1000)
this allows libtevent to build under rpmbuild

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

lib/tevent/wscript

index 4244db1a6f21e7bbfdb6ffddae0dc0a6c8ac9e3a..c90ed7a090698242ecf09453cf53c4748dcad408 100644 (file)
@@ -27,9 +27,12 @@ def configure(conf):
     conf.RECURSE('lib/replace')
     conf.RECURSE('lib/talloc')
 
-    if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION,
-                                 onlyif='talloc', implied_deps='replace talloc'):
-        conf.define('USING_SYSTEM_TEVENT', 1)
+    conf.env.standalone_tevent = conf.IN_LAUNCH_DIR()
+
+    if not conf.env.standalone_tevent:
+        if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION,
+                                     onlyif='talloc', implied_deps='replace talloc'):
+            conf.define('USING_SYSTEM_TEVENT', 1)
 
     if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
         conf.DEFINE('HAVE_EPOLL', 1)
@@ -54,6 +57,11 @@ def build(bld):
                           enabled= not bld.CONFIG_SET('USING_SYSTEM_TEVENT'),
                           vnum=VERSION)
 
+    if bld.env.standalone_tevent:
+        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+        bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION)
+        bld.INSTALL_FILES('${INCLUDEDIR}', 'tevent.h')
+
 def test(ctx):
     '''test tevent'''
     print("The tevent testsuite is part of smbtorture in samba4")