69 lines
2.5 KiB
Python
69 lines
2.5 KiB
Python
#! /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.
|
|
|
|
import misc
|
|
import Common
|
|
|
|
#only install if we are testing
|
|
if Params.g_options.tests:
|
|
bld.add_subdirs('tests')
|
|
|
|
#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'
|
|
|
|
#set the servicedir in org.freedesktop.PackageKit.service and install
|
|
obj=bld.create_obj('subst')
|
|
obj.source = 'org.freedesktop.PackageKit.yumBackend.service.in'
|
|
obj.target = 'org.freedesktop.PackageKit.yumBackend.service'
|
|
obj.dict = {'servicedir': '/usr/sbin'}
|
|
obj.fun = misc.subst_func
|
|
obj.install_var = 'PREFIX'
|
|
obj.install_subdir = 'usr/share/dbus-1/system-services'
|
|
|
|
#set the user in packagekit.pc.in and install
|
|
obj=bld.create_obj('subst')
|
|
obj.source = 'packagekit.pc.in'
|
|
obj.target = 'packagekit.pc'
|
|
#TODO: set these correctly
|
|
obj.dict = {'VERSION': 'dave', 'prefix':'PREFIX', 'exec_prefix':'PREFIX', 'libdir':'usr/lib', 'includedir':'usr/include'}
|
|
obj.fun = misc.subst_func
|
|
obj.install_var = 'PREFIX'
|
|
obj.install_subdir = 'usr/lib/pkgconfig'
|
|
|
|
#set the user in org.freedesktop.PackageKit.conf.in and install
|
|
obj=bld.create_obj('subst')
|
|
obj.source = 'org.freedesktop.PackageKit.conf.in'
|
|
obj.target = 'org.freedesktop.PackageKit.conf'
|
|
obj.dict = {'PACKAGEKIT_USER': Params.g_options.user}
|
|
obj.fun = misc.subst_func
|
|
obj.install_var = 'PREFIX'
|
|
obj.install_subdir = 'etc/dbus-1/system.d'
|
|
|
|
#set the user in org.freedesktop.PackageKit.yumBackend.conf.in and install
|
|
obj=bld.create_obj('subst')
|
|
obj.source = 'org.freedesktop.PackageKit.yumBackend.conf.in'
|
|
obj.target = 'org.freedesktop.PackageKit.yumBackend.conf'
|
|
obj.dict = {'PACKAGEKIT_USER': Params.g_options.user}
|
|
obj.fun = misc.subst_func
|
|
obj.install_var = 'PREFIX'
|
|
obj.install_subdir = 'etc/dbus-1/system.d'
|
|
|
|
#install the data files
|
|
Common.install_files('PREFIX', os.path.join('var', 'run', 'PackageKit'), 'job_count.dat')
|
|
Common.install_files('PREFIX', os.path.join('var', 'lib', 'PackageKit'), 'transactions.db')
|
|
|