actions.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file https://www.gnu.org/licenses/gpl-3.0.txt
  6. from pisi.actionsapi import get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. #shelltools.system('sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure')
  12. shelltools.makedirs("build")
  13. shelltools.cd("build")
  14. shelltools.system("../configure \
  15. --enable-tui \
  16. --prefix=/usr \
  17. --disable-nls \
  18. --with-system-readline \
  19. --enable-source-highlight \
  20. --with-python=/usr/bin/python3 \
  21. --with-gdb-datadir=/usr/share/gdb \
  22. --with-system-gdbinit=/etc/gdb/gdbinit \
  23. --with-separate-debug-dir=/usr/lib/debug")
  24. def build():
  25. shelltools.cd("build")
  26. autotools.make()
  27. def install():
  28. shelltools.cd("build")
  29. autotools.rawInstall('DESTDIR="%s"' % get.installDIR())
  30. # to prevent conflict with binutils delete these files:
  31. for libdel in ["libbfd.a", "libopcodes.a", "libctf.a", "libctf-nobfd.a", "libsframe.a"]:
  32. pisitools.remove("/usr/lib/%s" % libdel)
  33. for hea in ["ansidecl", "bfd", "bfdlink", "diagnostics", "dis-asm", "plugin-api", "symcat", "ctf", "ctf-api", "sframe-api", "sframe"]:
  34. pisitools.remove("/usr/include/%s.h" % hea)
  35. pisitools.remove("/usr/share/info/bfd.info")
  36. pisitools.remove("/usr/share/info/ctf-spec.info")
  37. pisitools.remove("/usr/share/info/sframe-spec.info")
  38. shelltools.cd("..")
  39. pisitools.dodoc("README*", "COPYING*", "ChangeLog*")