blob: 8135639966931e4f792b9eae0870f541e05a5b42 (
plain) (
tree)
|
|
# 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
|