Initial packaging configured
authorepage <epage@1a2a05ed-a369-0410-af37-574249971199>
Fri, 28 May 2010 10:57:32 +0000 (10:57 +0000)
committerepage <epage@1a2a05ed-a369-0410-af37-574249971199>
Fri, 28 May 2010 10:57:32 +0000 (10:57 +0000)
git-svn-id: https://dev.lds.org/svn/mormonchannel/trunk/maemo/trunk@504 1a2a05ed-a369-0410-af37-574249971199

Makefile
data/COPYING [new file with mode: 0644]
data/COPYRIGHT [deleted file]
src/MormonChannel.py
src/constants.py
support/builddeb.py

index 223fd3b..9ab1ef6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,9 @@ PROJECT_NAME=MormonChannel
 SOURCE_PATH=src
 SOURCE=$(shell find $(SOURCE_PATH) -iname "*.py")
 PROGRAM=$(SOURCE_PATH)/mormonchannel_gtk.py
+DATA_PATH=data
 DATA_TYPES=*.ini *.map *.glade *.png
-DATA=$(foreach type, $(DATA_TYPES), $(shell find $(SOURCE_PATH) -iname "$(type)"))
+DATA=$(foreach type, $(DATA_TYPES), $(shell find $(DATA_PATH) -iname "$(type)")) data/COPYING
 OBJ=$(SOURCE:.py=.pyc)
 BUILD_PATH=./build
 TAG_FILE=~/.ctags/$(PROJECT_NAME).tags
@@ -44,12 +45,9 @@ package: $(OBJ)
        cp $(SOURCE_PATH)/constants.py  $(BUILD_PATH)/generic
        cp $(SOURCE_PATH)/$(PROJECT_NAME).py  $(BUILD_PATH)/generic
        $(foreach file, $(DATA), cp $(file) $(BUILD_PATH)/generic/$(subst /,-,$(file)) ; )
-       $(foreach file, $(SOURCE), cp $(file) $(BUILD_PATH)/generic/$(subst /,-,$(file)) ; )
-       #$(foreach file, $(OBJ), cp $(file) $(BUILD_PATH)/generic/$(subst /,-,$(file)) ; )
+       $(foreach file, $(SOURCE) $(SOURCE_PATH)/LICENSE, cp $(file) $(BUILD_PATH)/generic/$(subst /,-,$(file)) ; )
        cp support/$(PROJECT_NAME).desktop $(BUILD_PATH)/generic
-       cp support/icons/hicolor/26x26/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/generic/26x26-$(PROJECT_NAME).png
-       cp support/icons/hicolor/64x64/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/generic/64x64-$(PROJECT_NAME).png
-       cp support/icons/hicolor/scalable/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/generic/scale-$(PROJECT_NAME).png
+       cp data/icon.png $(BUILD_PATH)/generic/48x48-$(PROJECT_NAME).png
        cp support/builddeb.py $(BUILD_PATH)/generic
        cp support/py2deb.py $(BUILD_PATH)/generic
        cp support/fake_py2deb.py $(BUILD_PATH)/generic
diff --git a/data/COPYING b/data/COPYING
new file mode 100644 (file)
index 0000000..1bbeb88
--- /dev/null
@@ -0,0 +1 @@
+Copyright 2010 Intellectual Reserve, Inc.
diff --git a/data/COPYRIGHT b/data/COPYRIGHT
deleted file mode 100644 (file)
index 1bbeb88..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Copyright 2010 Intellectual Reserve, Inc.
index 333caff..3dce591 100755 (executable)
@@ -13,7 +13,7 @@ import sys
 import logging
 
 _moduleLogger = logging.getLogger(__name__)
-sys.path.append('/usr/lib/mormonchannel')
+sys.path.append('../lib')
 
 
 import constants
index b5ff820..9559540 100644 (file)
@@ -1,7 +1,7 @@
 import os
 
 __pretty_app_name__ = "Mormon Channel"
-__app_name__ = "MormonChannel"
+__app_name__ = "mormonchannel"
 __version__ = "1.0.0"
 __build__ = 0
 __app_magic__ = 0x1AFF5
index 4a460f6..00da889 100755 (executable)
@@ -25,6 +25,7 @@ __email__ = ""
 __version__ = constants.__version__
 __build__ = constants.__build__
 __changelog__ = """
+Initial release
 """
 
 
@@ -34,13 +35,13 @@ gtk-update-icon-cache -f /usr/share/icons/hicolor
 """
 
 
-def find_files(path):
+def find_files(prefix, path):
        for root, dirs, files in os.walk(path):
                for file in files:
-                       if file.startswith("src-"):
+                       if file.startswith(prefix+"-"):
                                fileParts = file.split("-")
                                unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
-                               assert unused == "src"
+                               assert unused == prefix
                                relPath = os.sep.join(relPathParts)
                                yield relPath, file, newName
 
@@ -85,9 +86,9 @@ def build_package(distribution):
        p.recommends = ", ".join([
        ])
        p.section = {
-               "debian": "",
-               "diablo": "",
-               "fremantle": "",
+               "debian": "sound",
+               "diablo": "user/multimedia",
+               "fremantle": "user/multimedia",
        }[distribution]
        p.arch = "all"
        p.urgency = "low"
@@ -95,24 +96,26 @@ def build_package(distribution):
        p.repository = "extras"
        p.changelog = __changelog__
        p.postinstall = __postinstall__
-       p.icon = {
-               "debian": "",
-               "diablo": "",
-               "fremantle": "", # Fremantle natively uses 48x48
-       }[distribution]
-       p["/usr/bin"] = [ "" ]
-       for relPath, files in unflatten_files(find_files(".")).iteritems():
-               fullPath = ""
+       p.icon = "48x48-MormonChannel.png"
+       p["/opt/MormonChannel/bin"] = ["MormonChannel.py"]
+       for relPath, files in unflatten_files(find_files("src", ".")).iteritems():
+               fullPath = "/opt/MormonChannel/lib"
+               if relPath:
+                       fullPath += os.sep+relPath
+               p[fullPath] = list(
+                       "|".join((oldName, newName))
+                       for (oldName, newName) in files
+               )
+       for relPath, files in unflatten_files(find_files("data", ".")).iteritems():
+               fullPath = "/opt/MormonChannel/share"
                if relPath:
                        fullPath += os.sep+relPath
                p[fullPath] = list(
                        "|".join((oldName, newName))
                        for (oldName, newName) in files
                )
-       p["/usr/share/applications/hildon"] = [""]
-       p["/usr/share/icons/hicolor/26x26/hildon"] = [""]
-       p["/usr/share/icons/hicolor/64x64/hildon"] = [""]
-       p["/usr/share/icons/hicolor/scalable/hildon"] = [""]
+       p["/usr/share/applications/hildon"] = ["MormonChannel.desktop"]
+       p["/usr/share/icons/hicolor/48x48/hildon"] = ["48x48-MormonChannel.png|MormonChannel.png"]
 
        if distribution == "debian":
                print p