actions.py 894 B

12345678910111213141516171819202122232425262728293031
  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 autotools
  7. from inary.actionsapi import inarytools
  8. from inary.actionsapi import shelltools
  9. from inary.actionsapi import get
  10. def setup():
  11. inarytools.dosed("Makefile", "(?m)^(COPTS =.*)", "COPTS = %s -fPIE" % get.CFLAGS())
  12. inarytools.dosed("Makefile", "(?m)^(LOPTS =.*)", "LOPTS = %s -pie" % get.LDFLAGS())
  13. def build():
  14. shelltools.export("CC", get.CC())
  15. autotools.make("libdir")
  16. autotools.make()
  17. autotools.make("ether-wake")
  18. autotools.make("i18ndir")
  19. def install():
  20. autotools.rawInstall("BASEDIR=%s" % get.installDIR())
  21. inarytools.dosbin("ether-wake")
  22. inarytools.dosym("/bin/hostname", "/usr/bin/hostname")
  23. inarytools.dodoc("README", "README.ipv6", "TODO")