actions.py 980 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("CFLAGS","-I/usr/src/linux-headers-5.8.0-sulinos/include/")
  15. shelltools.system("yes | make update")
  16. autotools.make("libdir")
  17. autotools.make()
  18. autotools.make("ether-wake")
  19. autotools.make("i18ndir")
  20. def install():
  21. autotools.rawInstall("BASEDIR=%s" % get.installDIR())
  22. inarytools.dosbin("ether-wake")
  23. inarytools.dosym("/bin/hostname", "/usr/bin/hostname")
  24. inarytools.dodoc("README", "README.ipv6", "TODO")