blob: c2a14c54863d64eaf4ea49a127003efe5864bed6 [file] [log] [blame]
# Copyright 2012 The Chromium OS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
CROS_WORKON_PROJECT="chromiumos/third_party/tlsdate"
inherit autotools flag-o-matic toolchain-funcs cros-workon cros-debug
DESCRIPTION="Update local time over HTTPS"
HOMEPAGE="https://github.com/ioerror/tlsdate"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="asan clang +dbus"
REQUIRED_USE="asan? ( clang )"
DEPEND="dev-libs/openssl
dev-libs/libevent
dbus? ( sys-apps/dbus )"
RDEPEND="${DEPEND}"
src_prepare() {
eautoreconf
}
src_configure() {
# TODO(wad) Migrate off of proxystate by updating libCrosService
cros-workon_src_configure \
$(use_enable dbus) \
$(use_enable cros-debug seccomp-debugging) \
--enable-cros \
--with-dbus-client-group=chronos \
--with-unpriv-user=proxystate \
--with-unpriv-group=proxystate
}
src_compile() {
tc-export CC
emake CFLAGS="-Wall ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
}
src_install() {
default
insinto /etc/tlsdate
doins "${FILESDIR}/tlsdated.conf"
insinto /etc/dbus-1/system.d
doins "${S}/dbus/org.torproject.tlsdate.conf"
insinto /usr/share/dbus-1/interfaces
doins "${S}/dbus/org.torproject.tlsdate.xml"
insinto /usr/share/dbus-1/services
doins "${S}/dbus/org.torproject.tlsdate.service"
}