add a wscript file for policy

This commit is contained in:
Richard Hughes 2007-11-09 23:28:41 +00:00
parent 2b427b16e3
commit cf03f1caea
2 changed files with 18 additions and 0 deletions

13
policy/wscript_build Normal file
View File

@ -0,0 +1,13 @@
#! /usr/bin/env python
# encoding: utf-8
#
# Copyright (C) 2007 Richard Hughes <richard@hughsie.com>
#
# Licensed under the GNU General Public License Version 2
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#TODO: install the packagekit.policy file to /usr/share/PolicyKit/policy

View File

@ -41,9 +41,14 @@ def configure(conf):
conf.check_pkg('dbus-glib-1', destvar='DBUS_GLIB', vnum='0.60')
conf.check_pkg('sqlite3', destvar='SQLITE')
#we need both of these for the server
ret = conf.check_pkg('polkit-dbus', destvar='POLKIT_DBUS', vnum='0.5')
if ret:
ret = conf.check_pkg('polkit-grant', destvar='POLKIT_GRANT', vnum='0.5')
if ret:
#we only need the validation tool if we are doing the tests
if Params.g_options.tests:
ret = conf.find_program('polkit-config-file-validate', var='POLKIT_POLICY_FILE_VALIDATE'):
if ret:
conf.add_define('SECURITY_TYPE_POLKIT', 1)
else: