Permalink
Browse files

Add docker debbuild.

  • Loading branch information...
1 parent 815cf2f commit 12b3a2bee7d46782428d250753d03866a8d43444 Barnaby Gray committed Feb 14, 2014
Showing with 32 additions and 0 deletions.
  1. +16 −0 docker/debbuild/Dockerfile
  2. +14 −0 docker/debbuild/build.sh
  3. +2 −0 docker/debbuild/stdeb.cfg
View
@@ -0,0 +1,16 @@
+# Deb build file
+# docker build -t logcabin-debbuild docker/debbuild
+# docker run -t -i -e PACKAGE=https://pypi.python.org/packages/package.tar.gz -v $HOME/.gnupg:/root/.gnupg logcabin-debbuild
+# CONTAINER=$(docker ps -q -a | head -1)
+# docker cp $CONTAINER:/tmp/build/deb_dist/logcabin_1.0.x-1_all.deb .
+FROM ubuntu:12.04
+MAINTAINER Barnaby Gray <barnaby@pickle.me.uk>
+
+RUN apt-get update && apt-get install -y dput python-stdeb devscripts wget && apt-get clean
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get install -y python-pip
+RUN pip install versiontools
+ADD . /
+
+ENV HOME /root
+CMD ./build.sh
View
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+: ${PACKAGE:?must be set}
+
+BASENAME=$(basename $PACKAGE)
+DIRNAME=${BASENAME%.tar.gz}
+
+mkdir /tmp/build
+cd /tmp/build
+wget $PACKAGE
+
+py2dsc -x /stdeb.cfg $BASENAME
+cd deb_dist/$DIRNAME
+dpkg-buildpackage
@@ -0,0 +1,2 @@
+[DEFAULT]
+Package: logcabin

0 comments on commit 12b3a2b

Please sign in to comment.