actions.py 2.2 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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import perlmodules
  11. def setup():
  12. shelltools.export("AUTOPOINT", "/bin/true")
  13. shelltools.export("PYTHON", "/usr/bin/python3")
  14. #autotools.autoreconf("-vfi")
  15. # suppress compiler warnings
  16. pisitools.cflags.add("-Wno-missing-prototypes -Wno-format-truncation -Wno-implicit-fallthrough -Wno-cast-function-type -Wstringop-truncation")
  17. # fix unused direct dependency analysis
  18. shelltools.export("LDSHARED", "x86_64-pc-linux-gnu-gcc -Wl,-O1,--as-needed -shared -lpthread")
  19. autotools.configure("--disable-silent-rules \
  20. --disable-static \
  21. --enable-perl \
  22. --enable-ruby \
  23. --enable-lua \
  24. --enable-tcl \
  25. --enable-python \
  26. --with-rrd-default-font=/usr/share/fonts/dejavu/DejaVuSansMono.ttf \
  27. --with-perl-options='installdirs=vendor destdir=%(DESTDIR)s' \
  28. --with-ruby-options='sitedir=%(DESTDIR)s/usr/lib/ruby' \
  29. " % {"DESTDIR": get.installDIR()})
  30. pisitools.dosed("Makefile", "^RRDDOCDIR.*$", "RRDDOCDIR=${datadir}/doc/${PACKAGE}")
  31. pisitools.dosed("doc/Makefile", "^RRDDOCDIR.*$", "RRDDOCDIR=${datadir}/doc/${PACKAGE}")
  32. pisitools.dosed("bindings/Makefile", "^RRDDOCDIR.*$", "RRDDOCDIR=${datadir}/doc/${PACKAGE}")
  33. pisitools.dosed("examples/Makefile", "examplesdir = .*$", "examplesdir = $(datadir)/doc/${PACKAGE}/examples")
  34. # TODO: fix rpath and unused direct dependency analysis
  35. # fix unused direct dependency analysis
  36. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  37. def build():
  38. autotools.make()
  39. def install():
  40. autotools.rawInstall("DESTDIR=%s includedir=/usr/include" % get.installDIR())
  41. # remove unnecessary files
  42. perlmodules.removePacklist()
  43. perlmodules.removePodfiles()