actions.py 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/usr/bin/env python3
  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 inary.actionsapi import get
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import inarytools
  9. from inary.actionsapi import shelltools
  10. from inary.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("PYTHON=python2 \
  16. --prefix=/usr \
  17. --disable-static \
  18. --with-apache-libexecdir \
  19. --with-lz4=internal \
  20. --with-utf8proc=internal")
  21. inarytools.dosed("libtool"," -shared ", " -Wl,--as-needed -shared ")
  22. def build():
  23. # svn
  24. autotools.make()
  25. autotools.make('LT_LDFLAGS="-L{}/usr/lib"'.format(get.installDIR()))
  26. autotools.make("swig_pydir=/usr/lib/python2.7/site-packages/libsvn \
  27. swig_pydir_extra=/usr/lib/python2.7/site-packages/svnswig-py swig-pl swig-rb")
  28. def install():
  29. # install svn
  30. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  31. # install swig-py
  32. autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-swig-py")
  33. # install swig-pl
  34. autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-swig-pl")
  35. # install javahl
  36. #autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-javahl")
  37. # Move py/c'into proper dir
  38. inarytools.domove("/usr/lib/svn-python/svn", "/usr/lib/%s/site-packages" % get.curPYTHON())
  39. inarytools.domove("/usr/lib/svn-python/libsvn", "/usr/lib/%s/site-packages" % get.curPYTHON())
  40. inarytools.removeDir("/usr/lib/svn-python")
  41. # some helper tools
  42. inarytools.insinto("/usr/bin", "tools/backup/hot-backup.py", "svn-hot-backup")
  43. # FIXME: these tools are replaced by new ones
  44. # inarytools.insinto("/usr/bin", "contrib/client-side/svn_load_dirs.pl", "svn-load-dirs")
  45. # inarytools.insinto("/usr/bin", "contrib/client-side/svnmerge.py", "svnmerge")
  46. # shelltools.chmod("%s/usr/bin/svnmerge" % get.installDIR(), 0755)
  47. # Install upstream bash completion script
  48. inarytools.insinto("/etc/bash_completion.d", "tools/client-side/bash_completion", "subversion")
  49. # Documentation and etc.
  50. #inarytools.insinto("/usr/share/doc/%s" % get.srcNAME(), "contrib")
  51. inarytools.insinto("/usr/share/doc/%s" % get.srcNAME(), "tools/xslt")
  52. inarytools.insinto("/var/www/localhost/htdocs", "tools/xslt/*")
  53. # Create virtual repository root
  54. inarytools.dodir("/var/svn")
  55. inarytools.dodoc("README")
  56. # remove unnecessary files i.e. perllocal.pod, .packlist
  57. perlmodules.removePacklist()
  58. perlmodules.removePodfiles()