diff --git a/.cargo/config b/.cargo/config index 3b5b6e4..b08ce29 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,5 +1,5 @@ [source] -[source.debian-packages] -directory = "/usr/share/cargo/registry" +[source.vendor] +directory = "vendor" [source.crates-io] -replace-with = "debian-packages" +replace-with = "vendor" diff --git a/Cargo.toml b/Cargo.toml index 60c3ae0..8464181 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,3 +16,8 @@ curl = "0.4" clap = "2.33" proxmox-io = "1" proxmox-sys = "0.2" +zstd-sys = { features = [ "pkg-config" ] } + +[patch.crates-io] +proxmox-io = { path = "../proxmox/proxmox-io" } +proxmox-sys = { path = "../proxmox/proxmox-sys" } diff --git a/Makefile b/Makefile index cd583fb..42d62fe 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,14 @@ $(SUBDIRS): cargo-build: cargo build $(CARGO_BUILD_ARGS) +.PHONY: cargo-vendor +cargo-vendor: + cargo vendor + rm -f vendor/endian_trait/rust-toolchain + rm -f vendor/endian_trait_derive/rust-toolchain + sed -i "s#\"rust-toolchain[^,]\+,##" vendor/endian_trait/.cargo-checksum.json + sed -i "s#\"rust-toolchain[^,]\+,##" vendor/endian_trait_derive/.cargo-checksum.json + .PHONY: build build: rm -rf build @@ -53,9 +61,10 @@ build: .PHONY: deb deb: ${DEB} -$(DEB): build - cd build; dpkg-buildpackage -b -uc -us --no-pre-clean - lintian ${DEB} +$(DEB): cargo-vendor + echo "git clone git://git.proxmox.com/git/pve-xtermjs.git\\ngit checkout ${GITVERSION}" > debian/SOURCE + DEB_CARGO_PACKAGE=$(PACKAGE) dpkg-buildpackage -b -uc -us --no-pre-clean + lintian ../${DEB} @echo ${DEB} .PHONY: dsc diff --git a/debian/cargo-checksum.json b/debian/cargo-checksum.json new file mode 100644 index 0000000..e69de29 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d59a66c --- /dev/null +++ b/debian/control @@ -0,0 +1,30 @@ +Source: rust-termproxy +Section: admin +Priority: optional +Build-Depends: debhelper (>= 12), + libzstd-dev +Maintainer: Proxmox Support Team +Standards-Version: 4.5.1 +Vcs-Git: git://git.proxmox.com/git/pve-xtermjs.git +Vcs-Browser: https://git.proxmox.com/?p=pve-xtermjs.git;a=summary +Homepage: https://www.proxmox.com +Rules-Requires-Root: no + +Package: pve-xtermjs +Architecture: any +Multi-Arch: allowed +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ${cargo:Depends} +Recommends: + ${cargo:Recommends} +Suggests: + ${cargo:Suggests} +Provides: + ${cargo:Provides} +Built-Using: ${cargo:Built-Using} +XB-X-Cargo-Built-Using: ${cargo:X-Cargo-Built-Using} +Description: HTML/JS Shell client for Proxmox projects + This package provides an xterm.js client/proxy for Proxmoxprojects' Hosts, + Proxmox VE containers or Proxmox VE VM's serial-terminals. diff --git a/debian/rules b/debian/rules index 2b62edd..436684e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh $@ --buildsystem cargo + dh $@ override_dh_auto_build: dh_auto_build diff --git a/debian/rules.debcargo.hint b/debian/rules.debcargo.hint index 92c239b..4aaf62a 100755 --- a/debian/rules.debcargo.hint +++ b/debian/rules.debcargo.hint @@ -1,6 +1,6 @@ #!/usr/bin/make -f %: - dh $@ --buildsystem cargo + dh $@ override_dh_auto_test: dh_auto_test -- test --all