actions.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. shelltools.system("ls")
  21. # Dirty fix for now... (especially for flatpak)
  22. shelltools.system("mv %s/run/* %s/dev" % (get.installDIR(), get.installDIR()))
  23. # pisitools.remove("/var/lock")
  24. # shelltools.cd("%s/var" % get.installDIR())
  25. # shelltools.system("ln -rs %s/dev/lock %s/var/lock" % (get.installDIR(), get.installDIR()))
  26. # shelltools.cd("%s/baselayout/src" % get.workDIR())
  27. # Adjust permissions
  28. chmod("/tmp", 01777)
  29. chmod("/var/tmp", 01777)
  30. chmod("/dev/shm", 01777)
  31. chmod("/var/lock", 0775)
  32. chmod("/usr/share/baselayout/shadow", 0600)
  33. if get.ARCH() == "x86_64":
  34. # Directories for 32bit libraries
  35. pisitools.dodir("/lib32")
  36. pisitools.dodir("/usr/lib32")
  37. # Hack for binary blobs built on multi-lib systems
  38. pisitools.dosym("lib", "/lib64")
  39. pisitools.dosym("pisilinux-release", "/etc/system-release")
  40. #File conflicts:
  41. pisitools.removeDir("/usr/share/man/man4")