actions.py 1.1 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/licenses/gpl.txt
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. WorkDir = "%s" % get.srcNAME()
  11. def build():
  12. shelltools.cd("%s" % get.workDIR())
  13. shelltools.copytree("unrar", "libunrar")
  14. #changed for version 4.2.4
  15. autotools.make("-C libunrar lib")
  16. autotools.make("-C unrar -j1")
  17. #autotools.make for older version
  18. # autotools.make('-f makefile.unix \
  19. # CXXFLAGS="%s" \
  20. # CXX="%s" \
  21. # STRIP="true"' % (get.CXXFLAGS(), get.CXX()))
  22. def install():
  23. autotools.rawInstall("DESTDIR=%s/usr" % get.installDIR())
  24. # pisitools.dobin("unrar")
  25. shelltools.cd("%s" % get.workDIR())
  26. shelltools.cd("libunrar")
  27. pisitools.doexe("libunrar.so", "/usr/lib")
  28. pisitools.insinto("/usr/include/unrar", "dll.hpp")
  29. pisitools.dodoc("readme.txt","license.txt")