actions.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. cfgsettings = """-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
  11. -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
  12. -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
  13. -DNON_INTERACTIVE_LOGIN_SHELLS \
  14. -DSSH_SOURCE_BASHRC"""
  15. #-DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
  16. def setup():
  17. # Recycles pids is neccessary. When bash's last fork's pid was X and new fork's pid is also X,
  18. # bash has to wait for this same pid. Without Recycles pids bash will not wait.
  19. shelltools.export("CFLAGS", "%s -D_GNU_SOURCE -DRECYCLES_PIDS %s " % (get.CFLAGS(), cfgsettings))
  20. autotools.autoconf()
  21. autotools.configure("--without-installed-readline \
  22. --disable-profiling \
  23. --without-gnu-malloc \
  24. --disable-rpath \
  25. --with-curses")
  26. def build():
  27. autotools.make()
  28. # FIXME: package build stops right after checking even when no errors happen (probably
  29. # due to SIGHUP in test). It is the duty of the packager to run tests by hand.
  30. #def check():
  31. # autotools.make("check")
  32. def install():
  33. autotools.install()
  34. pisitools.domove("/usr/bin/bash", "/bin")
  35. pisitools.dosym("/bin/bash","/bin/sh")
  36. pisitools.dosym("/bin/bash","/bin/rbash")
  37. # Compatibility with old skels
  38. # pisitools.dosym("/etc/bash/bashrc", "/etc/bashrc")
  39. pisitools.dosym("bash.info", "/usr/share/info/bashref.info")
  40. pisitools.doman("doc/bash.1", "doc/bashbug.1", "doc/builtins.1", "doc/rbash.1")
  41. pisitools.dodoc("README", "NEWS", "AUTHORS", "CHANGES", "COMPAT", "Y2K", "doc/FAQ", "doc/INTRO")