From f3535cb93ea278421d184cbdfb3bad4202cb4725 Mon Sep 17 00:00:00 2001 From: Chris Kuehl Date: Tue, 4 Aug 2015 17:15:08 -0700 Subject: [PATCH] Add building in Docker --- Dockerfile | 10 ++++++++++ Makefile | 23 ++++++++++++++++++++--- debian/control | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9fd9a2c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM debian:jessie + +MAINTAINER Chris Kuehl +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential devscripts equivs && \ + apt-get clean +WORKDIR /mnt + +ENTRYPOINT mk-build-deps -i && make builddeb diff --git a/Makefile b/Makefile index eb4b37c..3d7e33a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,23 @@ -.PHONY: build +.PHONY: build clean builddeb builddeb-docker itest_lucid itest_precise itest_trusty build: - gcc -static -Wall -Werror -o dumb-init dumb-init.c + $(CC) -static -Wall -Werror -o dumb-init dumb-init.c clean: - rm -rf dumb-init + rm -rf dumb-init dist + +builddeb: + rm -rf dist && mkdir -p dist + debuild -us -uc -b + mv ../dumb-init_*.deb dist + +builddeb-docker: docker-image + docker run -v $(PWD):/mnt dumb-init-build + +docker-image: + docker build -t dumb-init-build . + +itest_lucid: docker_build + +itest_precise: docker_build + +itest_trusty: docker_build diff --git a/debian/control b/debian/control index 793a137..78b9cf5 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: dumb-init Section: utils Priority: extra Maintainer: Chris Kuehl -Build-Depends: debhelper (>= 7), gcc +Build-Depends: debhelper (>= 7), gcc, fakeroot Standards-Version: 3.9.6 Package: dumb-init