diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-06 00:05:23 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-06 00:05:23 (EST) |
commit | c6858ace569336da4833b618d677d90f69555658 (patch) | |
tree | edcd59ca592b12b871d6f8ade0252ad1bae7f8dd |
Initial commit
-rw-r--r-- | .gitignore | 10 | ||||
-rwxr-xr-x | build | 18 | ||||
-rw-r--r-- | changelog | 5 | ||||
-rw-r--r-- | control | 4 | ||||
-rw-r--r-- | format | 1 | ||||
-rwxr-xr-x | release | 13 | ||||
-rw-r--r-- | source.mk | 43 |
7 files changed, 94 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd90d0e --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Vim swap and other dot files +.* +!.gitignore + +# Source archives +*-*.orig.tar.* +keyring.gpg + +# Work area +tmp/ @@ -0,0 +1,18 @@ +#!/usr/bin/make -f + +include ../source.mk + +nop: + @: + +build: + oh-autoconfigure + oh-autobuild + touch $@ + +install: build + oh-autoinstall + oh-fixperms + oh-strip + oh-installfiles + oh-shlibdeps diff --git a/changelog b/changelog new file mode 100644 index 0000000..0a98b77 --- /dev/null +++ b/changelog @@ -0,0 +1,5 @@ +stress (1.0.4-1) trunk + + * Initial release. + + -- Patrick McDermott <patrick.mcdermott@libiquity.com> Tue, 05 Jan 2021 23:57:48 -0500 @@ -0,0 +1,4 @@ +Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com> +Build-Depends: + opkbuild (>= 4.2.1), + opkhelper-3.0 (>= 3.1.3), @@ -0,0 +1 @@ +2.0 @@ -0,0 +1,13 @@ +#!/bin/sh + +set -eu + +read src ver <<-EOF + $(sed '1s/^\(.*\) (\(.*\)) .*$/\1 \2/; q;' changelog) + EOF + +sed '/^ -- .* /{ s/^\( -- .* \).*$/\1'"$(LC_ALL='POSIX' date \ + '+%a, %d %b %Y %H:%M:%S %z')"'/; :l; n; b l; };' changelog >changelog~ +mv changelog~ changelog +git commit -m "changelog: Release ${src} ${ver}" -- changelog +git tag "${src}/${ver}" HEAD diff --git a/source.mk b/source.mk new file mode 100644 index 0000000..65e6334 --- /dev/null +++ b/source.mk @@ -0,0 +1,43 @@ +z = gz +keys = \ + '357D CB0E EC95 A01A EBA1 F0D2 DE63 B9C7 04EB E9EF' + +debrev = 4 +pool = https://ftp.debian.org/debian/pool/main/s/stress/ +deb_tar = $(OPK_SOURCE)_$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.$(z) +deb_dsc = $(OPK_SOURCE)_$(OPK_SOURCE_VERSION_UPSTREAM)-$(debrev).dsc +source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.$(z) + +GNUPGHOME = gnupghome +# TODO: When GnuPG is built with TLS support, delete the second "keyserver" line +# to switch to a non-SKS keyserver. We can't switch yet, because the Web server +# at keys.openpgp.org redirects (HTTP 301) to HTTPS (and enforces it with HSTS). +keyserver = hkps://keys.openpgp.org +keyserver = hkp://pool.sks-keyservers.net +keyring = ../keyring.gpg +cleanup = gpgconf --kill all; rm -Rf '$(GNUPGHOME)'; sleep 5 + +dsc_sed = \ + /^Checksums-Sha256:$$/,/^[^ ]/{ \ + s/ \([0-9a-f][0-9a-f]*\) [0-9][0-9]* \($(deb_tar)\)$$/\1 \2/p;\ + }; + +$(keyring): + gpg --recv-keys $(keys) || { rm -Rf '$@'; exit 1; } + rm -f '$@~' + +$(source_archive): $(keyring) + wget -c '$(pool)/$(deb_dsc)' '$(pool)/$(deb_tar)' + gpg --verify '$(deb_dsc)' + sed -n '$(dsc_sed)' '$(deb_dsc)' | sha256sum -c - + mv '$(deb_tar)' '$(source_archive)' + +source: + install -m 0700 -d '$(GNUPGHOME)' + umask 0177; printf 'keyserver $(keyserver)\n' \ + 1>'$(GNUPGHOME)/dirmngr.conf' + umask 0177; printf 'no-default-keyring\nkeyring $(keyring)\nverbose\n' \ + 1>'$(GNUPGHOME)/gpg.conf' + GNUPGHOME='$(GNUPGHOME)' $(MAKE) -f ../source.mk "$(source_archive)" \ + || { $(cleanup); exit 1; } + $(cleanup) |