more waf goodness
This commit is contained in:
parent
cf03f1caea
commit
25f597189a
13
data/tests/wscript_build
Normal file
13
data/tests/wscript_build
Normal 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: Do nothing
|
||||
|
@ -9,12 +9,20 @@
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
bld.add_subdirs('tests')
|
||||
#only install if we are testing
|
||||
if Params.g_options.tests:
|
||||
bld.add_subdirs('tests')
|
||||
|
||||
#TODO: convert org.freedesktop.PackageKit.service.in to org.freedesktop.PackageKit.service
|
||||
#after populating @servicedir@ to $(sbindir)
|
||||
#set the servicedir in org.freedesktop.PackageKit.service and install
|
||||
obj=bld.create_obj('subst')
|
||||
obj.source = 'org.freedesktop.PackageKit.service.in'
|
||||
obj.target = 'org.freedesktop.PackageKit.service'
|
||||
obj.dict = {'servicedir': '/usr/sbin'}
|
||||
obj.fun = misc.subst_func
|
||||
obj.install_var = 'PREFIX'
|
||||
obj.install_subdir = 'usr/share/dbus-1/system-services'
|
||||
|
||||
#TODO: install properly
|
||||
install_files('$(localstatedir)', 'run', 'PackageKit', 'job_count.dat')
|
||||
install_files('$(PK_DB_DIR)', 'PackageKit', 'transactions.db')
|
||||
install_files('var', 'run', 'PackageKit', 'job_count.dat')
|
||||
install_files('var', 'lib', 'PackageKit', 'transactions.db')
|
||||
|
||||
|
12
wscript
12
wscript
@ -48,7 +48,7 @@ def configure(conf):
|
||||
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'):
|
||||
ret = conf.find_program('polkit-config-file-validate', var='POLKIT_POLICY_FILE_VALIDATE')
|
||||
if ret:
|
||||
conf.add_define('SECURITY_TYPE_POLKIT', 1)
|
||||
else:
|
||||
@ -120,9 +120,9 @@ def configure(conf):
|
||||
conf.add_define('PACKAGE', 'PackageKit')
|
||||
|
||||
#TODO: expand these into PREFIX and something recognised by waf
|
||||
conf.add_define('PK_CONF_DIR', '$(sysconfdir)/PackageKit')
|
||||
conf.add_define('PK_DB_DIR', '$(localstatedir)/lib/PackageKit')
|
||||
conf.add_define('PK_PLUGIN_DIR', '$(libdir)/packagekit-backend')
|
||||
conf.add_define('PK_CONF_DIR', '/etc/PackageKit')
|
||||
conf.add_define('PK_DB_DIR', '/var/lib/PackageKit')
|
||||
conf.add_define('PK_PLUGIN_DIR', '/usr/lib/packagekit-backend')
|
||||
|
||||
#TODO: can we define these here?
|
||||
#AC_SUBST(PK_PLUGIN_CFLAGS, "-I\$(top_srcdir)/src -I\$(top_srcdir)/libpackagekit $GLIB_CFLAGS $DBUS_CFLAGS $GMODULE_CFLAGS")
|
||||
@ -134,8 +134,8 @@ def configure(conf):
|
||||
def build(bld):
|
||||
# process subfolders from here
|
||||
# Pending dirs:
|
||||
# data docs libgbus libselftest man po policy python backends
|
||||
bld.add_subdirs('libpackagekit client libgbus libselftest etc')
|
||||
# docs libselftest man python backends
|
||||
bld.add_subdirs('libpackagekit client libgbus libselftest etc policy po data')
|
||||
|
||||
#set the user in packagekit.pc.in and install
|
||||
obj=bld.create_obj('subst')
|
||||
|
Loading…
Reference in New Issue
Block a user