| # Copyright 2012 The Chromium OS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI="4" |
| CROS_WORKON_COMMIT="ab36a75379f1cfaa7a803cb6f8b33ad31e49fcbf" |
| CROS_WORKON_TREE="0768d67ea665c9f440b4158673af98e8d3430240" |
| CROS_WORKON_PROJECT="chromiumos/third_party/tlsdate" |
| |
| inherit autotools flag-o-matic toolchain-funcs cros-workon cros-debug user |
| |
| DESCRIPTION="Update local time over HTTPS" |
| HOMEPAGE="https://github.com/ioerror/tlsdate" |
| |
| LICENSE="BSD" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE="asan clang +dbus +seccomp" |
| REQUIRED_USE="asan? ( clang )" |
| |
| DEPEND="dev-libs/openssl |
| dev-libs/libevent |
| dbus? ( sys-apps/dbus )" |
| RDEPEND="${DEPEND} |
| chromeos-base/chromeos-ca-certificates |
| " |
| |
| src_prepare() { |
| eautoreconf |
| } |
| |
| src_configure() { |
| cros-workon_src_configure \ |
| $(use_enable dbus) \ |
| $(use_enable seccomp seccomp-filter) \ |
| $(use_enable cros-debug seccomp-debugging) \ |
| --enable-cros \ |
| --with-dbus-client-group=chronos \ |
| --with-unpriv-user=tlsdate \ |
| --with-unpriv-group=tlsdate |
| } |
| |
| 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" |
| insinto /etc/init |
| doins init/tlsdated.conf |
| } |
| |
| pkg_preinst() { |
| enewuser "tlsdate" |
| enewgroup "tlsdate" |
| enewuser "tlsdate-dbus" # For tlsdate-dbus-announce. |
| enewgroup "tlsdate-dbus" # For tlsdate-dbus-announce. |
| } |