xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #1383: setup-prefix.patch

File setup-prefix.patch, 1.7 KB (added by Antoine Martin, 4 years ago)

hackish patch to honour the prefix when installing the service files

  • setup.py

     
    256256rpath = None
    257257ssl_cert = None
    258258ssl_key = None
     259home = None
     260prefix = None
    259261filtered_args = []
    260262for arg in sys.argv:
    261263    matched = False
    262     for x in ("rpath", "ssl-cert", "ssl-key"):
     264    for x in ("rpath", "ssl-cert", "ssl-key", "home", "prefix"):
    263265        varg = "--%s=" % x
    264266        if arg.startswith(varg):
    265267            value = arg[len(varg):]
     
    19401942
    19411943        pkgconfig = osx_pkgconfig
    19421944    else:
    1943         #Linux init service:
    1944         if os.path.exists("/bin/systemctl"):
    1945             add_data_files("/usr/lib/systemd/system/", ["service/xpra.service"])
    1946         else:
    1947             add_data_files("/etc/init.d/", ["service/xpra"])
    1948         if os.path.exists("/etc/sysconfig"):
    1949             add_data_files("/etc/sysconfig/", ["etc/sysconfig/xpra"])
    1950         elif os.path.exists("/etc/default"):
    1951             add_data_files("/etc/default/", ["etc/sysconfig/xpra"])
     1945        if False:
     1946            install_prefix = prefix or sys.prefix
     1947            etc_prefix = {"/usr" : ""}.get(install_prefix, "")+"/etc"
     1948            #Linux init service:
     1949            if os.path.exists("/bin/systemctl"):
     1950                add_data_files("%s/lib/systemd/system/" % install_prefix, ["service/xpra.service"])
     1951            else:
     1952                add_data_files("%s/init.d/" % etc_prefix, ["service/xpra"])
     1953            if os.path.exists("/etc/sysconfig"):
     1954                add_data_files("%s/sysconfig/" % etc_prefix, ["etc/sysconfig/xpra"])
     1955            elif os.path.exists("/etc/default"):
     1956                add_data_files("%s/default/" % etc_prefix, ["etc/sysconfig/xpra"])
    19521957
    19531958
    19541959if html5_ENABLED: