actions.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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/copyleft/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. major, minor = get.srcVERSION().split(".", 1)
  11. def setup():
  12. shelltools.system("setconf Makefile TINYXML_USE_STL YES")
  13. shelltools.system('setconf Makefile RELEASE_CFLAGS "$CXXFLAGS -fPIC"')
  14. #pisitools.dosed("Makefile", "@MAJOR_V@", "%s" % major)
  15. #pisitools.dosed("Makefile", "@MINOR_V@", "%s" % minor)
  16. def build():
  17. autotools.make()
  18. shelltools.system('g++ -fPIC "$CXXFLAGS" -shared -o "libtinyxml.so.0.2.6.2" \
  19. -Wl,-soname,"libtinyxml.so.0" $(ls *.o | grep -v xmltest)')
  20. def install():
  21. pisitools.insinto("/usr/include", "*.h")
  22. # pisi dolib does not care for symlinks
  23. # pisitools.dolib("libtinyxml.so*")
  24. for i in shelltools.ls("libtinyxml.so*"):
  25. pisitools.insinto("/usr/lib/", i)
  26. pisitools.dosym("/usr/lib/libtinyxml.so.0.2.6.2", "usr/lib/libtinyxml.so.0")
  27. pisitools.dosym("/usr/lib/libtinyxml.so.0.2.6.2", "usr/lib/libtinyxml.so")
  28. pisitools.dodoc("changes.txt", "readme.txt")
  29. pisitools.dohtml("docs/*")