/[gentoo-x86]/net-misc/sks/sks-1.1.5-r1.ebuild
Gentoo

Contents of /net-misc/sks/sks-1.1.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jul 26 19:32:50 2015 UTC (4 years, 4 months ago) by k_f
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -1 lines
warn-error A is set for development versions (tagged with +) upstream, however it is not intended to actually be fatal errors for released versions. We want to keep EdDSA support, i.e it is actually one commit past 1.1.5, so just disabling making warnings fatal.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x250B7AFED6379D85!)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/sks/sks-1.1.5-r1.ebuild,v 1.1 2015/02/02 23:18:26 k_f Exp $
4
5 EAPI=5
6
7 inherit multilib user readme.gentoo systemd
8
9 DESCRIPTION="An OpenPGP keyserver which is decentralized and provides highly reliable synchronization"
10 HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver"
11 SRC_URI="http://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz"
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="optimize test"
16 DOC_CONTENTS="To get sks running, first build the database,
17 start the databse, import atleast one key, then
18 run a cleandb. See the sks man page for more information
19 Typical DB_CONFIG file and sksconf has been installed
20 in /var/lib/sks and can be used as templates by renaming
21 to remove the .typical extension. The DB_CONFIG file has
22 to be in place before doing the database build, or the BDB
23 environment has to be manually cleared from both KDB and PTree.
24 The same applies if you are upgrading to this version with an existing KDB/Ptree,
25 using another version of BDB than 4.8; you need to clear the environment
26 using e.g. db4.6_recover -h . and db4.6_checkpoint -1h . in both KDB and PTree
27 Additionally a sample web interface has been installed as
28 web.typical in /var/lib/sks that can be used by renaming it to web
29 Important: It is strongly recommended to set up SKS behind a
30 reverse proxy. Instructions on properly configuring SKS can be
31 found at https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Peering"
32
33 DEPEND="dev-lang/ocaml
34 dev-ml/cryptokit
35 sys-libs/db:4.8"
36 RDEPEND="${DEPEND}"
37
38 pkg_setup() {
39 ebegin "Creating named group and user"
40 enewgroup sks
41 enewuser sks -1 -1 /var/lib/sks sks
42 }
43
44 src_prepare() {
45 cp Makefile.local.unused Makefile.local || die
46 sed -i \
47 -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \
48 -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db4.8/:g" \
49 -e "s:^LIBDB=.*$:LIBDB=-ldb-4.8:g" \
50 -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \
51 -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \
52 Makefile.local || die
53 sed -i \
54 -e 's:^CAMLINCLUDE= -I lib -I bdb$:CAMLINCLUDE= -I lib -I bdb -I +cryptokit:g' \
55 -e 's:-Werror-implicit-function-declaration::g' \
56 Makefile bdb/Makefile || die
57 sed -i \
58 -e 's:/usr/sbin/sks:/usr/bin/sks:g' \
59 sks_build.sh || die
60
61 epatch "${FILESDIR}/${P}-eddsa.patch"
62 epatch "${FILESDIR}/${P}-disable-warn-error-a.patch"
63 }
64
65 src_compile() {
66 emake dep
67 # sks build fails with paralell build in module Bdb
68 emake -j1 all
69 if use optimize; then
70 emake all.bc
71 fi
72 }
73
74 src_test() {
75 ./sks unit_test || die
76 }
77
78 src_install() {
79 if use optimize; then
80 emake install.bc
81 dosym /usr/bin/sks.bc usr/bin/sks
82 dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail
83 else
84 emake install
85 fi
86
87 dodoc README.md
88
89 newinitd "${FILESDIR}/sks-db.initd" sks-db
90 newinitd "${FILESDIR}/sks-recon.initd" sks-recon
91 newconfd "${FILESDIR}/sks.confd" sks
92 systemd_dounit "${FILESDIR}"/sks-db.service
93 systemd_dounit "${FILESDIR}"/sks-recon.service
94
95 dodir "/var/lib/sks/web.typical"
96 insinto /var/lib/sks
97 newins sampleConfig/DB_CONFIG DB_CONFIG.typical
98 newins sampleConfig/sksconf.typical sksconf.typical
99 insinto /var/lib/sks/web.typical
100 doins sampleWeb/HTML5/*
101
102 keepdir /var/lib/sks
103 readme.gentoo_create_doc
104 }
105
106 pkg_postinst() {
107 readme.gentoo_print_elog
108
109 if [[ -n ${REPLACING_VERSIONS} ]]; then
110 einfo "Note when upgrading from versions of SKS earlier than 1.1.4"
111 einfo "The default values for pagesize settings have changed. To continue"
112 einfo "using an existing DB without rebuilding, explicit settings have to be"
113 einfo "added to the sksconf file."
114 einfo "pagesize: 4"
115 einfo "ptree_pagesize: 1"
116 fi;
117 }

  ViewVC Help
Powered by ViewVC 1.1.20