summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rwxr-xr-xbuild18
-rw-r--r--changelog5
-rw-r--r--control4
-rw-r--r--format1
-rwxr-xr-xrelease13
-rw-r--r--source.mk43
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/
diff --git a/build b/build
new file mode 100755
index 0000000..f6671e4
--- /dev/null
+++ b/build
@@ -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
diff --git a/control b/control
new file mode 100644
index 0000000..84bc6aa
--- /dev/null
+++ b/control
@@ -0,0 +1,4 @@
+Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com>
+Build-Depends:
+ opkbuild (>= 4.2.1),
+ opkhelper-3.0 (>= 3.1.3),
diff --git a/format b/format
new file mode 100644
index 0000000..cd5ac03
--- /dev/null
+++ b/format
@@ -0,0 +1 @@
+2.0
diff --git a/release b/release
new file mode 100755
index 0000000..871cb4a
--- /dev/null
+++ b/release
@@ -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)