actions.py 944 B

1234567891011121314151617181920212223242526272829
  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 shelltools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. WorkDir = "%s" % get.ARCH()
  10. def install():
  11. # Define bits variable for 32-bit and 64-bit architectures
  12. bits = "amd64" if get.ARCH() == "x86_64" else "i386"
  13. # Extract Debian package
  14. shelltools.system("ar -xv plexmediaserver_1.3.3.3148-b38628e_%s.deb" % bits)
  15. shelltools.system("tar -xzvf data.tar.gz")
  16. pisitools.insinto("/usr/share/pixmaps/", "usr/share/pixmaps/plexmediamanager.png")
  17. pisitools.insinto("/usr/share/applications/", "usr/share/applications/plexmediamanager.desktop")
  18. pisitools.insinto("/", "etc")
  19. pisitools.insinto("/usr/", "usr/lib")
  20. pisitools.insinto("/usr/", "usr/sbin")
  21. shelltools.system("service apache start")