actions.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import kerneltools
  11. KDIR = kerneltools.getKernelVersion()
  12. def setup():
  13. # dkms
  14. shelltools.copytree("driver", "dkms")
  15. pisitools.dosed("dkms.conf", "#MODULE_VERSION#", get.srcVERSION())
  16. def build():
  17. autotools.make("-C driver KVERS_UNAME=%s" % KDIR)
  18. autotools.make("-C utils")
  19. def install():
  20. pisitools.insinto("/lib/modules/%s/extra" % KDIR, "*/*.ko")
  21. pisitools.dosbin("utils/ndiswrapper*", "/usr/sbin")
  22. pisitools.dosbin("utils/loadndisdriver", "/sbin")
  23. # add man
  24. pisitools.doman("*.8")
  25. pisitools.dodir("/etc/ndiswrapper")
  26. pisitools.dodoc("README", "AUTHORS", "ChangeLog")
  27. # dkms
  28. pisitools.insinto("/usr/src/%s-%s" % (get.srcNAME(), get.srcVERSION()), "dkms/*")
  29. pisitools.insinto("/usr/src/%s-%s" % (get.srcNAME(), get.srcVERSION()), "dkms.conf")