actions.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. WorkDir="%s" % get.srcDIR().replace("_", "")
  11. def setup():
  12. shelltools.export("CFLAGS", "%s -pie -fPIE -fno-strict-aliasing" % get.CFLAGS())
  13. # needed to link with avahi
  14. shelltools.export("ac_cv_header_dns_sd_h", "yes")
  15. shelltools.export("ac_cv_lib_dns_sd_DNSServiceRegister", "yes")
  16. #pisitools.dosed("ntpstat-0.2/Makefile", "^CC=.*gcc", "CC=%s" % get.CC())
  17. #pisitools.dosed("ntpstat-0.2/Makefile", "^CFLAGS=.*", "CFLAGS=%s" % get.CFLAGS())
  18. autotools.configure("--enable-all-clocks \
  19. --enable-parse-clocks \
  20. --enable-linuxcaps \
  21. --enable-ipv6 \
  22. --enable-ntp-signd \
  23. --with-crypto")
  24. def build():
  25. autotools.make()
  26. #autotools.make("-C ntpstat-0.2")
  27. #shelltools.cd("html")
  28. #shelltools.system("../scripts/html2man")
  29. #shelltools.system("../fix-man-pages")
  30. def install():
  31. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  32. # Remove autotools installed man pages
  33. pisitools.removeDir("/usr/share/man")
  34. # pisitools.doman("html/man/man5/*.5", "html/man/man8/*.8")
  35. for sbin in ["sntp", "ntpdc", "ntpd", "ntp-keygen", "ntp-wait",
  36. "ntpq", "ntptime", "ntptrace", "tickadj", "ntpsnmpd", "ntpdate"]:
  37. pisitools.domove("/usr/bin/%s" % sbin, "/usr/sbin")
  38. # Additional ntpstat binary and man page
  39. #pisitools.dobin("ntpstat-0.2/ntpstat")
  40. #pisitools.doman("ntpstat-0.2/ntpstat.1")
  41. pisitools.dodir("/var/lib/ntp")
  42. #pisitools.removeDir("/usr/lib")
  43. pisitools.dohtml("html/*")
  44. pisitools.dodoc("ChangeLog", "NEWS", "README", "TODO", "WHERE-TO-START")