#!/bin/bash VERSION=0.2 OUTPUT_DIR=$PWD SOURCE_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]})) docker run --rm -i -v $SOURCE_DIR:/laminar:ro -v $OUTPUT_DIR:/output ubuntu bash -xe < laminar/DEBIAN/control Package: laminar Version: $VERSION Section: Priority: optional Architecture: amd64 Maintainer: Oliver Giles Depends: libboost-filesystem1.55.0, zlib1g Description: Lightweight Continuous Integration Service EOF cat < laminar/DEBIAN/postinst #!/bin/bash echo Creating laminar user with home in /var/lib/laminar useradd -r -d /var/lib/laminar -s /usr/sbin/nologin laminar mkdir -p /var/lib/laminar/cfg/{jobs,nodes,scripts} chown -R laminar: /var/lib/laminar EOF chmod +x laminar/DEBIAN/postinst dpkg-deb --build laminar mv laminar.deb /output/laminar_$VERSION-1_amd64.deb EOS