actions.py 806 B

1234567891011121314151617181920212223242526
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. dirs = ("dict", "rfc")
  10. def setup():
  11. autotools.configure("--datadir=/usr/share/misc")
  12. def install():
  13. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  14. for d in dirs:
  15. pisitools.dodir("/usr/share/%s" % d)
  16. for line in tuple(open("Makefile.am", 'r')):
  17. if line.startswith(d):
  18. for f in line.strip().split("=")[1][1:].split(" "):
  19. pisitools.domove("/usr/share/misc/%s" % f, "/usr/share/%s/" % d)
  20. pisitools.dodoc("GNU*", "NEWS", "ORIGIN", "README", "dict-README")