actions.py 664 B

123456789101112131415161718192021222324
  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 shelltools, get
  7. shelltools.export("PYTHONDONTWRITEBYTECODE", "1")
  8. i = "/usr/bin/env python3 $(which scons)"
  9. def setup():
  10. pass
  11. def build():
  12. shelltools.system("%s target_python=python3 prefix=/usr sbindir=/usr/sbin udevdir=/lib/udev" % i)
  13. def install():
  14. shelltools.system("DESTDIR=%s %s udev-install prefix=/usr" % (get.installDIR(), i))
  15. # fix shebang
  16. shelltools.system("find %s/usr/bin -type f -exec sed -i 's|env\ python$|env python3|g' {} \;" % get.installDIR())