actions.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import shelltools
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. def build():
  10. # NOTE: This is only for the start-stop-daemon
  11. autotools.make('-C src CC="%s" LD="%s %s" CFLAGS="%s"' % (get.CC(), get.CC(), get.LDFLAGS(), get.CFLAGS()))
  12. def install():
  13. def chmod(path, mode):
  14. shelltools.chmod("%s%s" % (get.installDIR(), path), mode)
  15. # Install everything
  16. pisitools.insinto("/", "root/*")
  17. # Install baselayout utilities
  18. shelltools.cd("src/")
  19. autotools.rawInstall('DESTDIR="%s"' % get.installDIR())
  20. # Adjust permissions
  21. chmod("/tmp", 01777)
  22. chmod("/var/tmp", 01777)
  23. chmod("/run/shm", 01777)
  24. chmod("/var/lock", 0775)
  25. chmod("/usr/share/baselayout/shadow", 0600)
  26. if get.ARCH() == "x86_64":
  27. # Directories for 32bit libraries
  28. pisitools.dodir("/lib32")
  29. pisitools.dodir("/usr/lib32")
  30. # Hack for binary blobs built on multi-lib systems
  31. pisitools.dosym("lib", "/lib64")
  32. pisitools.dosym("pisilinux-release", "/etc/system-release")