actions.py 3.2 KB

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