actions.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 libtools
  10. from pisi.actionsapi import get
  11. WorkDir = "tcp_wrappers_%s" % get.srcVERSION()
  12. def setup():
  13. shelltools.chmod("Makefile", 0755)
  14. pisitools.dosed("Makefile", "@make", "@$(MAKE) ")
  15. pisitools.dosed("Makefile", "make;", "$(MAKE);")
  16. def build():
  17. MINOR = "7"
  18. REL = "6"
  19. shelltools.export("PARDUS_CFLAGS", "%s" % get.CFLAGS())
  20. args = 'REAL_DAEMON_DIR=%s \
  21. PARDUS_OPT="-fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" \
  22. MAJOR=0 MINOR=%s REL=%s' % ( get.sbinDIR(), MINOR, REL )
  23. autotools.make("%s config-check" % args)
  24. autotools.make('%s LDFLAGS="-pie %s" linux' % (args, get.LDFLAGS()))
  25. def install():
  26. for app in ["tcpd","tcpdchk","tcpdmatch","safe_finger","try-from"]:
  27. pisitools.dosbin(app)
  28. pisitools.insinto("/usr/include", "tcpd.h")
  29. pisitools.dolib_a("libwrap.a")
  30. # FIXME: this seems not necessary anymore
  31. # pisitools.domove("libwrap.so", "libwrap.so.0.%s" % get.srcVERSION())
  32. pisitools.dolib_so("libwrap.so.0.%s" % get.srcVERSION(), "/lib")
  33. pisitools.dosym("/lib/libwrap.so.0.%s" % get.srcVERSION(), "/lib/libwrap.so.0")
  34. pisitools.dosym("/lib/libwrap.so.0", "/lib/libwrap.so")
  35. libtools.gen_usr_ldscript("libwrap.so")
  36. pisitools.dosym("hosts_access.5", "/usr/share/man/man5/hosts.allow.5")
  37. pisitools.dosym("hosts_access.5", "/usr/share/man/man5/hosts.deny.5")
  38. pisitools.doman("*.3", "*.5", "*.8")
  39. pisitools.dodoc("BLURB", "CHANGES", "DISCLAIMER", "README*")