Added removal of old GPG key in trinity-keyring on Debian and Ubuntu

Cleanup build rules
pull/3/head
Slávek Banko 11 years ago
parent ca6bbdcf85
commit 0c2f8a56ca

@ -1,5 +0,0 @@
debian-archive-keyring (2006.01.10) unstable; urgency=low
* Initial release
-- Michael Vogt <mvo@debian.org> Tue, 10 Jan 2006 09:17:43 +0100

@ -0,0 +1,13 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.10 (GNU/Linux)
mI0ETBb5vwEEANKouZGon6I/wxSh8LO49a/JRCsEI/wiXMBDw/eOa+AF6onugRs3
9XYo0fPuSu5OzJW+Mjt7FD+IYBwrqWH8kqshXHEpiPfVh1uEa0lSDmDoEx6BEude
CVvt/tc2x4YDzwxdChQ5X/Bwhq/kfTXCUXuNLmT1rifJiujeuISd+06VABEBAAG0
JlF1aWNrQnVpbGQgVHJpbml0eSBEZXNrdG9wIEVudmlyb25tZW50iLgEEwECACIF
AkwW+b8CGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEEPx3E8rhjjQu30E
AJpz2+fjYXvpQOGIN3w2BoKBF0jVROS+xPs1dZMzHhvdwQR6/2KI8RVZ7M+VnnJi
Y0VaYf6jYd08S4SsX5LuDuiCxxkMkno7RRdEOdsnxfiqGnv2EjvQEM3trflQzIBi
9wc+mh9XeI7OZNke/KryAqRTLMdYlTIlv2XNAy/bXFS4
=qpbT
-----END PGP PUBLIC KEY BLOCK-----

@ -0,0 +1,2 @@
keyrings usr/share
repositories/trinity.list etc/apt/sources.list.d

@ -1,5 +1,31 @@
#!/bin/sh #!/bin/sh
# postinst script for trinity-keyring
set -e
case "$1" in
configure)
if [ -x /usr/bin/apt-key ]; then if [ -x /usr/bin/apt-key ]; then
/usr/bin/apt-key add /usr/share/keyrings/trinity-keyring.gpg # Key F5CFC95C (2014.06.08)
apt-key add /usr/share/keyrings/trinity-keyring.gpg > /dev/null
# Key 2B8638D0 (2010.06.15)
apt-key del 2B8638D0 2> /dev/null || true
fi fi
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

@ -1,9 +1,28 @@
#!/bin/sh #!/bin/sh
# prerm script for trinity-keyring
set -e
case "$1" in case "$1" in
remove|purge) remove)
if [ -x /usr/bin/apt-key ]; then if [ -x /usr/bin/apt-key ]; then
/usr/bin/apt-key del 2B8638D0 # Key F5CFC95C (2014.06.08)
apt-key del F5CFC95C 2> /dev/null || true
fi fi
;; ;;
upgrade|failed-upgrade|deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

@ -1,24 +1,14 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# debian/rules file - for debian/keyring
# Based on sample debian/rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# Copyright 1998-2003 James Troup
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
install_dir=install -d -m 755 include /usr/share/cdbs/1/rules/debhelper.mk
install_file=install -m 644
install_script=install -m 755
install_binary=install -m 755 -s
VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
DISTRIBUTION := $(shell dpkg-parsechangelog | grep ^Distribution: | cut -d' ' -f2) DISTRIBUTION := $(shell dpkg-parsechangelog | grep ^Distribution: | cut -d' ' -f2)
build: debian/stamp-distrospecific DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
$(checkdir) && echo xz || echo bzip2)
pre-build:: debian/stamp-distrospecific
debian/stamp-distrospecific: debian/stamp-distrospecific:
dh_testdir dh_testdir
@ -27,49 +17,13 @@ debian/stamp-distrospecific:
tee debian/stamp-distrospecific | \ tee debian/stamp-distrospecific | \
tr "\n" "\0" | (cd debian/distrospecific && xargs -r0 mv -t ../..) tr "\n" "\0" | (cd debian/distrospecific && xargs -r0 mv -t ../..)
clean: clean::
dh_testdir dh_testdir
[ ! -e debian/stamp-distrospecific ] || \ [ ! -e debian/stamp-distrospecific ] || \
cat debian/stamp-distrospecific | \ cat debian/stamp-distrospecific | \
tr "\n" "\0" | xargs -r0 mv -t debian/distrospecific tr "\n" "\0" | xargs -r0 mv -t debian/distrospecific
rm -f debian/stamp-distrospecific rm -f debian/stamp-distrospecific
-rm -f foo foo.asc *.bak *~ */*~ debian/files* debian/*substvars
-rm -rf debian/tmp
binary-indep: checkroot
$(checkdir)
-rm -rf debian/tmp
$(install_dir) debian/tmp/DEBIAN/
$(install_script) debian/postinst debian/tmp/DEBIAN/
$(install_script) debian/prerm debian/tmp/DEBIAN/
$(install_dir) debian/tmp/usr/share/keyrings/
$(install_file) keyrings/trinity-keyring.gpg debian/tmp/usr/share/keyrings/
$(install_dir) debian/tmp/etc/apt/sources.list.d/
$(install_file) repositories/trinity.list debian/tmp/etc/apt/sources.list.d/
sed -i 's|ubuntu [^ ]* main|ubuntu ${DISTRIBUTION} main|g' debian/tmp/etc/apt/sources.list.d/trinity.list
$(install_dir) debian/tmp/usr/share/doc/trinity-keyring/
$(install_file) debian/changelog debian/tmp/usr/share/doc/trinity-keyring/changelog
$(install_file) debian/copyright debian/tmp/usr/share/doc/trinity-keyring/
dpkg-gencontrol -ptrinity-keyring -isp
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
binary-arch:
define checkdir binary-install/trinity-keyring::
test -f keyrings/trinity-keyring.gpg dh_testdir
endef sed -i 's|ubuntu [^ ]* main|ubuntu ${DISTRIBUTION} main|g' debian/$(cdbs_curpkg)/etc/apt/sources.list.d/trinity.list
# Below here is fairly generic really
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot

Loading…
Cancel
Save