actions.py 993 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/copyleft/gpl.txt
  5. from pisi.actionsapi import get
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. WorkDir="peepdf_%s" % get.srcVERSION()
  9. def install():
  10. shelltools.cd("..")
  11. shelltools.copytree("peepdf_0.3/", "%s/usr/share/peepdf/" % get.installDIR())
  12. shelltools.cd(WorkDir)
  13. pisitools.remove("/usr/share/peepdf/AUTHORS")
  14. pisitools.remove("/usr/share/peepdf/CHANGELOG")
  15. pisitools.remove("/usr/share/peepdf/README")
  16. shelltools.makedirs(get.installDIR() + "/usr/bin")
  17. sqlninjaBashFile = open(get.installDIR() + "/usr/bin/peepdf", "w")
  18. sqlninjaBashFile.write("#!/bin/bash\nexec python /usr/share/peepdf/peepdf.py \"$@\"\n")
  19. sqlninjaBashFile.close()
  20. shelltools.system("chmod +x '%s/usr/bin/peepdf'" % get.installDIR())
  21. pisitools.dodoc("AUTHORS", "CHANGELOG", "README")