diff options
author | Paul Healy <lmiphay@gmail.com> | 2020-01-04 15:47:35 +0000 |
---|---|---|
committer | Paul Healy <lmiphay@gmail.com> | 2020-01-04 15:47:35 +0000 |
commit | c8231978961c05d94b8bbf75e5ea6914f079f526 (patch) | |
tree | 1e0515ee577652b867e64453a76e9d3fd444fb4e /app-misc | |
parent | support shairport group=audio (diff) | |
download | lmiphay-c8231978961c05d94b8bbf75e5ea6914f079f526.tar.gz lmiphay-c8231978961c05d94b8bbf75e5ea6914f079f526.tar.bz2 lmiphay-c8231978961c05d94b8bbf75e5ea6914f079f526.zip |
revbump homeassistant
Signed-off-by: Paul Healy <lmiphay@gmail.com>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/homeassistant-bin/Manifest | 3 | ||||
-rw-r--r-- | app-misc/homeassistant-bin/homeassistant-bin-0.103.5.ebuild | 145 | ||||
-rw-r--r-- | app-misc/homeassistant-bin/homeassistant-bin-9999.ebuild | 4 |
3 files changed, 149 insertions, 3 deletions
diff --git a/app-misc/homeassistant-bin/Manifest b/app-misc/homeassistant-bin/Manifest index 2a8273d..7fbe0e4 100644 --- a/app-misc/homeassistant-bin/Manifest +++ b/app-misc/homeassistant-bin/Manifest @@ -13,4 +13,5 @@ EBUILD homeassistant-bin-0.103.0.ebuild 4256 BLAKE2B 64da2e6c93079adbedbc07c7009 EBUILD homeassistant-bin-0.103.2.ebuild 4256 BLAKE2B 64da2e6c93079adbedbc07c7009603c5dd7f89efec0025dcbe6a4d996238d36173bde6096e95481425175c733a14a539d9a1578c3b3a206653ffcb09b12272da SHA512 16a09c7696fcdbdb5e90429c3721ae702fec6e6a89f45ac5841b9b9c9642e46d733a989864907396c6d6d8269e0afc02c7c4023303aaf9abf4b91a19cfa2acca EBUILD homeassistant-bin-0.103.3.ebuild 4256 BLAKE2B 64da2e6c93079adbedbc07c7009603c5dd7f89efec0025dcbe6a4d996238d36173bde6096e95481425175c733a14a539d9a1578c3b3a206653ffcb09b12272da SHA512 16a09c7696fcdbdb5e90429c3721ae702fec6e6a89f45ac5841b9b9c9642e46d733a989864907396c6d6d8269e0afc02c7c4023303aaf9abf4b91a19cfa2acca EBUILD homeassistant-bin-0.103.4.ebuild 4256 BLAKE2B 64da2e6c93079adbedbc07c7009603c5dd7f89efec0025dcbe6a4d996238d36173bde6096e95481425175c733a14a539d9a1578c3b3a206653ffcb09b12272da SHA512 16a09c7696fcdbdb5e90429c3721ae702fec6e6a89f45ac5841b9b9c9642e46d733a989864907396c6d6d8269e0afc02c7c4023303aaf9abf4b91a19cfa2acca -EBUILD homeassistant-bin-9999.ebuild 2566 BLAKE2B 8bc81f53fb3cb8744ac59aa48c14e01d442a48fde8ed408b72922f6c921f81b6cacf4ce759a256f720c14416eaf3a62d92bf1f26c1f28919b90743d088908df2 SHA512 cd28376bdc8f7cc988a1ed01e84a03ac4de8bf843a1169ca87ab4e1d9c116a30abec36dc049e34058455e27c7ae96ae6587ac4b13a122565bae7cc718ed990c4 +EBUILD homeassistant-bin-0.103.5.ebuild 4256 BLAKE2B 64da2e6c93079adbedbc07c7009603c5dd7f89efec0025dcbe6a4d996238d36173bde6096e95481425175c733a14a539d9a1578c3b3a206653ffcb09b12272da SHA512 16a09c7696fcdbdb5e90429c3721ae702fec6e6a89f45ac5841b9b9c9642e46d733a989864907396c6d6d8269e0afc02c7c4023303aaf9abf4b91a19cfa2acca +EBUILD homeassistant-bin-9999.ebuild 2570 BLAKE2B a585a757290d38e61908524df8282b8d48916b7c23cb2b51e625d6d08ca409b6ef357f5bc06f1d1022bbfc4120112e292dac343f20692b11db8e1e66e15cf104 SHA512 c22d886de264eac1cc4bb3f7ecd7824ca4edac987f80ce29661c865557413f08399f2cd26683bf91fbeec99be0d92e390b04a246d0219de2398d19dedee1637d diff --git a/app-misc/homeassistant-bin/homeassistant-bin-0.103.5.ebuild b/app-misc/homeassistant-bin/homeassistant-bin-0.103.5.ebuild new file mode 100644 index 0000000..ff802ca --- /dev/null +++ b/app-misc/homeassistant-bin/homeassistant-bin-0.103.5.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_6 ) + +inherit user readme.gentoo-r1 eutils distutils-r1 systemd + +MY_PN="${PN/-bin/}" + +DESCRIPTION="Home automation platform (Python 3 required)" +HOMEPAGE="https://home-assistant.io" +SRC_URI="" # pip installs HA version $PV from PyPI + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="maint mysql" + +PY_HA="3.6" + +DEPEND=" + ${PYTHON_DEPS} + !app-misc/homeassistant + dev-lang/python:${PY_HA} + dev-python/pip[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + mysql? ( dev-python/mysqlclient ) +" +RDEPEND=" + ${DEPEND} + app-admin/logrotate + maint? ( + app-crypt/certbot + app-crypt/ssl-cert-check + net-misc/dropbox-uploader + virtual/logger + ) +" + +INSTALL_DIR="/opt/${MY_PN}" + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" + The HA interface listens on port 8123 - this _will_ take a minute or two to appear + + hass configuration is in: /etc/${MY_PN} + For openrc daemon command line arguments are configured in: /etc/conf.d/${MY_PN} + + logging is to: /var/log/${MY_PN}/{server,errors,stdout}.log + For HA logging configuration see: https://www.home-assistant.io/components/logger/ + + The sqlite db is by default in: /etc/${MY_PN} + To move it after ${MY_PN} has run once and while ${MY_PN} is stopped: + - add /etc/${MY_PN}/recorder.yaml to /etc/${MY_PN}/configuration.yaml + - mv /etc/${MY_PN}/home-assistant_v2.db /var/db/${MY_PN} + + support thread at: + https://community.home-assistant.io/t/gentoo-homeassistant-0-59-2-ebuild/35577 + + The script /usr/bin/update-homeassistant can be used to update homeassistant-bin (it keeps + a backup of the previous virtualenv under /opt). The script is for openrc only at the moment. +" + +S="${WORKDIR}" + +pkg_setup() { + enewgroup "${MY_PN}" + enewuser "${MY_PN}" -1 -1 "$INSTALL_DIR" "${MY_PN}" + + elog "This ebuild requires network access for 'pip install $MY_PN'" + elog "If the install fails due to name lookup retrying out, then try" + elog "disabling the portage network-sandbox ; e.g. in /etc/portage/make.conf:" + elog "" + elog "FEATURES=\"-network-sandbox\"" + elog "" + elog "The update-homeassistant script temporally disables the network-sandbox (and can" + elog "also be used to do an initial install of ${PN})." +} + +src_compile() { + true +} + +src_install() { + dobin "${FILESDIR}/update-homeassistant" + + keepdir "$INSTALL_DIR" + + keepdir "/etc/${MY_PN}" + insinto "/etc/${MY_PN}" + doins "${FILESDIR}/recorder.yaml" + fowners -R "${MY_PN}:${MY_PN}" "/etc/${MY_PN}" + + "python${PY_HA}" -m venv "${D}/$INSTALL_DIR" + # for no output from pip add: --quiet + # note the venv has a python3, but no python3.x + VIRTUAL_ENV="$INSTALL_DIR" "${D}/$INSTALL_DIR/bin/python3" -m pip --no-cache-dir install "${MY_PN}==${PV}" || die + sed -i "1c#!$INSTALL_DIR/bin/python3" "${D}/$INSTALL_DIR/bin/hass" + + # see: https://github.com/home-assistant/home-assistant/issues/28198#issuecomment-546300192 + VIRTUAL_ENV="$INSTALL_DIR" "${D}/$INSTALL_DIR/bin/python3" -m pip --no-cache-dir install "home-assistant-frontend" || die + + if use mysql ; then + VIRTUAL_ENV="$INSTALL_DIR" "${D}/$INSTALL_DIR/bin/python3" -m pip --no-cache-dir install "mysqlclient" || die + fi + + # this has to come after all of the package installs + fowners -R "${MY_PN}:${MY_PN}" "$INSTALL_DIR" + + newconfd "${FILESDIR}/${MY_PN}.conf.d" "${MY_PN}" + newinitd "${FILESDIR}/${MY_PN}.init.d" "${MY_PN}" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${MY_PN}.logrotate" "${MY_PN}" + + keepdir "/var/log/${MY_PN}/old" + fowners -R "${MY_PN}:${MY_PN}" "/var/log/${MY_PN}" + + keepdir "/var/db/${MY_PN}" + fowners -R "${MY_PN}:${MY_PN}" "/var/db/${MY_PN}" + + systemd_dounit "${FILESDIR}"/${MY_PN}.service + + readme.gentoo_create_doc +} + +pkg_postinst() { + elog "homeassistant requires python 3.5 (or later)" + elog "" + elog "This ebuild installs homeassistant into a virtualenv built for:" + elog "" + elog " python ${PY_HA} (the current python 3.x in gentoo PYTHON_TARGETS)" + elog "" + elog "If you have previously run homeassistant with an older version of " + elog "python, then it is recommended that you do a clean install on moving to" + elog "python ${PY_HA}." + + readme.gentoo_print_elog +} + +pkg_config() { + "${INSTALL_DIR}/bin/hass" --script ensure_config +} diff --git a/app-misc/homeassistant-bin/homeassistant-bin-9999.ebuild b/app-misc/homeassistant-bin/homeassistant-bin-9999.ebuild index f231c69..261a0db 100644 --- a/app-misc/homeassistant-bin/homeassistant-bin-9999.ebuild +++ b/app-misc/homeassistant-bin/homeassistant-bin-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="6" -PYTHON_COMPAT=( python3_5 ) +PYTHON_COMPAT=( python3_{6,7} ) inherit user readme.gentoo-r1 eutils distutils-r1 systemd |