aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-07-04 00:18:36 -0400
committerRob Austein <sra@hactrn.net>2015-07-04 00:18:36 -0400
commitea04b71ff14523ffcfc02eb43cf509e238807bef (patch)
tree186ed194cc925441d249c7a9022efbd5546cfebc /Makefile
Initial version of Novean release engineering superrepository.
Not yet fully tested.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile70
1 files changed, 70 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b1c7467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,70 @@
+# Top-level build of packages for Novena PVT-1.
+#
+# Building source and binary packages separately isn't strictly
+# necessary, but simplifies fault isolation.
+#
+# We generate the changes file on the fly to keep all the version
+# information in one place. Nothing actually uses the changes file
+# once we've generated the source package, so this is harmless. If
+# somebody really wants to be the human maintainer for a changes
+# file, be my guest.
+#
+# We don't sign anything yet. This will need fixing.
+
+# Version of the software in human terms (major.minor)
+
+export CRYPTECH_VERSION := 1.0
+
+# Version suffix to add to package names. The extra fields come from
+# HEAD of the git superrepository. The date field is primarily to
+# make sure that versions sort into the correct order when fed to
+# reprepro; the commit hash uniquely identifies the (base) version of
+# the superrepository that generated the packages. This won't help if
+# somebody publishes packages generated with a modified version of the
+# superrepository, so don't do that (add check for uncommitted # changes?)
+
+ifdef NOTYET
+
+HEAD_TIME := $(shell git show -s --format=%ct HEAD)
+HEAD_HASH := $(shell git rev-parse HEAD)
+
+CRYPTECH_PACKAGE_VERSION := ${CRYPTECH_VERSION}~${HEAD_TIME}~${HEAD_HASH}
+
+else
+
+CRYPTECH_PACKAGE_VERSION := ${CRYPTECH_VERSION}~something
+
+endif
+
+# Make sure git can find certificatess. We might want to change this
+# to use GIT_SSL_CAINFO so we can specify a particular file, perhaps
+# even a file in this repository, but skip that for the moment.
+
+export GIT_SSL_CAPATH=/etc/ssl/certs
+
+# Command to generate a new changelog containing one entry.
+# Does nothing if the changelog already exists.
+
+DCH = test -f debian/changelog || \
+ EDITOR=true VISUAL=true TZ=UTC DEBEMAIL='APT Builder Robot <aptbot@cryptech.is>' \
+ dch --create --package cryptech-novena-$(1) --newversion '${CRYPTECH_PACKAGE_VERSION}' \
+ 'Version ${CRYPTECH_VERSION} of Cryptech $(2) for the Novena PVT-1 development board.'
+
+
+all: init sw rtl
+
+init:
+ git submodule update --init --recursive
+
+sw:
+ cd sw; $(call DCH,sw,software tools)
+ cd sw; debuild -S -uc -us
+ cd sw; debuild -b -uc -us -aarmhf
+
+rtl:
+ cd rtl; $(call DCH,rtl,RTL bitstream)
+ cd rtl; debuild -S -uc -us
+ cd rtl; debuild -b -uc -us
+
+
+.PHONY: sw rtl