actions.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/python
  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 pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def setup():
  11. pisitools.dosed("config/override.m4", "2.64", "2.69")
  12. shelltools.system('sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure')
  13. autotools.autoreconf("-vfi")
  14. autotools.configure("--with-system-readline \
  15. --with-separate-debug-dir=/usr/lib/debug \
  16. --with-gdb-datadir=/usr/share/gdb \
  17. --with-pythondir=/usr/lib/%s/site-packages \
  18. --disable-nls \
  19. --disable-rpath \
  20. --with-python \
  21. --with-expat" % get.curPYTHON())
  22. def build():
  23. autotools.make()
  24. def install():
  25. autotools.rawInstall('DESTDIR="%s"' % get.installDIR())
  26. for libdel in ["libbfd.a","libopcodes.a"]:
  27. pisitools.remove("/usr/lib/%s" % libdel)
  28. # these are not necessary
  29. #for info in ["bfd","configure","standards"]:
  30. #pisitools.remove("/usr/share/info/%s.info" % info)
  31. pisitools.remove("/usr/share/info/bfd.info")
  32. for hea in ["ansidecl","symcat","dis-asm", "bfd", "bfdlink", "plugin-api"]:
  33. pisitools.remove("/usr/include/%s.h" % hea)
  34. pisitools.dodoc("README*", "MAINTAINERS", "COPYING*", "ChangeLog*")