actions.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 perlmodules
  10. from pisi.actionsapi import get
  11. def setup():
  12. shelltools.export("AUTOPOINT", "/bin/true")
  13. # autotools.autoreconf("-vfi")
  14. autotools.configure("--disable-silent-rules \
  15. --disable-static \
  16. --disable-rpath \
  17. --enable-perl \
  18. --enable-ruby \
  19. --enable-lua \
  20. --enable-tcl \
  21. --enable-python \
  22. --with-rrd-default-font=/usr/share/fonts/dejavu/DejaVuSansMono.ttf \
  23. --with-perl-options='installdirs=vendor destdir=%(DESTDIR)s' \
  24. --with-ruby-options='sitedir=%(DESTDIR)s/usr/lib/ruby' \
  25. " % {"DESTDIR": get.installDIR()})
  26. pisitools.dosed("Makefile", "^RRDDOCDIR.*$", "RRDDOCDIR=${datadir}/doc/${PACKAGE}")
  27. pisitools.dosed("doc/Makefile", "^RRDDOCDIR.*$", "RRDDOCDIR=${datadir}/doc/${PACKAGE}")
  28. pisitools.dosed("bindings/Makefile", "^RRDDOCDIR.*$", "RRDDOCDIR=${datadir}/doc/${PACKAGE}")
  29. pisitools.dosed("examples/Makefile", "examplesdir = .*$", "examplesdir = $(datadir)/doc/${PACKAGE}/examples")
  30. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  31. def build():
  32. autotools.make()
  33. def install():
  34. autotools.rawInstall("DESTDIR=%s includedir=/usr/include" % get.installDIR())
  35. # remove unnecessary files
  36. perlmodules.removePacklist()
  37. perlmodules.removePodfiles()