Skip to content

Commit

Permalink
#1530: don't install units when running from dh build, which has its …
Browse files Browse the repository at this point in the history
…own automagic

git-svn-id: https://xpra.org/svn/Xpra/trunk@16032 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 8, 2017
1 parent bbb76cc commit 8e40513
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
%:
dh $@ --with python2 --with quilt --with systemd

BUILDOPTS= --with-Xdummy --without-Xdummy_wrapper --pkg-config-path=/usr/lib/xpra/pkgconfig --rpath=/usr/lib/xpra/
BUILDOPTS= --with-Xdummy --without-Xdummy_wrapper --without-install_systemd_units --pkg-config-path=/usr/lib/xpra/pkgconfig --rpath=/usr/lib/xpra/

override_dh_auto_build:
dh_auto_build -- $(BUILDOPTS)
Expand Down
9 changes: 5 additions & 4 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def is_RH():
server_ENABLED = (LOCAL_SERVERS_SUPPORTED or shadow_ENABLED) and not (PYTHON3 and LINUX) and DEFAULT
service_ENABLED = LINUX and server_ENABLED
sd_listen_ENABLED = pkg_config_ok("--exists", "libsystemd")
install_systemd_units_ENABLED = LINUX
proxy_ENABLED = DEFAULT
client_ENABLED = DEFAULT

Expand Down Expand Up @@ -211,7 +212,7 @@ def is_RH():
"csc_libyuv",
"bencode", "cython_bencode", "vsock", "mdns",
"clipboard",
"server", "client", "dbus", "x11", "xinput", "sd_listen",
"server", "client", "dbus", "x11", "xinput", "sd_listen", "install_systemd_units",
"gtk_x11", "service",
"gtk2", "gtk3",
"html5", "minify", "html5_gzip", "html5_brotli",
Expand Down Expand Up @@ -1554,17 +1555,17 @@ def copytodir(src, dst_dir, chmod=0o644):
if service_ENABLED:
#Linux init service:
if os.path.exists("/bin/systemctl"):
copytodir("service/xpra.service", systemd_dir)
if install_systemd_units_ENABLED:
copytodir("service/xpra.service", systemd_dir)
else:
copytodir("service/xpra", "/etc/init.d")
if os.path.exists("/etc/sysconfig"):
copytodir("etc/sysconfig/xpra", "/etc/sysconfig")
elif os.path.exists("/etc/default"):
copytodir("etc/sysconfig/xpra", "/etc/default")
if sd_listen_ENABLED:
if sd_listen_ENABLED and install_systemd_units_ENABLED:
copytodir("service/xpra.socket", systemd_dir)


# add build_conf to build step
cmdclass.update({
'build' : build_override,
Expand Down

0 comments on commit 8e40513

Please sign in to comment.