actions.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import perlmodules
  11. def setup():
  12. # Respect the user LDFLAGS
  13. shelltools.system("./autogen.sh")
  14. shelltools.export("EXTRA_LDFLAGS", get.LDFLAGS())
  15. autotools.configure("--disable-static \
  16. --with-jdk=/usr/lib/jvm/java-7-openjdk \
  17. --enable-javahl \
  18. --with-apr=/usr \
  19. --with-apr-util=/usr \
  20. --with-apache=/usr/lib/apache2/ \
  21. --with-apxs \
  22. --with-serf=/usr \
  23. --with-sqlite=/usr \
  24. --with-zlib=/usr \
  25. --with-jikes=no \
  26. --without-berkeley-db \
  27. --disable-mod-activation")
  28. pisitools.dosed("libtool"," -shared ", " -Wl,--as-needed -shared ")
  29. def build():
  30. # svn
  31. autotools.make()
  32. # python bindings
  33. autotools.make("swig-py")
  34. # perl bindings (needed by git-svn*)
  35. # Sometimes parallel build breaks perl bindings
  36. autotools.make("-j1 swig-pl")
  37. # java bindings
  38. autotools.make("-j1 javahl")
  39. def install():
  40. # install svn
  41. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  42. # install swig-py
  43. autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-swig-py")
  44. # install swig-pl
  45. autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-swig-pl")
  46. # install javahl
  47. autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-javahl")
  48. # Move py/c'into proper dir
  49. pisitools.domove("/usr/lib/svn-python/svn", "/usr/lib/%s/site-packages" % get.curPYTHON())
  50. pisitools.domove("/usr/lib/svn-python/libsvn", "/usr/lib/%s/site-packages" % get.curPYTHON())
  51. pisitools.removeDir("/usr/lib/svn-python")
  52. # some helper tools
  53. pisitools.insinto("/usr/bin", "tools/backup/hot-backup.py", "svn-hot-backup")
  54. # FIXME: these tools are replaced by new ones
  55. # pisitools.insinto("/usr/bin", "contrib/client-side/svn_load_dirs.pl", "svn-load-dirs")
  56. # pisitools.insinto("/usr/bin", "contrib/client-side/svnmerge.py", "svnmerge")
  57. # shelltools.chmod("%s/usr/bin/svnmerge" % get.installDIR(), 0755)
  58. # Install upstream bash completion script
  59. pisitools.insinto("/etc/bash_completion.d", "tools/client-side/bash_completion", "subversion")
  60. # Documentation and etc.
  61. #pisitools.insinto("/usr/share/doc/%s" % get.srcNAME(), "contrib")
  62. pisitools.insinto("/usr/share/doc/%s" % get.srcNAME(), "tools/xslt")
  63. pisitools.insinto("/var/www/localhost/htdocs", "tools/xslt/*")
  64. # Create virtual repository root
  65. pisitools.dodir("/var/svn")
  66. pisitools.dodoc("README")
  67. # remove unnecessary files i.e. perllocal.pod, .packlist
  68. perlmodules.removePacklist()
  69. perlmodules.removePodfiles()