actions.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 get
  9. from pisi.actionsapi import shelltools
  10. WorkDir="gsm-1.0-pl19"
  11. def setup():
  12. multilib = " -m32" if get.buildTYPE() == "emul32" else ""
  13. pisitools.dosed("Makefile", "pardusCC", "%s %s" % (get.CC(), multilib))
  14. pisitools.dosed("Makefile", "pardusCFLAGS", "%s %s" % (get.CFLAGS(), multilib))
  15. def build():
  16. autotools.make()
  17. def install():
  18. #if get.buildTYPE() == "emul32":
  19. #autotools.rawInstall("DESTDIR=%s bindir=/emul32 libdir=/usr/lib32" % get.installDIR())
  20. #pisitools.remove("/usr/lib32/libgsm.a")
  21. #return
  22. #else:
  23. #autotools.rawInstall("DESTDIR=%s bindir=/usr/bin" % get.installDIR())
  24. if get.buildTYPE() == "emul32":
  25. pisitools.insinto("/usr/lib32", "lib/*")
  26. #pisitools.remove("/usr/lib32/libgsm.a")
  27. return
  28. else:
  29. pisitools.insinto("/usr/bin", "bin/*")
  30. pisitools.insinto("/usr/lib", "lib/*")
  31. pisitools.insinto("/usr/include/gsm", "inc/*")
  32. pisitools.insinto("/usr/share/man/man3", "man/*")
  33. pisitools.domove("/usr/share/man/man3/toast.1", "/usr/share/man/man1")
  34. for bin in ["tcat","untoast"]:
  35. pisitools.remove("/usr/bin/%s" % bin)
  36. pisitools.dosym("toast", "/usr/bin/%s" % bin)
  37. # Move gsm.h out of gsm subdir
  38. # pisitools.insinto("/usr/include","inc/gsm.h")
  39. # pisitools.removeDir("/usr/include/gsm")
  40. # No static libs
  41. #pisitools.remove("/usr/lib/libgsm.a")
  42. pisitools.dodoc("ChangeLog", "COPYRIGHT", "MACHINES", "MANIFEST", "README")