diff options
author | Rob Austein <sra@hactrn.net> | 2016-06-22 15:34:57 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-06-22 15:34:57 -0400 |
commit | beca9ece1b3a9f47d81b98f06fc4b0180704cabe (patch) | |
tree | e265980b30305c60d6932cdf8b5403914a66516d /Makefile |
First cut at release engineering for software that goes with the Alpha board.
This may well end up merging with the firmware super-repository, but,
having started down the road of making them separate, let's keep it
that way while we get the initial stuff out of the way, then merge
them if it still seems like a good idea when the basics are working.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8135639 --- /dev/null +++ b/Makefile @@ -0,0 +1,65 @@ +# Top-level build of software packages to work with Cryptech Alpha board. + +export CRYPTECH_VERSION := 2.0 + +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} + +# 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-alpha --newversion '${CRYPTECH_PACKAGE_VERSION}' \ + '$(strip Version ${CRYPTECH_VERSION} of software for Cryptech Alpha development board.)' + +REPOSITORY := /home/aptbot/alpha +GNUPGHOME := /home/aptbot/gnupg +CODENAME := wheezy +REPO_UMASK := 002 +UPLOAD_USER := aptbot +UPLOAD_URI := rsync://apt.cryptech.is/alpha/ + +export GNUPGHOME + + +all: init source pbuilder homebrew + +enchilada: all reprepro upload + +init: + git submodule update --init --recursive + +clean: + git clean -dfx + git submodule foreach --recursive git clean -dfx + +sandblast: clean + git submodule deinit -f . + +source: + cd sw; ${DCH} + cd sw; debuild -S -uc -us + +# Maybe use pdebuild here? Have full-blown multi-arch multi-dist +# pbuilder example for another project, but something simpler would be +# nice.... + +pbuilder: + cd sw; debuild -b -uc -us + +reprepro: ${REPOSITORY}/conf/distributions ${REPOSITORY}/conf/options + umask ${REPO_UMASK}; for f in *.changes; do reprepro -b ${REPOSITORY} include ${CODENAME} $$f; done + +${REPOSITORY}/conf/distributions ${REPOSITORY}/conf/options: + install -D reprepro-conf/$(notdir $@) ${REPOSITORY}/conf/$(notdir $@) + +RSYNC := rsync --rsh 'ssh -l ${UPLOAD_USER}' --archive --itemize-changes + +upload: + ${RSYNC} --ignore-existing ${REPOSITORY}/ ${UPLOAD_URI} + ${RSYNC} --delete --delete-delay ${REPOSITORY}/ ${UPLOAD_URI} + +.PHONY: all init clean source pbuilder homebrew reprepro upload enchilada sandblast |