Some licensing stuff
[jamaendo] / setup.py
index c898aab..1abe4e7 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,47 @@
+#!/usr/bin/env python\r
+#\r
+# This file is part of Jamaendo.\r
+# Copyright (c) 2010, Kristoffer Gronlund\r
+# All rights reserved.\r
+#\r
+# Redistribution and use in source and binary forms, with or without\r
+# modification, are permitted provided that the following conditions are met:\r
+#     * Redistributions of source code must retain the above copyright\r
+#       notice, this list of conditions and the following disclaimer.\r
+#     * Redistributions in binary form must reproduce the above copyright\r
+#       notice, this list of conditions and the following disclaimer in the\r
+#       documentation and/or other materials provided with the distribution.\r
+#     * Neither the name of Jamaendo nor the\r
+#       names of its contributors may be used to endorse or promote products\r
+#       derived from this software without specific prior written permission.\r
+#\r
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
+# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\r
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
 from setuptools import setup, find_packages\r
+from glob import glob\r
+import os\r
+import sys\r
+\r
+running_on_tablet = os.path.exists('/etc/osso_software_version')\r
+\r
+applications_dir = 'share/applications'\r
+if running_on_tablet:\r
+    applications_dir += '/hildon'\r
+\r
+data_files = [\r
+    ('share/jamaendo', glob('data/*.png')),\r
+    (applications_dir, ['data/jamaendo.desktop']),\r
+    ('share/icons/hicolor/scalable/apps', ['data/jamaendo.png']),\r
+]\r
 \r
 import sys\r
 setup(\r
@@ -10,5 +53,7 @@ setup(
     packages = find_packages(exclude=['tests']),\r
     zip_safe=False,\r
     test_suite='tests.test_suite',\r
+    scripts = ['scripts/jamaendo'],\r
+    data_files = data_files\r
     )\r
 \r