actions.py 1011 B

123456789101112131415161718192021222324252627282930313233
  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/copyleft/gpl.txt.
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. makeargs="prefix=/usr sbindir=/usr/bin mandir=/usr/share/man"
  10. def setup():
  11. pisitools.dosed("Makefile", "CC=.*", "CC=%s" % get.CC())
  12. pisitools.dosed("Makefile", "LDFLAGS=.*", \
  13. "LDFLAGS=%s" % get.LDFLAGS())
  14. pisitools.dosed("librtmp/Makefile", "CC=.*", \
  15. "CC=%s" % get.CC())
  16. def build():
  17. autotools.make(' -j1 %s XCFLAGS="%s"' % (makeargs, get.CFLAGS()) )
  18. def install():
  19. autotools.rawInstall(' -j1 %s DESTDIR=%s' % (makeargs, get.installDIR()))
  20. #pisitools.remove("/usr/lib/librtmp.a")
  21. pisitools.insinto("/usr/share/doc/%s" % get.srcNAME(), "librtmp/COPYING", "librtmp-COPYING")
  22. pisitools.dodoc("COPYING", "ChangeLog", "README")