2
# setup.py - Build system for Ubuntu SSO Client package
4
# Copyright 2010 Canonical Ltd.
6
# This program is free software: you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License version 3, as published
8
# by the Free Software Foundation.
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranties of
12
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13
# PURPOSE. See the GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License along
16
# with this program. If not, see <http://www.gnu.org/licenses/>.
22
from distutils.core import setup
23
from distutils.spawn import find_executable
24
from distutils.command import clean, build
26
# Defining variables for various rules here, similar to a Makefile.am
27
CLEANFILES = ['data/com.ubuntu.sso.service']
29
# XXX: This needs some serious cleanup
30
class SSOBuild(build.build):
31
"""Class to build the extra files."""
33
description = 'build extra files needed by ubuntu-sso-client'
37
sed = find_executable('sed')
39
sys.stderr.write('Cannont find sed; required to build')
42
in_file = 'data/com.ubuntu.sso.service.in'
43
out_file = 'data/com.ubuntu.sso.service'
44
replaced_path = '/usr/lib/ubuntu-sso-client'
46
os.system("%(cmd)s -e 's|\@libexecdir\@|%(rep)s|g' < %(in)s > %(out)s" %
48
'rep' : replaced_path,
54
# Run the parent build command
58
class SSOClean(clean.clean):
59
"""Class to clean up after the build."""
61
description = 'Clean up built files.'
64
"""Clean up the built files."""
65
for built_file in CLEANFILES:
68
# Run the parent clean command
73
name='ubuntu-sso-client',
76
author='Natalia Bidart',
77
author_email='natalia.bidart@canonical.com',
78
description='Ubuntu Single Sign-On client',
79
long_description='Desktop service to allow applications to sign in' \
80
'to Ubuntu services via SSO',
81
url='https://launchpad.net/ubuntu-sso-client',
82
packages=['ubuntu_sso'],
83
data_files=[('share/dbus-1/services',
84
['data/com.ubuntu.sso.service',]),
85
('/etc/xdg/ubuntu-sso/',
86
['data/oauth_urls',]),
87
('/etc/xdg/ubuntu-sso/oauth_registration.d',
88
['data/oauth_registration.d/ubuntuone',]),
89
('lib/ubuntu-sso-client',
90
['bin/ubuntu-sso-login',]),