rules 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/make -f
  2. # force packages to be built with xz compression, as Ubuntu 21.10 and up use
  3. # zstd compression, which is non-standard, and breaks 'dpkg-sig --verify'
  4. override_dh_builddeb:
  5. dh_builddeb -- -Zxz
  6. override_dh_auto_build:
  7. cd xray \
  8. && GO111MODULE=on \
  9. env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w -buildid=" -o "xray" ./main
  10. # http://manpages.debian.org/dh_dwz
  11. override_dh_dwz:
  12. # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed)
  13. @# https://packages.debian.org/debhelper
  14. @# https://packages.ubuntu.com/debhelper
  15. override_dh_auto_install:
  16. install -D -m 0644 debian/config.json debian/xray/etc/xray/config.json
  17. install -D -m 0755 xray/xray debian/xray/usr/bin/xray
  18. install -D -m 0644 xray/geoip.dat debian/xray/usr/share/xray/geoip.dat
  19. install -D -m 0644 xray/geosite.dat debian/xray/usr/share/xray/geosite.dat
  20. override_dh_installsystemd:
  21. dh_installsystemd --no-enable --no-start
  22. override_dh_shlibdeps:
  23. dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
  24. %:
  25. dh $@