From 702f817845cafb70c1de804678235905381932d7 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Thu, 7 Jan 2021 00:36:52 +1300 Subject: [PATCH] Deb: add build-tarball and build-deb commands WIP --- builder/build-deb | 6 ++++++ builder/build-tarball | 10 ++++++++++ builder/dockerfile.ubuntu1804.deb.build | 8 ++++++++ debian/Makefile.to_fakebuild_tar_package | 13 +++++++++++-- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100755 builder/build-deb create mode 100755 builder/build-tarball create mode 100644 builder/dockerfile.ubuntu1804.deb.build diff --git a/builder/build-deb b/builder/build-deb new file mode 100755 index 0000000..f54d318 --- /dev/null +++ b/builder/build-deb @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +dpkg-buildpackage -us -uc -b +lintian ../*.deb diff --git a/builder/build-tarball b/builder/build-tarball new file mode 100755 index 0000000..e4a9293 --- /dev/null +++ b/builder/build-tarball @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +cd "$(dirname "$0")/.." + +docker pull ubuntu:18.04 +docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.ubuntu1804.build . +mkdir -p builder/build +docker run -v ${PWD}/builder/build:/build --rm kasmvncbuilder:18.04 diff --git a/builder/dockerfile.ubuntu1804.deb.build b/builder/dockerfile.ubuntu1804.deb.build new file mode 100644 index 0000000..76a5ea6 --- /dev/null +++ b/builder/dockerfile.ubuntu1804.deb.build @@ -0,0 +1,8 @@ +FROM ubuntu:18.04 + +RUN apt-get update && \ + apt-get -y install vim build-essential devscripts equivs + +COPY ./debian/control /tmp + +RUN echo YYY | mk-build-deps --install /tmp/control diff --git a/debian/Makefile.to_fakebuild_tar_package b/debian/Makefile.to_fakebuild_tar_package index d94e774..741a04a 100644 --- a/debian/Makefile.to_fakebuild_tar_package +++ b/debian/Makefile.to_fakebuild_tar_package @@ -1,8 +1,11 @@ -SRC := ../release/usr/local +TARBALL := builder/build/kasmvnc.ubuntu_18.04.tar.gz +TAR_DATA := $(shell mktemp -d) +SRC := $(TAR_DATA)/usr/local SRC_BIN := $(SRC)/bin DST_MAN := $(DESTDIR)/usr/share/man/man1 -install: +install: unpack_tarball + echo "TAR_DATA: $(TAR_DATA)" echo "installing files" mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1 \ $(DESTDIR)/usr/share/doc/kasmvncserver @@ -18,3 +21,9 @@ install: cp $(SRC)/share/man/man1/vncserver.1 $(DST_MAN)/kasmvncserver.1 cp $(SRC)/share/man/man1/vncpasswd.1 $(DST_MAN)/kasmvncpasswd.1 cp $(SRC)/share/man/man1/vncconfig.1 $(DST_MAN)/kasmvncconfig.1 + +unpack_tarball: + tar -xzf "$(TARBALL)" -C "$(TAR_DATA)" + +clean: + rm -rf $(TAR_DATA)