3
# Copyright (C) 2009 Martin Owens
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
from GroundControl import __appname__, __version__
21
from distutils.core import setup
22
from distutils.command.install_lib import install_lib
23
from DistUtilsExtra.command import *
24
from fnmatch import fnmatch
28
MODULE = 'GroundControl'
30
# remove MANIFEST. distutils doesn't properly update it
31
# when the contents of directories change.
32
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
34
if platform.system() == 'FreeBSD':
40
INTLTOOL_MERGE='intltool-merge'
41
desktop_in='groundcontrol.desktop.in'
42
desktop_data='groundcontrol.desktop'
44
class groundcontrol_build_i18n(build_i18n.build_i18n):
46
build_i18n.build_i18n.run(self)
47
# Build the desktop file
48
os.system ("C_ALL=C " + INTLTOOL_MERGE + " -d -u -c " + TOP_BUILDDIR +
49
"/po/.intltool-merge-cache " + TOP_BUILDDIR + "/po " +
50
desktop_in + " " + desktop_data)
53
dir, pattern = os.path.split(os.path.join(*dirs))
54
return [os.path.join(dir, filename)
55
for filename in os.listdir(os.path.abspath(dir))
56
if filename[0] != '.' and fnmatch(filename, pattern)]
58
# Generate a standard share dir
59
SDIR = 'share/%s/' % __appname__
63
version = __version__,
64
description = 'Ground Control - Launchpad Desktop Integration',
65
long_description = "Integrates the Launchpad service stack with the desktop.",
66
author = 'Martin Owens',
67
author_email = 'doctormo@ubuntu.com',
68
url = 'https://code.launchpad.net/groundcontrol',
71
packages = [ MODULE ],
72
scripts = listfiles( 'bin', 'lp-*' ),
74
( SDIR, listfiles( 'bin', '*.py' ) ),
75
( SDIR + 'glade', listfiles( 'glade', '*.glade' ) ),
76
( SDIR + 'pixmaps', listfiles( 'pixmaps', '*.svg' ) ),
77
( SDIR + 'pixmaps/chicons', listfiles( 'pixmaps/chicons', '*.svg' ) ),
78
( SDIR + 'pixmaps/status', listfiles( 'pixmaps/status', '*.svg' ) ),
79
( SDIR + 'pixmaps/person', listfiles( 'pixmaps/person', '*.svg' ) ),
80
( SDIR + 'pixmaps/project', listfiles( 'pixmaps/project', '*.svg' ) ),
81
( SDIR + 'pixmaps/bugs', listfiles( 'pixmaps/bugs', '*.svg' ) ),
82
( SDIR + 'pixmaps/animation', listfiles( 'pixmaps/animation', '*.svg' ) ),
83
( 'lib/nautilus/extensions-2.0/python/', [ 'nautilus-groundcontrol.py' ] ),
84
( 'share/applications/', [ 'groundcontrol.desktop' ] ),
85
( 'share/pixmaps/', [ 'pixmaps/groundcontrol.svg' ] ),
86
( os.path.join(man_dir, 'man1'), listfiles( 'doc', '*.1' ) ),
89
'build' : build_extra.build_extra,
90
'build_i18n' : groundcontrol_build_i18n,