actions.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. console_tools = ["as10k1", "hdsploader", "hda-verb",
  11. "mixartloader", "vxloader",
  12. "usx2yloader", "sscape_ctl",
  13. "sb16_csp", "as10k1", "ld10k1",
  14. "us428control", "seq/sbiload"]
  15. gui_tools = ["envy24control", "rmedigicontrol", "hdspconf",
  16. "hdspmixer", "echomixer", "hwmixvolume"]
  17. alsa_tools = gui_tools + console_tools
  18. docs = ["README", "AUTHORS", "COPYING", "TODO", "NEWS", "ChangeLog"]
  19. if "_" in get.srcVERSION():
  20. WorkDir = get.srcNAME()
  21. def setup():
  22. for tool in alsa_tools:
  23. shelltools.cd(tool)
  24. if tool in ["hdspconf", "ld10k1", "hdspmixer"]:
  25. autotools.autoreconf("-fi")
  26. autotools.configure()
  27. shelltools.cd("..")
  28. def build():
  29. for tool in alsa_tools:
  30. shelltools.cd(tool)
  31. autotools.make()
  32. shelltools.cd("..")
  33. def install():
  34. for tool in alsa_tools:
  35. shelltools.cd(tool)
  36. autotools.rawInstall("DESTDIR=\"%s\"" % get.installDIR())
  37. for doc in [d for d in docs if shelltools.can_access_file(d)]:
  38. if tool in gui_tools:
  39. srctag = "alsa-tools-gui"
  40. else:
  41. srctag = get.srcNAME()
  42. pisitools.insinto("/usr/share/doc/%s/%s" % (srctag, tool), doc)
  43. shelltools.cd("..")
  44. pisitools.remove("/usr/share/applications/hdspmixer.desktop")
  45. pisitools.remove("/usr/share/applications/hdspconf.desktop")