Add gkeys
[portage-overlay.git] / app-crypt / gkeys / gkeys-9999.ebuild
1 # Copyright 2014-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-crypt/gkeys/gkeys-9999.ebuild,v 1.1 2014/12/24 23:31:26 dolsen Exp $
4
5 EAPI="5"
6
7 PYTHON_COMPAT=(python2_7 python3_3 python3_4)
8
9 #EGIT_PROJECT="gentoo-keys.git"
10 EGIT_BRANCH="master"
11
12 inherit distutils-r1 git-r3
13
14 EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/gentoo-keys.git"
15
16 DESCRIPTION="A Openpgp/gpg key management program and python libs"
17 HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Gentoo-keys"
18 SRC_URI=""
19
20 LICENSE="GPL-2"
21 SLOT="0"
22 IUSE=""
23
24 KEYWORDS=""
25
26 DEPEND="net-misc/curl
27         app-crypt/gentoo-keys
28         app-crypt/gnupg
29         =dev-python/pyGPG-9999[${PYTHON_USEDEP}]
30         =dev-python/ssl-fetch-9999[${PYTHON_USEDEP}]"
31 RDEPEND="${DEPEND}
32         "
33
34 S="${WORKDIR}/$P/gkeys"
35
36 python_prepare_all() {
37         distutils-r1_python_prepare_all
38         # copy these 2 into our subdir from the master level
39         cp ../LICENSE ./ || die "cp LICENSE failed"
40         cp ../README.md ./ || die "cp README.me failed"
41 }
42
43 pkg_postinst() {
44         mkdir -p "/var/lib/gentoo/gkeys/seeds"
45         curl "https://api.gentoo.org/gentoo-keys/seeds/gentoodevs.seeds" > /var/lib/gentoo/gkeys/seeds/gentoodevs.seeds
46         curl "https://api.gentoo.org/gentoo-keys/seeds/gentoodevs.seeds.sig" > /var/lib/gentoo/gkeys/seeds/gentoodevs.seeds.sig
47         gkeys verify -C gentoo \
48            -F /var/lib/gentoo/gkeys/seeds/gentoodevs.seeds \
49            -s /var/lib/gentoo/gkeys/seeds/gentoodevs.seeds.sig
50         if [[ $? == "0" ]]; then
51                 gkeys installkey -C gentoo-devs
52         fi
53         einfo
54         einfo "This is experimental software."
55         einfo "The API's it installs should be considered unstable"
56         einfo "and are subject to change."
57         einfo
58         einfo "Please file any enhancement requests, or bugs"
59         einfo "at https://bugs.gentoo.org"
60         einfo "We are also on IRC @ #gentoo-keys of the freenode network"
61         einfo
62         ewarn "There may be some python 3 compatibility issues still."
63         ewarn "Please help debug/fix/report them in bugzilla."
64 }