actions.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 get
  10. def setup():
  11. pisitools.flags.add("-fPIC -D_GNU_SOURCE")
  12. shelltools.system("sed -e /service_DATA/d \
  13. -i modules/pam_namespace/Makefile.am && NOCONFIGURE=1 ./autogen.sh")
  14. shelltools.system("./pisi-pambase.sh")
  15. autotools.configure("--prefix=/usr \
  16. --sysconfdir=/etc \
  17. --libdir=/usr/lib \
  18. --disable-regenerate-docu \
  19. --disable-doc \
  20. --enable-securedir=/lib/security \
  21. --docdir=/usr/share/doc/Linux-PAM-" + get.srcVERSION())
  22. def build():
  23. autotools.make()
  24. def check():
  25. autotools.make("check")
  26. def install():
  27. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  28. #pisitools.removeDir("/usr/share/doc/Linux-PAM/")
  29. for f in ["system-password", "system-session", "system-account", "system-auth", "other"]:
  30. shelltools.system("chmod 755 " + f)
  31. pisitools.insinto("/etc/pam.d/", "%s" % f)
  32. shelltools.system("chmod -v 4755 " + get.installDIR() + "/sbin/unix_chkpwd")
  33. #pisitools.doman("doc/man/*.[0-9]")
  34. pisitools.dodoc("CHANGELOG", "Copyright", "README")