diff --git a/debian/rules b/debian/rules index 0721299..f8aa5d4 100755 --- a/debian/rules +++ b/debian/rules @@ -1,19 +1,18 @@ #!/usr/bin/make -f #export DH_VERBOSE=1 %: dh $@ --with python2 --with systemd override_dh_clean: dh_clean rm -rf build dist MANIFEST override_dh_install: - install -m 0644 *.ini.sample debian/sylkserver/etc/sylkserver/ dh_install override_dh_installinit: dh_installinit --no-start .PHONY: override_dh_clean override_dh_install override_dh_installinit diff --git a/debian/sylkserver-sounds.dirs b/debian/sylkserver-sounds.dirs deleted file mode 100644 index efc900c..0000000 --- a/debian/sylkserver-sounds.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/share/sylkserver diff --git a/debian/sylkserver-sounds.install b/debian/sylkserver-sounds.install index dd222db..1f29020 100644 --- a/debian/sylkserver-sounds.install +++ b/debian/sylkserver-sounds.install @@ -1 +1 @@ -usr/share +usr/share/sylkserver/sounds diff --git a/debian/sylkserver.dirs b/debian/sylkserver.dirs deleted file mode 100644 index 4769932..0000000 --- a/debian/sylkserver.dirs +++ /dev/null @@ -1,4 +0,0 @@ -etc/sylkserver -etc/sylkserver/tls -usr/bin -var/lib/sylkserver diff --git a/debian/sylkserver.install b/debian/sylkserver.install index 527b78f..25dfca5 100644 --- a/debian/sylkserver.install +++ b/debian/sylkserver.install @@ -1,2 +1,3 @@ usr/bin usr/lib +etc/sylkserver diff --git a/setup.py b/setup.py index 0407e34..00b2ae3 100755 --- a/setup.py +++ b/setup.py @@ -1,39 +1,43 @@ #!/usr/bin/python # Copyright (C) 2010-2012 AG Projects. See LICENSE for details # import glob import os import re from distutils.core import setup def get_version(): return re.search(r"""__version__\s+=\s+(?P['"])(?P.+?)(?P=quote)""", open('sylk/__init__.py').read()).group('version') def find_packages(toplevel): return [directory.replace(os.path.sep, '.') for directory, subdirs, files in os.walk(toplevel) if '__init__.py' in files] +def get_resource_files(resource): + for root, dirs, files in os.walk(os.path.join('resources', resource)): + yield (os.path.join('share/sylkserver', root[10:]), [os.path.join(root, f) for f in files]) + setup(name = "sylkserver", version = get_version(), author = "AG Projects", author_email = "support@ag-projects.com", url = "http://sylkserver.com", description = "SylkServer - An Extensible SIP Application Server", classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Service Providers", "License :: GNU General Public License 3", "Operating System :: OS Independent", "Programming Language :: Python" ], packages = find_packages('sylk'), scripts = ['sylk-server'], data_files = [('/var/lib/sylkserver', []), - ('share/sylkserver/tls', glob.glob(os.path.join('resources', 'tls', '*.crt'))), - ('share/sylkserver/sounds', glob.glob(os.path.join('resources', 'sounds', '*.wav'))), - ('share/sylkserver/sounds/moh', glob.glob(os.path.join('resources', 'sounds', 'moh','*.wav')))] + ('/etc/sylkserver', glob.glob('*.ini.sample')), + ('/etc/sylkserver/tls', glob.glob('resources/tls/*.crt'))] + \ + list(get_resource_files('sounds')) )