Advertisement
Guest User

Untitled

a guest
Mar 4th, 2010
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.77 KB | None | 0 0
  1.  #!/usr/bin/python2.5
  2.  # -*- coding: utf-8 -*-
  3.  ## This program is free software; you can redistribute it and/or modify
  4.  ## it under the terms of the GNU General Public License as published
  5.  ## by the Free Software Foundation; version 2 only.
  6.  ##
  7.  ## This program is distributed in the hope that it will be useful,
  8.  ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  9.  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10.  ## GNU General Public License for more details.
  11.  ##
  12. import pypackager
  13. import os
  14. if __name__ == "__main__":
  15.      try:
  16.          os.chdir(os.path.dirname(sys.argv[0]))
  17.      except:
  18.          pass
  19.      print
  20.      p=pypackager.pypackager("healthcheck")  
  21.      p.display_name='Health Check'
  22.      p.version='0.5.2'
  23.      p.buildversion='4'    
  24.      p.description="Health Check, Test both camera's, GPS, LED's, vibration and show System Information. \n Developed for the Nokia N900 & Maemo 5 \n Bugs/Requests - http://talk.maemo.org/showthread.php?t=45453"
  25.      p.author="Greg Roberts"
  26.      p.mail="me@greg-roberts.com"
  27.      p.depends = "python2.5, python2.5-qt4-gui, python2.5-qt4-core, python-dbus, python2.5-gtk2, python-location, gstreamer-tools, pulseaudio-utils"
  28.      p.section="user/utilities"
  29.      p.icon = "/home/user/MyDocs/healthcheck/healthcheck.png"
  30.      p.arch="all"                #should be all for python, any for all arch
  31.      p.urgency="low"             #not used in maemo onl for deb os
  32.      p.distribution="fremantle"
  33.      p.repository="extras-devel"
  34.      p.bugtracker=="http://talk.maemo.org/showthread.php?t=45453"
  35.      #  p.postinstall="""#!/bin/sh
  36.      #  chmod +x /usr/bin/mclock.py""" #Set here your post install script
  37.      #  p.postremove="""#!/bin/sh
  38.      #  chmod +x /usr/bin/mclock.py""" #Set here your post remove script
  39.      #  p.preinstall="""#!/bin/sh
  40.      #  chmod +x /usr/bin/mclock.py""" #Set here your pre install script
  41.      #  p.preremove="""#!/bin/sh
  42.      #  chmod +x /usr/bin/mclock.py""" #Set here your pre remove script
  43.      p.changelog = "Added Pulse-Audio Tools - Tests Speakers"
  44.      
  45.      dir_name = "src"            #Name of the subfolder containing your package source files (e.g. usr\share\icons\hicolor\scalable\myappicon.svg, usr\lib\myapp\somelib.py). We suggest to leave it named src in all projects and will refer to that in the wiki article on maemo.org
  46.      #Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list
  47.      for root, dirs, files in os.walk(dir_name):
  48.          real_dir = root[len(dir_name):]
  49.          fake_file = []
  50.          for f in files:
  51.              fake_file.append(root + os.sep + f + "|" + f)
  52.          if len(fake_file) > 0:
  53.              p[real_dir] = fake_file
  54.  
  55.      print p.generate(build_binary=False,build_src=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement