# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: www-apps/domoticz-9999.ebuild,v 1.4 2015/08/22 09:16:31 by frostwork Exp $ EAPI="5" inherit cmake-utils eutils git-r3 systemd EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" DESCRIPTION="Home automation system" HOMEPAGE="http://domoticz.com/" LICENSE="GPL-3" SLOT="0" KEYWORDS="" IUSE="-staticboost" RDEPEND="net-misc/curl dev-libs/libusb dev-db/sqlite dev-libs/boost sys-libs/zlib" DEPEND="${RDEPEND} dev-util/cmake" src_prepare() { # some cosmetics to properly create appversion.h sed -i -e "s:\${GIT_EXECUTABLE} :\${GIT_EXECUTABLE} --git-dir=${EGIT_DIR} :" -i CMakeLists.txt sed -i -e "s:\${GIT_EXECUTABLE} :\${GIT_EXECUTABLE} --git-dir=${EGIT_DIR} :" -i getgit.cmake sed -i -e "s:appversion.h.txt:${WORKDIR}/${P}/appversion.h.txt:g" -i getgit.cmake # install binary to /usr/bin/ sed -i -e "s:install(TARGETS domoticz DESTINATION \${CMAKE_INSTALL_PREFIX}):install(TARGETS domoticz DESTINATION /usr/bin):" -i CMakeLists.txt # install data to hardcoded (TODO?) /usr/share/domoticz sed -i -e "s:DESTINATION \${CMAKE_INSTALL_PREFIX}:DESTINATION /usr/share/domoticz:" -i CMakeLists.txt } src_configure() { local mycmakeargs=( $(cmake-utils_use staticboost USE_STATIC_BOOST) ) cmake-utils_src_configure } src_install() { cmake-utils_src_install systemd_newunit "${FILESDIR}"/${PN}.service "${PN}.service" systemd_install_serviced "${FILESDIR}"/${PN}.service.conf newinitd "${FILESDIR}"/${PN}.init.d ${PN} newconfd "${FILESDIR}"/${PN}.conf.d ${PN} }