actions.py 833 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import get
  9. import os
  10. WorkDir="."
  11. def fixperms(d):
  12. for root, dirs, files in os.walk(d):
  13. for name in dirs:
  14. shelltools.chmod(os.path.join(root, name), 0755)
  15. for name in files:
  16. shelltools.chmod(os.path.join(root, name), 0644)
  17. def setup():
  18. fixperms("%s-%s/wallpapers" % (get.srcNAME(), get.srcVERSION()))
  19. def install():
  20. pisitools.insinto("%s/share/" % get.defaultprefixDIR(), "%s-%s/wallpapers" % (get.srcNAME(), get.srcVERSION()))
  21. pisitools.insinto("%s/share/" % get.defaultprefixDIR(), "sample-files", "example-content")