actions.py 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env python3
  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 inary.actionsapi import get
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import inarytools
  9. def build():
  10. inarytools.dosed("src/Makefile", "=-shared", r"= -Wl,-O1,--as-needed -shared")
  11. if get.buildTYPE() == "emul32":
  12. inarytools.dosed(".", "\/lib$", r"/lib%s\n" % "32" if get.buildTYPE() == "emul32" else "", filePattern="Makefile")
  13. autotools.make()
  14. def install():
  15. if get.buildTYPE() == "emul32":
  16. autotools.rawInstall("prefix=%s/usr \
  17. includedir=%s/usr/include \
  18. libdir%s/=usr/lib32 " % ((get.installDIR(), ) * 3))
  19. inarytools.remove("/usr/lib32/libaio.a")
  20. else:
  21. autotools.rawInstall("prefix=%s/usr \
  22. includedir=%s/usr/include \
  23. libdir%s/=usr/lib " % ((get.installDIR(), ) * 3))
  24. inarytools.remove("/usr/lib/libaio.a")
  25. inarytools.dodoc("ChangeLog", "COPYING", "TODO")