# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/sks/sks-1.1.2.ebuild,v 1.4 2012/02/07 00:34:06 kingtaco Exp $ EAPI=4 inherit eutils multilib systemd DESCRIPTION="SKS Keyserver" HOMEPAGE="http://code.google.com/p/sks-keyserver/" SRC_URI="https://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="optimize test" DEPEND="dev-lang/ocaml dev-ml/cryptokit sys-libs/db:4.6" RDEPEND="${DEPEND}" pkg_setup() { enewuser sks -1 -1 /var/lib/sks } src_prepare() { cp Makefile.local.unused Makefile.local || die sed -i \ -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \ -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db4.6/:g" \ -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \ -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \ Makefile.local || die sed -i \ -e 's:^CAMLINCLUDE= -I lib -I bdb$:CAMLINCLUDE= -I lib -I bdb -I +cryptokit:g' \ -e 's:-Werror-implicit-function-declaration::g' \ Makefile bdb/Makefile || die } src_compile() { emake dep emake -j1 all if use optimize; then emake all.bc fi } src_test() { ./sks unit_test } src_install() { if use optimize; then emake install.bc dosym /usr/bin/sks.bc usr/bin/sks dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail else emake install fi dodoc README.md newinitd "${FILESDIR}/sks-db.runscript" sks-db newinitd "${FILESDIR}/sks-recon.runscript" sks-recon newconfd "${FILESDIR}/sks-confd" sks systemd_dounit "${FILESDIR}/sks-db.service" systemd_dounit "${FILESDIR}/sks-recon.service" keepdir /var/lib/sks } pkg_postinst() { einfo "To get sks running, first build the database," einfo "start the databse, import atleast one key, then" einfo "run a cleandb. See the sks man page for more" einfo "information" }