actions.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file https://www.gnu.org/licenses/gpl-3.0.txt
  6. from pisi.actionsapi import shelltools, mesontools, cmaketools, pisitools, get
  7. j = ''.join([
  8. ' -DCMAKE_BUILD_TYPE=None',
  9. ' -DENABLE_EXAMPLES=ON',
  10. ' -DENABLE_MILTER=OFF',
  11. ' -DENABLE_SYSTEMD=OFF',
  12. ' -DAPP_CONFIG_DIRECTORY=/etc/clamav',
  13. ' -DDATABASE_DIRECTORY=/var/lib/clamav',
  14. ' -B_build -G Ninja -L '
  15. ])
  16. def setup():
  17. shelltools.export("CFLAGS", "%s -I/usr/include/iconv " % get.CFLAGS())
  18. cmaketools.configure(j)
  19. def build():
  20. mesontools.build("-C _build")
  21. def check():
  22. # failed utf16 to utf8 converting
  23. #pass
  24. mesontools.build("-C _build test")
  25. def install():
  26. mesontools.install("-C _build install")
  27. #pisitools.dodir("/run/clamav")
  28. pisitools.dodir("/var/lib/clamav")
  29. #pisitools.dodir("/var/log/clamav")
  30. for t in shelltools.ls("%s/etc/clamav" % get.installDIR()):
  31. pisitools.rename("/etc/clamav/%s" % t, t.replace(".sample", ""))