actions.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. from inary.actionsapi import shelltools
  10. def builddiet():
  11. autotools.make("clean")
  12. shelltools.export("CC", "diet %s %s %s %s -DHAVE_STDINT_H -Os -static" % (get.CC(), get.CFLAGS(), get.CXXFLAGS(), get.LDFLAGS()))
  13. autotools.make("mdadm.static")
  14. autotools.make("mdassemble.static")
  15. inarytools.insinto("/sbin", "mdadm.static")
  16. inarytools.insinto("/sbin", "mdassemble.static")
  17. def build():
  18. inarytools.dosed("Makefile", "(Wall) -Werror", "\\1")
  19. autotools.make("SYSCONFDIR=/%s MDASSEMBLE_AUTO=1 mdadm mdmon" % get.confDIR())
  20. def install():
  21. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  22. # Remove the udev file as its shipped with udev package
  23. inarytools.remove("/lib/udev/rules.d/*")
  24. # Install config file
  25. inarytools.insinto("/etc", "mdadm.conf-example", "mdadm.conf")
  26. #builddiet()
  27. inarytools.dodoc("TODO", "ChangeLog", "COPYING", "mdadm.conf-example", "misc/*")