1 include /usr
/share
/dpkg
/pkg-info.mk
2 include /usr
/share
/dpkg
/architecture.mk
7 BUILDDIR ?
= $(DEB_SOURCE
)-$(DEB_VERSION_UPSTREAM
)
8 ORIG_SRC_TAR
=$(DEB_SOURCE
)_
$(DEB_VERSION_UPSTREAM
).orig.
tar.gz
10 export VERSION
=$(DEB_VERSION_UPSTREAM_REVISION
)
13 XTERMJSTGZ
=xterm-
$(XTERMJSVER
).tgz
16 FITADDONTGZ
=xterm-addon-fit-
$(FITADDONVER
).tgz
19 WEBGLADDONTGZ
=xterm-addon-webgl-
$(WEBGLADDONVER
).tgz
21 DEB
=$(PACKAGE
)_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_HOST_ARCH
).deb
22 DBG_DEB
=$(PACKAGE
)-dbgsym_
$(DEB_VERSION_UPSTREAM_REVISION
)_
$(DEB_HOST_ARCH
).deb
23 DSC
=rust-
$(CRATENAME
)_
$(DEB_VERSION_UPSTREAM_REVISION
).dsc
26 ifeq ($(BUILD_MODE
), release
)
27 CARGO_BUILD_ARGS
+= --release
28 COMPILEDIR
:= target
/release
30 COMPILEDIR
:= target
/debug
34 BINDIR
= $(PREFIX
)/bin
35 TERMPROXY_BIN
:= $(addprefix $(COMPILEDIR
)/,termproxy
)
39 install: $(TERMPROXY_BIN
)
40 install -dm755
$(DESTDIR
)$(BINDIR
)
41 install -m755
$(TERMPROXY_BIN
) $(DESTDIR
)$(BINDIR
)/
43 $(TERMPROXY_BIN
): .do-cargo-build
45 $(CARGO
) build
$(CARGO_BUILD_ARGS
)
50 cargo-build
: .do-cargo-build
55 cd
$(BUILDDIR
); debcargo package \
56 --config debian
/debcargo.toml \
58 --no-overlay-write-back \
61 $(DEB_VERSION_UPSTREAM
)
62 cd
$(BUILDDIR
)/build
; wrap-and-sort
-tkn
63 cp
--remove-destination
$(BUILDDIR
)/build
/debian
/control debian
/control
68 cp
-a debian
/ src
/ Makefile Cargo.toml
$@.tmp
69 echo
"git clone git://git.proxmox.com/git/pve-xtermjs.git\\ngit checkout $$(git rev-parse HEAD)" \
70 > $@.tmp
/debian
/SOURCE
74 $(ORIG_SRC_TAR
): $(BUILDDIR
)
75 tar czf
$(ORIG_SRC_TAR
) --exclude
="$(BUILDDIR)/debian" $(BUILDDIR
)
81 cd
$(BUILDDIR
); dpkg-buildpackage
-b
-uc
-us
87 rm -rf
$(DSC
) $(BUILDDIR
)
91 $(DSC
): $(BUILDDIR
) $(ORIG_SRC_TAR
)
92 cd
$(BUILDDIR
); dpkg-buildpackage
-S
-us
-uc
-d
97 EXCLUDED_ADDONS
=attach fullscreen search terminado webLinks zmodem
98 X_EXCLUSIONS
=$(foreach ADDON
,$(EXCLUDED_ADDONS
),--exclude
=addons
/$(ADDON
))
102 wget https
://registry.npmjs.org
/xterm
/-/$(XTERMJSTGZ
) -O
$(XTERMJSTGZ
).tmp
103 wget https
://registry.npmjs.org
/xterm-addon-fit
/-/$(FITADDONTGZ
) -O
$(FITADDONTGZ
).tmp
104 wget https
://registry.npmjs.org
/xterm-addon-webgl
/-/$(WEBGLADDONTGZ
) -O
$(WEBGLADDONTGZ
).tmp
105 mv
$(XTERMJSTGZ
).tmp
$(XTERMJSTGZ
)
106 mv
$(FITADDONTGZ
).tmp
$(FITADDONTGZ
)
107 mv
$(WEBGLADDONTGZ
).tmp
$(WEBGLADDONTGZ
)
108 tar -C src
/www
-xf
$(XTERMJSTGZ
) package
/lib package
/css
--strip-components
=2 $(X_EXCLUSIONS
)
109 tar -C src
/www
-xf
$(FITADDONTGZ
) package
/lib
--strip-components
=2 $(X_EXCLUSIONS
)
110 tar -C src
/www
-xf
$(WEBGLADDONTGZ
) package
/lib
--strip-components
=2 $(X_EXCLUSIONS
)
111 rm $(XTERMJSTGZ
) $(FITADDONTGZ
) $(WEBGLADDONTGZ
)
114 upload
: UPLOAD_DIST ?
= $(DEB_DISTRIBUTION
)
115 upload
: $(DEB
) $(DBG_DEB
)
116 tar cf
- $(DEB
) $(DBG_DEB
) |ssh
-X repoman@repo.proxmox.com
-- upload
--product pmg
,pve
,pbs
--dist $(UPLOAD_DIST
) --arch
$(DEB_HOST_ARCH
)
124 rm -rf
$(DEB_SOURCE
)-[0-9]*/ build
/ *.deb
*.changes
*.dsc
*.
tar.
* *.buildinfo
*.build .do-cargo-build