summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..ad48412
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+
+import glob
+import os
+import re
+
+from distutils.core import setup
+
+def get_debian_version():
+ """look what Debian version we have"""
+ version = None
+ changelog = "debian/changelog"
+ if os.path.exists(changelog):
+ head = open(changelog).readline()
+ match = re.compile(".*\((.*)\).*").match(head)
+ if match:
+ version = match.group(1)
+ return version
+
+SCRIPTS = [
+ 'dh_xul-ext',
+ 'install-xpi',
+ 'xpi-pack',
+ 'xpi-repack',
+ 'xpi-unpack',
+ 'moz-version',
+]
+
+if __name__ == '__main__':
+ setup(name='mozilla-devscripts',
+ version=get_debian_version(),
+ scripts=[os.path.join('src', s) for s in SCRIPTS],
+ py_modules=['src/moz_version'],
+ data_files=[('share/doc/mozilla-devscripts', ['README']),
+ ('share/man/man1', glob.glob("man/*.1")),
+ ('share/mozilla-devscripts',
+ ['src/xpi.mk'] + glob.glob('src/xul-app-data.csv.*')),
+ ('share/perl5/Debian/Debhelper/Buildsystem',
+ ['src/Buildsystem/xul_ext.pm']),
+ ('share/perl5/Debian/Debhelper/Sequence',
+ ['src/Sequence/xul_ext.pm']),
+ ],
+ )