diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-05 01:54:57 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-05 02:21:13 (EST) |
commit | 396953fe408a22d946a3101615462e5ad54a487c (patch) | |
tree | 34301f0e09a5489fdc3b2c8a7a8afdca5297fdbc |
Initial commit
-rw-r--r-- | .gitignore | 10 | ||||
-rwxr-xr-x | build | 6 | ||||
-rw-r--r-- | changelog | 5 | ||||
-rw-r--r-- | control | 8 | ||||
-rw-r--r-- | format | 1 | ||||
-rwxr-xr-x | release | 14 | ||||
-rw-r--r-- | source.mk | 37 |
7 files changed, 81 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,6 @@ +#!/usr/bin/make -f + +include ../source.mk + +nop: + @: diff --git a/changelog b/changelog new file mode 100644 index 0000000..428c80a --- /dev/null +++ b/changelog @@ -0,0 +1,5 @@ +git (2.30.0-1) trunk + + * Initial release. + + -- Patrick McDermott <patrick.mcdermott@libiquity.com> Tue, 05 Jan 2021 01:29:04 -0500 @@ -0,0 +1,8 @@ +Maintainer: Patrick McDermott <patrick.mcdermott@libiquity.com> +Build-Depends: + opkbuild (>= 4.2.1), opkhelper-3.0 (>= 3.1.3), + busybox (>= 1.32.0-1), + gpg, dirmngr, gpgconf, gpg-agent, + libcurl.4-dev (>= 7.74.0-2), + libexpat.1-dev, +Homepage: https://git-scm.com/ @@ -0,0 +1 @@ +2.0 @@ -0,0 +1,14 @@ +#!/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 +ver="$(printf '%s' "${ver}" | tr '~' '.')" +git tag "${src}/${ver}" HEAD diff --git a/source.mk b/source.mk new file mode 100644 index 0000000..1c6fa0a --- /dev/null +++ b/source.mk @@ -0,0 +1,37 @@ +z = xz +keys = \ + 'E1F0 36B1 FEE7 221F C778 ECEF B0B5 E886 96AF E6CB' + +upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar +upstream_url = https://www.kernel.org/pub/software/scm/git/$(upstream_archive) +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 + +$(keyring): + gpg --recv-keys $(keys) || { rm -Rf '$@'; exit 1; } + rm -f '$@~' + +$(source_archive): $(keyring) + wget -c '$(upstream_url).$(z)' '$(upstream_url).sign' + unxz -c '$(upstream_archive).$(z)' 1>'$(upstream_archive)' + gpg --verify '$(upstream_archive).sign' + rm '$(upstream_archive)' + mv '$(upstream_archive).$(z)' '$(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) |