summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rwxr-xr-xbuild6
-rw-r--r--changelog5
-rw-r--r--control8
-rw-r--r--format1
-rwxr-xr-xrelease14
-rw-r--r--source.mk37
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/
diff --git a/build b/build
new file mode 100755
index 0000000..2a40656
--- /dev/null
+++ b/build
@@ -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
diff --git a/control b/control
new file mode 100644
index 0000000..64503ff
--- /dev/null
+++ b/control
@@ -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/
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..0b33aca
--- /dev/null
+++ b/release
@@ -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)