Add release script and announcement template [skip ci]
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
diff --git a/devel/announcement_template.txt b/devel/announcement_template.txt
new file mode 100644
index 0000000..7b91248
--- /dev/null
+++ b/devel/announcement_template.txt
@@ -0,0 +1,95 @@
+GNU Libtasn1 is a standalone library written in C for manipulating ASN.1
+objects including DER/BER encoding/decoding. GNU Libtasn1 is used by
+GnuTLS to handle X.509 structures and by GNU Shishi to handle Kerberos
+V5 structures.
+
+* Noteworthy changes in release 2.12 (2012-03-19) [stable]
+- Cleanup license headers.
+- build: Update gnulib files.
+- Corrected DER decoding issue (reported by Matthew Hall).
+ Added self check to detect the problem, see tests/Test_overflow.c.
+ This problem can lead to at least remotely triggered crashes, see
+ further analysis on the libtasn1 mailing list.
+
+Homepage:
+ https://www.gnu.org/software/libtasn1/
+
+Here are the compressed sources (1.9MB):
+ ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz
+ http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz
+
+Here are GPG detached signatures using key 0xB565716F:
+ ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz.sig
+ http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12.tar.gz.sig
+
+We publish Windows binaries for this release (32 and 64 bits):
+ ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win32.zip
+ http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win32.zip
+ ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win64.zip
+ http://ftp.gnu.org/gnu/libtasn1/libtasn1-2.12-win64.zip
+
+Commercial support contracts for Libtasn1 are available, and they help
+finance continued maintenance. Simon Josefsson Datakonsult AB, a
+Stockholm based privately held company, is currently funding Libtasn1
+maintenance. We are always looking for interesting development
+projects. See http://josefsson.org/ for more details.
+
+If you need help to use Libtasn1, or want to help others, you are
+invited to join the help-libtasn1 mailing list, see:
+ https://lists.gnu.org/mailman/listinfo/help-libtasn1
+
+All manuals are available from:
+ https://www.gnu.org/software/libtasn1/manual/
+
+Direct links to the manual:
+ HTML: https://www.gnu.org/software/libtasn1/manual/libtasn1.html
+ PDF: https://www.gnu.org/software/libtasn1/manual/libtasn1.pdf
+
+Direct links to the API Reference manual:
+ HTML: https://www.gnu.org/software/libtasn1/reference/
+ PDF: https://www.gnu.org/software/libtasn1/reference/libtasn1.pdf
+
+For developers interested in improving code quality, we publish
+Cyclomatic code complexity charts that help you find code that may
+need review and improvements:
+ https://www.gnu.org/software/libtasn1/cyclo/
+
+Code coverage charts indicate parts of the source code that needs
+to be tested better by the included self-tests:
+ https://www.gnu.org/software/libtasn1/coverage/
+
+Clang can analyse the source code for common problems, here is its
+report for libtasn1:
+ https://www.gnu.org/software/libtasn1/clang/
+
+The software is cryptographically signed by the author using an
+OpenPGP key identified by the following information:
+
+pub 1280R/B565716F 2002-05-05 [expires: 2013-05-10]
+ Key fingerprint = 0424 D4EE 81A0 E3D1 19C6 F835 EDA2 1E94 B565 716F
+uid Simon Josefsson <address@hidden>
+uid Simon Josefsson <address@hidden>
+sub 1280R/4D5D40AE 2002-05-05 [expires: 2013-05-10]
+sub 2048R/105E722E 2012-03-13 [expires: 2013-07-26]
+sub 2048R/728AB82C 2012-03-13 [expires: 2013-07-26]
+sub 2048R/9394F626 2012-03-13 [expires: 2013-07-26]
+
+The key is available from:
+ http://josefsson.org/key.txt
+ dns:b565716f.josefsson.org?TYPE=CERT
+
+Here are the SHA-1 and SHA-224 checksums:
+
+b73539aee5444efb5e606b94bdf3ec5bfedb8620 libtasn1-2.12.tar.gz
+011e8ab84d57b441f0c1dc18eebdda2ce3960bc9b7fdf8e1d4e35085 libtasn1-2.12.tar.gz
+
+919933732983e5075a2df288c1a3eb413e8c86c5 libtasn1-2.12-win32.zip
+29b40469ae38ba7ff71abde5b806c8d30a222723443386eff4923c57
+libtasn1-2.12-win32.zip
+
+de3add4d82aef98b7e52fff1ae72c1136781363d libtasn1-2.12-win64.zip
+6cb1e3171e38e786391cb9dd702e12724f0a19c1cf6c1953a8552e82
+libtasn1-2.12-win64.zip
+
+Happy hacking,
+Simon
diff --git a/devel/release b/devel/release
new file mode 100755
index 0000000..7cc3a18
--- /dev/null
+++ b/devel/release
@@ -0,0 +1,137 @@
+#!/bin/bash -e
+#
+# Written 2016 by Tim Ruehsen
+
+app_name=$(grep "^PACKAGE_NAME='" configure|cut -d "'" -f2)
+app_ver=$(grep "^PACKAGE_VERSION='" configure|cut -d "'" -f2)
+
+# check if branch is 'master'
+if [ "`git rev-parse --abbrev-ref HEAD`" != "master" ]; then
+ echo Please be sure to checkout master first
+ exit 1
+fi
+
+# check if latest commit has been tagged
+tag=$(git describe --abbrev=0)
+if [ "$tag" != `git describe` ]; then
+ echo "You have to add a signed tag for the *latest* commit"
+ echo Expected: $tag
+ echo Found: `git describe`
+ exit 1
+fi
+
+# make sure that the package version matches the current tag
+if [ "$app_name-$app_ver" != "$tag" ]; then
+ echo "The current tag doesn't match the package version"
+ echo Expected tag: "$app_name-$app_ver"
+ echo Found: $tag
+fi
+
+# Find out the archive extensions
+for archive in $(grep "^DIST_ARCHIVES =" Makefile|cut -d '=' -f2); do
+ extensions=$extensions" "$(echo $archive|cut -s -d'.' -f3)
+done
+echo "The following archive types will be created/uploaded: " $extensions
+
+echo "Current version of $app_name is $app_ver"
+echo
+echo -n "Enter Y if that is OK, else enter N and edit configure.ac: "
+read x
+[ "$x" != "y" -a "$x" != "Y" ] && exit 0
+
+echo
+grep -i "Changes in $app_name" NEWS|head -1
+echo -n "Did you edit the NEWS file ? [y/N] "
+read x
+[ "$x" != "y" -a "$x" != "Y" ] && exit 0
+
+echo
+while true; do
+ echo -n "Alpha or Regular release ? [r/A] "
+ read x
+ if test "$x" = "r" || test "$x" = "R"; then
+ directory="/incoming/ftp"
+ break
+ elif test "$x" = "a" || test "$x" = "A"; then
+ directory="/incoming/alpha"
+ break
+ fi
+done
+
+echo
+export CFLAGS="-g -O2 -Wall"
+
+echo "* Bootstrap"
+./bootstrap >/dev/null
+
+echo "* Configure"
+./configure -q
+
+echo "* Make"
+make -s -j$(nproc) clean
+make -s -j$(nproc)
+
+echo "* Make distcheck"
+make -s -j$(nproc) distcheck >/dev/null
+
+echo "* Make dist"
+for ext in $extensions; do
+ [[ $ext = 'gz' ]] && ext="gzip"
+# [[ $ext = 'lz' ]] && ext="lzip"
+ make -s -j$(nproc) dist-$ext >/dev/null
+done
+
+x=$(gpg --list-secret-keys 2>/dev/null|grep ^sec|awk '{ print $2 }')
+echo $x
+if [ "$x" = "" ]; then
+ echo No signing key found - please check with 'gpg --list-secret-keys'
+ exit 1
+fi
+
+# arrays just work in Bash
+keys=($x)
+if [ ${#keys[@]} -eq 1 ]; then
+ IFS='/' arr=($x)
+ signing_key=${arr[1]}
+else
+ for ((i=0; i < ${#keys[@]}; i++)); do
+ echo "$((i+1))) ${keys[i]}"
+ done
+ while true; do
+ echo -n "Enter 1-${#keys[@]}: "
+ read x
+
+ # check for digits only
+ if [ -n "${i//[0-9]/}" ]; then continue; fi
+
+ if test $x -ge 1 || test $x -le ${#keys[@]}; then
+ IFS='/' arr=(${keys[$((x-1))]})
+ signing_key=${arr[1]}
+ break
+ fi
+ done
+fi
+unset IFS
+echo $signing_key
+
+# fetch app_version again, just in case
+app_ver=$(grep "^PACKAGE_VERSION='" configure|cut -d "'" -f2)
+
+for ext in $extensions; do
+ app_tarball="${app_name}-${app_ver}.tar.$ext"
+ gpg --default-key $signing_key --yes -b $app_tarball
+
+ echo -e "version: 1.2\nfilename: ${app_tarball}\ndirectory: libtasn1\n" >${app_tarball}.directive
+ gpg --default-key $signing_key --yes --clearsign ${app_tarball}.directive
+
+ftp -v -n -i -p ftp-upload.gnu.org <<EOF
+user anonymous
+cd $directory
+put ${app_tarball}
+put ${app_tarball}.sig
+put ${app_tarball}.directive.asc
+EOF
+
+done
+
+echo "Don't forget to mention the authors announcement. (list with 'contrib/mk_authors')"