diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 21 insertions, 23 deletions
@@ -15,19 +15,20 @@ DCH = test -f debian/changelog || \ 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 := /home/aptbot/gnupg -export GNUPGHOME +REPO_BASE := /home/aptbot/alpha +REPO_UMASK := 002 +PBUILDER_BASE := ${HOME}/pbuilder +PBUILDER_TARGETS := debian/jessie/i386 debian/jessie/amd64 ubuntu/xenial/i386 ubuntu/xenial/amd64 + +REPO_UPLOAD_USER := aptbot +REPO_UPLOAD_URI := rsync://apt.cryptech.is/alpha/ all: init source pbuilder homebrew -enchilada: all reprepro upload +enchilada: all upload init: git submodule update --init --recursive @@ -43,23 +44,20 @@ 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 $@) + rm -f ${PBUILDER_BASE}/*result/* + umask ${REPO_UMASK}; \ + for target in ${PBUILDER_TARGETS}; do echo $$target | tr '/' ' '; done | \ + while read dist code arch; do \ + reprepro -b ${REPO_BASE}/$$dist -A $$arch list $$code cryptech-alpha | awk '{v = $$3} END {exit v != ${CRYPTECH_PACKAGE_VERSION}}' && continue; \ + pbuilder-dist $$code $$arch build cryptech-alpha_${CRYPTECH_PACKAGE_VERSION}.dsc; \ + reprepro -b ${REPO_BASE}/$$dist include $$code ${PBUILDER_BASE}/$${code}-$${arch}_result/cryptech-alpha_${CRYPTECH_PACKAGE_VERSION}_$${arch}.changes; \ + done -RSYNC := rsync --rsh 'ssh -l ${UPLOAD_USER}' --archive --itemize-changes +RSYNC := rsync --rsh 'ssh -l ${REPO_UPLOAD_USER}' --archive --itemize-changes upload: - ${RSYNC} --ignore-existing ${REPOSITORY}/ ${UPLOAD_URI} - ${RSYNC} --delete --delete-delay ${REPOSITORY}/ ${UPLOAD_URI} + ${RSYNC} --ignore-existing ${REPO_BASE}/ ${REPO_UPLOAD_URI} + ${RSYNC} --delete --delete-delay ${REPO_BASE}/ ${REPO_UPLOAD_URI} -.PHONY: all init clean source pbuilder homebrew reprepro upload enchilada sandblast +.PHONY: all init clean source pbuilder homebrew upload enchilada sandblast |