actions.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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 shelltools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import get
  10. def setup():
  11. shelltools.touch("ChangeLog")
  12. autotools.autoreconf("-fi")
  13. autotools.configure("--prefix=/usr \
  14. --sbindir=/usr/bin \
  15. --sysconfdir=/etc \
  16. --with-drivedbdir \
  17. --with-libsystemd=no \
  18. --with-libcap-ng=yes \
  19. --with-smartdscriptdir=/usr/share/smartmontools \
  20. --with-smartdplugindir=/usr/share/smartmontools/smartd_warning.d \
  21. --with-systemdsystemunitdir=no")
  22. def build():
  23. autotools.make("CXXFLAGS='%s -fpie'" % get.CXXFLAGS())
  24. def install():
  25. pisitools.dosed("smartd.service.in","sysconfig/smartmontools","conf.d/smartd")
  26. pisitools.dosed("smartd.service.in","smartd_opts","SMARTD_ARGS")
  27. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  28. pisitools.dodoc("AUTHORS", "NEWS", "README", "smartd.conf")