actions.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 shelltools
  9. from pisi.actionsapi import get
  10. WorkDir = "lash-0.6.0.594"
  11. def setup():
  12. shelltools.export("CFLAGS", "%s -D_GNU_SOURCE -ldl -ldm -lm -lreadline" % get.CFLAGS())
  13. autotools.autoreconf("-fi")
  14. autotools.configure("--with-python")
  15. #fix unused direct deps.
  16. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  17. def build():
  18. pisitools.dosed("libtool", "^hardcode_libdir_flag_spec=.*", "")
  19. pisitools.dosed("libtool", "^runpath_var=LD_RUN_PATH", "runpath_var=DIE_RPATH_DIE")
  20. autotools.make()
  21. def install():
  22. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  23. shelltools.chmod("%s/usr/lib/%s/site-packages/lash.py" % (get.installDIR(), get.curPYTHON()), 0644)
  24. for s in ("16", "24", "48", "96"):
  25. pisitools.dodir("/usr/share/icons/hicolor/%sx%s/apps" % (s, s))
  26. pisitools.domove("usr/share/lash/icons/lash_%spx.png" % s, "/usr/share/icons/hicolor/%sx%s/apps" % (s, s), "lash.png")
  27. pisitools.domove("usr/share/lash/icons/lash.svg", "/usr/share/icons/hicolor/scalable/apps")
  28. pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "NEWS", "README*", "TODO")