Skip to content

Commit

Permalink
try to get DEB packaging to figure out the systemd service files (maj…
Browse files Browse the repository at this point in the history
…or PITA)

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

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

Expand Down
7 changes: 5 additions & 2 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1546,18 +1546,21 @@ def copytodir(src, dst_dir, chmod=0o644):
if pam_ENABLED:
copytodir("etc/pam.d/xpra", "/etc/pam.d")

#fedora and centos can use just "/lib/systemd/system" here
#but debian gets totally confused if we do...
systemd_dir = "/usr/lib/systemd/system"
if service_ENABLED:
#Linux init service:
if os.path.exists("/bin/systemctl"):
copytodir("service/xpra.service", "/lib/systemd/system")
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:
copytodir("service/xpra.socket", "/lib/systemd/system")
copytodir("service/xpra.socket", systemd_dir)


# add build_conf to build step
Expand Down

0 comments on commit d44d588

Please sign in to comment.