Source

ZipExtractAllForN9 / build_zipextractall.py

#!/usr/bin/env python

import pypackager
import os

__version__ = '0.0.1'
__build__ = '6'
__author__ = "yuji.developer"
__mail__ = "yuji.developer@gmail.com"

if __name__ == "__main__":
    try:
        os.chdir(os.path.dirname(sys.argv[0]))
    except:
        pass

    p=pypackager.PyPackager("zipextractall")
    p.version = __version__
    p.buildversion = __build__
    p.description="Zip extratall tool."
    p.upgrade_description = ""
    p.author=__author__
    p.maintainer=__author__
    p.email=__mail__
    p.depends = "python2.6"
    p.section="user/utilities"
    p.arch="armel"
    p.urgency="low"
    p.icon='zipextractall.png'
    p.distribution="harmattan"
    p.repository="extras-devel"
    p.bugtracker = 'http://yujideveloper.wordpress.com/'
    dir_name = "src"
    for root, dirs, files in os.walk(dir_name):
      real_dir = root[len(dir_name):]
      fake_file = []      
      for f in files:
        fake_file.append(root + os.sep + f + "|" + f)
      if len(fake_file) > 0:
        p[real_dir] = fake_file
    p.postinstall = '''#!/bin/sh
chmod +x /usr/bin/zipextractall'''
    p.changelog = changelog="* Initial Release"
    print p
    #print p.generate(build_binary=False,build_src=True)
    print p.generate(build_binary=True,build_src=False)