actions.py 932 B

1234567891011121314151617181920212223242526272829
  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 setup():
  11. shelltools.system("./autogen.sh")
  12. autotools.configure("PYTHON=/usr/bin/python3 --with-python")
  13. def build():
  14. autotools.make("CC=%s" % get.CC())
  15. autotools.make("V=1 CC=%s CFLAGS=\"%s\"" % (get.CC(), get.CFLAGS()))
  16. autotools.make("V=1 CC=%s CFLAGS=\"%s\" btrfs-select-super" % (get.CC(), get.CFLAGS()))
  17. def install():
  18. autotools.rawInstall("prefix=/usr DESTDIR=%s" % get.installDIR())
  19. inarytools.remove("/usr/lib/*.a")
  20. inarytools.insinto("/usr/bin", "bcp", "btrfs-bcp")
  21. inarytools.insinto("/usr/bin", "show-blocks", "btrfs-show-blocks")
  22. inarytools.dodoc("COPYING")