actions.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import perlmodules
  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. config = """
  11. V = 1
  12. CFLAGS = %s
  13. LDFLAGS = %s
  14. INSTALLDIRS = vendor
  15. DESTDIR = %s
  16. prefix = /usr
  17. htmldir = /usr/share/doc/git
  18. sysconfdir = /etc
  19. ETC_GITCONFIG = /etc/gitconfig
  20. GITWEB_CSS = gitweb/gitweb.css
  21. GITWEB_LOGO = gitweb/git-logo.png
  22. GITWEB_FAVICON = gitweb/git-favicon.png
  23. GITWEB_JS = gitweb/gitweb.js
  24. PYTHON_PATH = /usr/bin/python3
  25. PERL_MM_OPT =""
  26. GIT_TEST_OPTS ='--no-color'
  27. gitwebdir = /var/www/localhost/cgi-bin
  28. ASCIIDOC8 = 1
  29. ASCIIDOC_NO_ROFF = 1
  30. BLK_SHA1 = 1
  31. NEEDS_CRYPTO_WITH_SSL = 1
  32. USE_LIBPCRE = 1
  33. NO_CROSS_DIRECTORY_HARDLINKS = 1
  34. MAN_BOLD_LITERAL = 1
  35. V = 1
  36. """ % (get.CFLAGS(), get.LDFLAGS(), get.installDIR())
  37. def setup():
  38. shelltools.echo("config.mak", config)
  39. def build():
  40. pisitools.dosed("Makefile", "^CC = .*$", "CC = %s" % get.CC())
  41. autotools.make("all doc")
  42. def install():
  43. autotools.rawInstall("install-doc")
  44. # Install bash completion
  45. pisitools.insinto("/etc/bash_completion.d", "contrib/completion/git-completion.bash", "git")
  46. shelltools.chmod("%s/etc/bash_completion.d/git" % get.installDIR(), 0644)
  47. # for git-daemon
  48. pisitools.dodir("/pub/scm")
  49. # emacs support
  50. #autotools.install("-C contrib/emacs")
  51. #pisitools.insinto("/usr/share/doc/emacs-git", "contrib/emacs/README")
  52. # Some docs
  53. pisitools.dodoc("README.md", "COPYING", "Documentation/SubmittingPatches")
  54. # remove .pod and .packlist files
  55. perlmodules.removePodfiles()
  56. perlmodules.removePacklist()
  57. pisitools.dosym("/var/www/localhost/cgi-bin/static/git-logo.png", "/usr/share/pixmaps/git.png")