Maintenance will be performed on,,, and tomorrow, 2020/08/04, starting at approximately 9am PDT. It is expected to take around 15 minutes and there will be a short period of downtime towards the end of the maintenance window. Please direct any comments, questions or concerns to

Commit 9c84efda authored by Daniel Brown's avatar Daniel Brown

Adding Debian package creator

parent 4e88fe48
FROM debian
RUN apt --assume-yes update
RUN apt --assume-yes install gcc git libgsl-dev make g++ python
RUN git clone
#CMD ["python", "/host/"]
\ No newline at end of file
import os
import textwrap
from subprocess import call, check_output
from collections import defaultdict
import string
class SafeDict(dict):
def __missing__(self, key):
return '{' + key + '}'
call("git pull".split())
git_describe = str(check_output('git describe --tags'.split())).split("-")
call("./ --build".split())
call("mkdir -p finesse/DEBIAN".split())
vals = {
"version": git_describe[0],
"release": git_describe[1],
call('mkdir -p finesse/DEBIAN'.format(**vals).split())
call('mkdir -p finesse/usr/bin'.format(**vals).split())
call('cp /root/finesse/kat /root/finesse/packaging/deb/finesse/usr/bin'.format(**vals).split())
call('cp /root/finesse/kat.ini /root/finesse/packaging/deb/finesse/etc/finesse'.format(**vals).split())
call('tar -zcvf ./SOURCES/finesse-{version}-{release}.tar.gz finesse-{version}/'.format(**vals).split())
with open("/root/finesse/packaging/deb/finesse/DEBIAN/control", "w") as f:
s = string.Formatter().vformat(textwrap.dedent("""
Package: finesse
Version: {version}.{release}
Section: base
Priority: optional
Architecture: amd64
Depends: gsl-bin
Maintainer: Daniel Brown <>
Description: FINESSE: Frequency domain INterfErometer Simulation SoftwarE
"""), (), SafeDict(**vals))
call("dpkg-deb --build finesse".split())
call("cp /root/finesse/packaging/deb/finesse.deb /host/finesse.{version}.{release}.deb".format(**vals).split())
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment